AliRoot Core  3dc7879 (3dc7879)
AliPainter.h
Go to the documentation of this file.
1 #ifndef ALIPAINTER_H
2 #define ALIPAINTER_H
3 
6 
13 // TODO: add divFlag for inheritance Mother Class (ClassName) should be add to children (className)=>nameOfObject.class(ClassMother,ClassDaughter) @Boris
14 // TODO: perhaps, we should use some aliases? @Marian
15 // TODO: may be we should also use TVectorD or TMatrix instead enumeration? @Boris
16 // TODO: extend to TH2D, TH3D @Boris
17 // TODO: think how to combine AliPainter::ParseString and AliPainter::ParseOptionString @Boris
18 // NOTE: we can provide list of brackets and remove ignoreBrackets from arguments. mb just add flag about do you want to ignore brackets or not.
19 // TODO - now we have 2 steps for parsing of ranges option to array of string with simple range values. 1. Initial string into map. 2. Map into array fo strings. First of all we can use vector of vector instead map, and the second we should think how we can avoid this 2 intermediate steps with map. @Boris
20 // TODO: add few classes with []
21 // TODO: change global maps to arguments of functions
22 
23 #include <vector>
24 #include <map>
25 #include "TObjArray.h"
26 #include "TString.h"
27 #include "TPad.h"
28 #include "THnBase.h"
29 #include "TMultiGraph.h"
30 #include "TFormula.h"
31 #include "TObject.h"
32 #include "TLegend.h"
33 #include "AliParser.h"
34 
35 class AliPainter {
36  public:
37  static TPad *DivideTPad(TPad *pad, const char *division, const char *classID="", const char *style="", Int_t verbose=0);
38  static void SetMultiGraphTimeAxis(TMultiGraph *graph, TString option);
39  static void DrawHistogram(THnBase *hisN, const char *expression, TPad *pad=nullptr, TObjArray *keepArray=nullptr, TObjArray *metaData=nullptr, Int_t verbose=0);
40  static void DrawHistogram(TObjArray *histogramArray, const char *expression, TPad *pad=nullptr, TObjArray *keepArray=nullptr, TObjArray *metaData=nullptr, Int_t verbose=0);
41  static TPad *GetNextPad(TPad *cPad, TPad *tempPad=nullptr, Int_t verbose=0);
42  private:
43  static void SaveToKeepArray(TObject *, TObjArray *&, Int_t=0);
44  static void SaveToKeepArray(TObjArray *, TObjArray *&, Int_t=0);
45  static TPad *SetPadMargin(TPad *cPad, const char *position, const char *wMargin, const char *units, Double_t mValue, Int_t iCol, Int_t nCols);
46  static TObjArray *PrepareHistogram(THnBase *hisN, const char *expression, TObjArray *&keepArray, TObjArray *metaData=nullptr, Int_t verbose=0);
47  static TObjArray* SliceHistogram(THnBase *, TString, Int_t=0);
48  static TObject *SetProjections(THnBase *, TString, Int_t=0);
49 // static TLegend BuildLegend(THnBase *, TObjArray *, Int_t=0);
50  static Double_t *GetDataArray(TObjArray *, Long64_t &, Int_t=0);
51  static void SetLimits(TObjArray *&, TString, Int_t=0);
52  static Double_t GetStatVal(Double_t *, Long64_t, const TString, Int_t=0);
53  template <typename T>
54  static void FitHistogram(T *&, std::map<TString, TString>, Int_t=0);
55  template <typename T>
56  static void SetDrawingOptions(T *&, std::map<TString, TString>, Int_t=0);
57  ClassDef(AliPainter,1);
58  private:
59 };
60 #endif
#define TObjArray
static void SetDrawingOptions(T *&, std::map< TString, TString >, Int_t=0)
Definition: AliPainter.cxx:593
static void SetLimits(TObjArray *&, TString, Int_t=0)
Definition: AliPainter.cxx:752
Class for generating QA reports See the documentation in describing of functions. ...
Definition: AliPainter.h:35
static TPad * GetNextPad(TPad *cPad, TPad *tempPad=nullptr, Int_t verbose=0)
Definition: AliPainter.cxx:652
static TObjArray * SliceHistogram(THnBase *, TString, Int_t=0)
Definition: AliPainter.cxx:617
static TObject * SetProjections(THnBase *, TString, Int_t=0)
Definition: AliPainter.cxx:525
static void DrawHistogram(THnBase *hisN, const char *expression, TPad *pad=nullptr, TObjArray *keepArray=nullptr, TObjArray *metaData=nullptr, Int_t verbose=0)
Definition: AliPainter.cxx:469
static Double_t * GetDataArray(TObjArray *, Long64_t &, Int_t=0)
Definition: AliPainter.cxx:686
static void SaveToKeepArray(TObject *, TObjArray *&, Int_t=0)
Definition: AliPainter.cxx:571
static Double_t GetStatVal(Double_t *, Long64_t, const TString, Int_t=0)
Definition: AliPainter.cxx:719
static TObjArray * PrepareHistogram(THnBase *hisN, const char *expression, TObjArray *&keepArray, TObjArray *metaData=nullptr, Int_t verbose=0)
Definition: AliPainter.cxx:445
static void FitHistogram(T *&, std::map< TString, TString >, Int_t=0)
Definition: AliPainter.cxx:540
static TPad * DivideTPad(TPad *pad, const char *division, const char *classID="", const char *style="", Int_t verbose=0)
Method allow to divide pad according to specify properties.
Definition: AliPainter.cxx:141
static void SetMultiGraphTimeAxis(TMultiGraph *graph, TString option)
Definition: AliPainter.cxx:274
static TPad * SetPadMargin(TPad *cPad, const char *position, const char *wMargin, const char *units, Double_t mValue, Int_t iCol, Int_t nCols)
Function parses division string from AliPainter::DivideTPad and sets attributes.
Definition: AliPainter.cxx:226