Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
QAPlotReport.h
1/*
2 * QAPlotReport.h
3 *
4 * Created on: 12 paź 2020
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#ifndef HALQAPLOTREPORT_H_
10#define HALQAPLOTREPORT_H_
11
12#include "HistogramManager.h"
13#include "HtmlTable.h"
14#include "Parameter.h"
15
16#include <Rtypes.h>
17#include <RtypesCore.h>
18#include <TH1.h>
19#include <TH2.h>
20#include <TH3.h>
21#include <TString.h>
22
23#include "Std.h"
24
33namespace Hal {
34 class QAPlot;
35
36 class QAPlotReport : public Object {
37 friend class QAPlot;
38
39 private:
40 std::vector<TString> f1dFlags;
41 std::vector<TString> f2dFlags;
42 std::vector<TString> f3dFlags;
43
44 Object* fExtraInfo;
45 ParameterString fOriginName;
46
47 protected:
60 Bool_t CheckFlag(Int_t no, Char_t c, Int_t h1, Int_t h2, Int_t dim) const;
70 void SetFlag1D(Int_t no, Char_t c = ' ', Int_t h1 = 0, Int_t h2 = 0);
80 void SetFlag2D(Int_t no, Char_t c = ' ', Int_t h1 = 0, Int_t h2 = 0);
90 void SetFlag3D(Int_t no, Char_t c = ' ', Int_t h1 = 0, Int_t h2 = 0);
98 void TranslateFlag(TString flag, Int_t& hist, Int_t& hist2, Char_t& op) const;
107 void Operate(TH1* h0, TH1* h1, TH1* h2, Char_t op) const;
115 TString ExportHistogramToFile(TString path, Int_t count, TH1* h) const;
124 TString ExportHistogramToFile(TString path, TString dir, Int_t count, TH1* h) const;
133 QAPlotReport(TString name, Int_t oneDim, Int_t twoDim, Int_t threeDIm);
134
135 HistogramManager_1_1D<TH1D>* GetHistArray1D() const { return f1dHistos; };
136 HistogramManager_1_2D<TH2D>* GetHistArray2D() const { return f2dHistos; };
137 HistogramManager_1_3D<TH3D>* GetHistArray3D() const { return f3dHistos; };
138
139 public:
140 QAPlotReport();
141 QAPlotReport(const QAPlot& other);
142 QAPlotReport(const QAPlotReport& other);
143 QAPlotReport& operator=(const QAPlotReport& other);
144 virtual TString HTMLExtract(Int_t no, TString dir = "") const;
145 virtual void HTMLExtractIntoTable(Int_t no, HtmlTable& obj, TString dir = "", TString rel_dir = "") const;
146 virtual Bool_t CanBeTableElement() const { return kTRUE; };
147 virtual void Print(Option_t* option = "") const;
152 virtual void SetExtraInfo(Object* p);
153 virtual void Add(const Object* pack);
154 virtual void Browse(TBrowser* b);
161 void SetFlag(Int_t no, TString flag, Int_t dim);
163 virtual void Recalculate();
168 void SetOriginClass(TString name) { fOriginName.SetValue(name); };
173 TString GetOriginClass() const { return fOriginName.GetValue(); };
178 inline Int_t GetSize1D() const { return f1dFlags.size(); };
183 inline Int_t GetSize2D() const { return f2dFlags.size(); };
188 inline Int_t GetSize3D() const { return f3dFlags.size(); };
194 inline TH1D* Get1D(Int_t no) const { return f1dHistos->At(no); };
200 inline TH2D* Get2D(Int_t no) const { return f2dHistos->At(no); };
206 inline TH3D* Get3D(Int_t no) const { return f3dHistos->At(no); };
211 Object* GetExtraInfo() const { return fExtraInfo; };
212 virtual Long64_t Merge(TCollection* collection);
213 virtual ~QAPlotReport();
214 ClassDef(QAPlotReport, 1)
215 };
216} // namespace Hal
217#endif /* HALQAPLOTREPORT_H_ */
T * At(const Int_t i) const
TString GetValue() const
Definition Parameter.h:202
void SetValue(TString value)
Definition Parameter.h:197
virtual TString HTMLExtract(Int_t no, TString dir="") const
virtual void HTMLExtractIntoTable(Int_t no, HtmlTable &obj, TString dir="", TString rel_dir="") const
virtual void Add(const Object *pack)
Int_t GetSize2D() const
virtual Bool_t CanBeTableElement() const
TString ExportHistogramToFile(TString path, Int_t count, TH1 *h) const
Int_t GetSize1D() const
void SetFlag(Int_t no, TString flag, Int_t dim)
void SetFlag3D(Int_t no, Char_t c=' ', Int_t h1=0, Int_t h2=0)
virtual Long64_t Merge(TCollection *collection)
Object * GetExtraInfo() const
void SetFlag2D(Int_t no, Char_t c=' ', Int_t h1=0, Int_t h2=0)
virtual void Recalculate()
void TranslateFlag(TString flag, Int_t &hist, Int_t &hist2, Char_t &op) const
void SetFlag1D(Int_t no, Char_t c=' ', Int_t h1=0, Int_t h2=0)
void Operate(TH1 *h0, TH1 *h1, TH1 *h2, Char_t op) const
Int_t GetSize3D() const
void SetOriginClass(TString name)
Bool_t CheckFlag(Int_t no, Char_t c, Int_t h1, Int_t h2, Int_t dim) const
TString GetOriginClass() const
TH3D * Get3D(Int_t no) const
TH2D * Get2D(Int_t no) const
TH1D * Get1D(Int_t no) const
virtual void SetExtraInfo(Object *p)