1 #ifndef ALIANALYSISMUMUGRAPHUTIL_H
2 #define ALIANALYSISMUMUGRAPHUTIL_H
18 #include "TAttMarker.h"
23 class AliAnalysisMuMuGraphUtil : public TObject
27 AliAnalysisMuMuGraphUtil(const char* ocdbpath="raw://");
28 virtual ~AliAnalysisMuMuGraphUtil() {}
30 static TGraphErrors* Combine(TObjArray& graph, Bool_t compact);
32 static void Compact(TGraph& g);
36 TCanvas* DrawWith2Scales(TGraph& g1, TGraph& g2, const char* canvasName="c1");
38 static Int_t GetRunNumber(const TGraph& g, Int_t i);
40 void GetRuns(std::set<int>& runs, TGraph& graph) const;
42 static Bool_t IsCompact(TGraph& g);
44 void PlotSameWithLegend(TObjArray& a, Double_t ymin, Double_t ymax) const;
46 void ShouldDrawPeriods(Bool_t value) { fShouldDrawPeriods = value; }
48 void StyleGraph(TGraph& graph, UInt_t index) const;
50 static void UnCompact(TGraph& g);
52 static void GetYMinAndMax(TGraph& g, Double_t& ymin, Double_t& ymax);
54 static TGraph* RelDif(TGraph& ga, TGraph& gb);
58 AliAnalysisMuMuGraphUtil(const AliAnalysisMuMuGraphUtil& rhs); // not implemented
59 AliAnalysisMuMuGraphUtil& operator=(const AliAnalysisMuMuGraphUtil& rhs); // not implemented
61 TString fOCDBPath; // OCDB path
63 std::vector<TAttLine> fAttLine; // line attributes
64 std::vector<TAttMarker> fAttMarker; // marker attributes
65 std::vector<TAttFill> fAttFill; // fill attributes
66 std::vector<TAttAxis> fAttXaxis; // x-axis attributes
67 std::vector<TAttAxis> fAttYaxis; // y-axis attributes
68 std::vector<std::string> fDrawOptions; // draw options
70 Bool_t fShouldDrawPeriods; // draw period names on top of graphs
72 ClassDef(AliAnalysisMuMuGraphUtil,0) // utility class to modify/plot graphs