CbmRoot
CbmSimulationReport.h
Go to the documentation of this file.
1 
7 #ifndef CBMSIMULATIONREPORT_H_
8 #define CBMSIMULATIONREPORT_H_
9 
10 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
11 
12 #include <string> // for string
13 
14 #include "CbmDrawHist.h" // for kLinear, HistScale
15 #include "CbmHistManager.h" // for CbmHistManager
16 #include "CbmReport.h" // for CbmReport
17 
18 class TH1;
19 class TH2;
20 class TH3;
21 
29 public:
34 
38  virtual ~CbmSimulationReport();
39 
51  void Create(CbmHistManager* histManager, const std::string& outputDir);
52 
61  void Create(const std::string& fileName, const std::string& outputDir);
62 
66  virtual void Create() = 0;
67 
73  TH1* H1(const std::string& name) const { return HM()->H1(name); }
74 
80  TH2* H2(const std::string& name) const { return HM()->H2(name); }
81 
87  TH3* H3(const std::string& name) const { return HM()->H3(name); }
88 
92  CbmHistManager* HM() const { return fHM; }
93 
98  void DrawH1ByPattern(const std::string& histNamePattern);
99 
104  void DrawH1ByPattern(const std::string& histNamePattern,
105  std::string (*labelFormatter)(const std::string&,
106  const CbmHistManager*));
107 
116  void DrawH2ByPattern(const std::string& histNamePattern,
117  HistScale logx = kLinear,
118  HistScale logy = kLinear,
119  HistScale logz = kLinear,
120  const std::string& drawOpt = "");
121 
122 private:
123  CbmHistManager* fHM; // Histogram manager
124 
127 
128  ClassDef(CbmSimulationReport, 1)
129 };
130 
131 #endif /* CBMSIMULATIONREPORT_H_ */
CbmSimulationReport::fHM
CbmHistManager * fHM
Definition: CbmSimulationReport.h:123
CbmSimulationReport::operator=
CbmSimulationReport & operator=(const CbmSimulationReport &)
CbmSimulationReport::H2
TH2 * H2(const std::string &name) const
Return pointer to TH2 histogram.
Definition: CbmSimulationReport.h:80
CbmSimulationReport::DrawH1ByPattern
void DrawH1ByPattern(const std::string &histNamePattern, std::string(*labelFormatter)(const std::string &, const CbmHistManager *))
Select by pattern TH1 histograms and draw all histograms on the same canvas.
HistScale
HistScale
Define linear or logarithmic scale for drawing.
Definition: CbmDrawHist.h:77
CbmHistManager::H2
TH2 * H2(const std::string &name) const
Return pointer to TH2 histogram.
Definition: CbmHistManager.h:190
CbmSimulationReport::Create
virtual void Create()=0
Inherited from CbmReport. Pure abstract function which is called from public Create() function.
CbmSimulationReport::CbmSimulationReport
CbmSimulationReport(const CbmSimulationReport &)
CbmSimulationReport::~CbmSimulationReport
virtual ~CbmSimulationReport()
Destructor.
Definition: CbmSimulationReport.cxx:27
CbmDrawHist.h
Helper functions for drawing 1D and 2D histograms and graphs.
CbmHistManager.h
Histogram manager.
CbmHistManager::H3
TH3 * H3(const std::string &name) const
Return pointer to TH3 histogram.
Definition: CbmHistManager.h:210
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmSimulationReport::Create
void Create(const std::string &fileName, const std::string &outputDir)
Main function which creates report data.
kLinear
@ kLinear
Definition: CbmDrawHist.h:79
CbmSimulationReport::Create
void Create(CbmHistManager *histManager, const std::string &outputDir)
Main function which creates report data.
CbmSimulationReport::H1
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
Definition: CbmSimulationReport.h:73
CbmHistManager::H1
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
Definition: CbmHistManager.h:170
CbmSimulationReport::DrawH1ByPattern
void DrawH1ByPattern(const std::string &histNamePattern)
Select by pattern TH1 histograms and draw each histogram on separate canvas.
CbmSimulationReport::DrawH2ByPattern
void DrawH2ByPattern(const std::string &histNamePattern, HistScale logx=kLinear, HistScale logy=kLinear, HistScale logz=kLinear, const std::string &drawOpt="")
Select by pattern TH2 histograms and draw each histogram on separate canvas.
Definition: CbmSimulationReport.cxx:81
CbmSimulationReport::H3
TH3 * H3(const std::string &name) const
Return pointer to TH3 histogram.
Definition: CbmSimulationReport.h:87
CbmSimulationReport::HM
CbmHistManager * HM() const
Return pointer to Histogram manager.
Definition: CbmSimulationReport.h:92
CbmSimulationReport
Base class for simulation reports.
Definition: CbmSimulationReport.h:28
CbmReport
Base class for reports.
Definition: CbmReport.h:35
CbmReport.h
CbmSimulationReport::CbmSimulationReport
CbmSimulationReport()
Constructor.
Definition: CbmSimulationReport.cxx:25