TaskHelpers.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //-----------------------------------------------------------
  2. // File and Version Information:
  3. // $Id$
  4. //
  5. // Description:
  6. // Functions to simplify work with ROOT
  7. //
  8. //
  9. // Environment:
  10. // Software developed for the MPD detector at NICA
  11. //
  12. // Author List:
  13. // Roman Salmin
  14. //
  15. //
  16. //-----------------------------------------------------------
  17. #ifndef TaskHelpers_HH
  18. #define TaskHelpers_HH
  19. #include <TH1F.h>
  20. #include <TH2F.h>
  21. #include <TH3F.h>
  22. #include <TGeoManager.h>
  23. #include <iostream>
  24. TH1F* CreateHistogram1(const char* name, const char* xtitle, int nbin, Float_t firstBin, Float_t lastBin);
  25. TH2F* CreateHistogram2(const char* name, const char* xtitle, const char* ytitle,
  26. int nbinx, Float_t firstBinX, Float_t lastBinX, int nbiny, Float_t firstBinY, Float_t lastBinY);
  27. TH3F* CreateHistogram3(const char* name, const char* xtitle, const char* ytitle, const char* ztitle,
  28. int nbinx, Float_t firstBinX, Float_t lastBinX, int nbiny, Float_t firstBinY, Float_t lastBinY,
  29. int nbinz, Float_t firstBinZ, Float_t lastBinZ);
  30. // The same with suffixes
  31. TH1F* CreateHistogram1(const char* name, const std::string&, const char* xtitle, int nbin, Float_t firstBin, Float_t lastBin);
  32. TH2F* CreateHistogram2(const char* name, const std::string&, const char* xtitle, const char* ytitle,
  33. int nbinx, Float_t firstBinX, Float_t lastBinX, int nbiny, Float_t firstBinY, Float_t lastBinY);
  34. TH3F* CreateHistogram3(const char* name,const std::string&, const char* xtitle, const char* ytitle, const char* ztitle,
  35. int nbinx, Float_t firstBinX, Float_t lastBinX, int nbiny, Float_t firstBinY, Float_t lastBinY,
  36. int nbinz, Float_t firstBinZ, Float_t lastBinZ);
  37. void toDirectory(const char*);
  38. const TGeoShape* getShape(const TGeoManager *g, const char* name);
  39. #define ENTRY_POINT(x) \
  40. std::cout << "-=TPC=- " << __FUNCTION__ << ": " << x \
  41. << " (" << __FILE__ \
  42. << ", " << __LINE__ << ")" << std::endl
  43. #endif