#ifndef ALIANALYSISMUMUGRAPHUTIL_H #define ALIANALYSISMUMUGRAPHUTIL_H #ifndef ROOT_TObject # include "TObject.h" #endif #include #include #include class TGraph; class TGraphErrors; class TCanvas; class TObjArray; #include "TAttFill.h" #include "TAttMarker.h" #include "TAttLine.h" #include "TAttAxis.h" #include "TString.h" class AliAnalysisMuMuGraphUtil : public TObject { public: AliAnalysisMuMuGraphUtil(const char* ocdbpath="raw://"); virtual ~AliAnalysisMuMuGraphUtil() {} static TGraphErrors* Combine(TObjArray& graph, Bool_t compact); static void Compact(TGraph& g); void DefaultStyle(); TCanvas* DrawWith2Scales(TGraph& g1, TGraph& g2, const char* canvasName="c1"); static Int_t GetRunNumber(const TGraph& g, Int_t i); void GetRuns(std::set& runs, TGraph& graph) const; static Bool_t IsCompact(TGraph& g); void PlotSameWithLegend(TObjArray& a, Double_t ymin, Double_t ymax) const; void ShouldDrawPeriods(Bool_t value) { fShouldDrawPeriods = value; } void StyleGraph(TGraph& graph, UInt_t index) const; static void UnCompact(TGraph& g); static void GetYMinAndMax(TGraph& g, Double_t& ymin, Double_t& ymax); static TGraph* RelDif(TGraph& ga, TGraph& gb); private: AliAnalysisMuMuGraphUtil(const AliAnalysisMuMuGraphUtil& rhs); // not implemented AliAnalysisMuMuGraphUtil& operator=(const AliAnalysisMuMuGraphUtil& rhs); // not implemented TString fOCDBPath; // OCDB path std::vector fAttLine; // line attributes std::vector fAttMarker; // marker attributes std::vector fAttFill; // fill attributes std::vector fAttXaxis; // x-axis attributes std::vector fAttYaxis; // y-axis attributes std::vector fDrawOptions; // draw options Bool_t fShouldDrawPeriods; // draw period names on top of graphs ClassDef(AliAnalysisMuMuGraphUtil,0) // utility class to modify/plot graphs }; #endif