From baacba226e7251118a35d3380400903d4d454aeb Mon Sep 17 00:00:00 2001 From: hqvigsta Date: Wed, 13 Feb 2013 19:31:21 +0000 Subject: [PATCH] added Output::GetHistogram to MakeRawProduction.C --- .../PHOS_PbPb/macros/production/MakeRawProduction.C | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PWGGA/PHOSTasks/PHOS_PbPb/macros/production/MakeRawProduction.C b/PWGGA/PHOSTasks/PHOS_PbPb/macros/production/MakeRawProduction.C index 38102737724..6f738fed13a 100644 --- a/PWGGA/PHOSTasks/PHOS_PbPb/macros/production/MakeRawProduction.C +++ b/PWGGA/PHOSTasks/PHOS_PbPb/macros/production/MakeRawProduction.C @@ -111,6 +111,7 @@ namespace RawProduction { public: Output(const TString& fileName = "RawProduction.root", const char* options = "UPDATE"); TH1* GetHistogram(const TString& name, const TriggerBin& inBin); + TH1* GetHistogram(const TString& name); void SetDir(const TriggerBin& inBin); void Write(); private: @@ -877,6 +878,17 @@ namespace RawProduction { return 0x0; } } + + TH1* Output::GetHistogram(const TString& name) { + TH1* hist = dynamic_cast( fFile->Get(name.Data()) ); + if( hist ) + return hist; + else { + Printf("ERROR: Output::GetHistogram: %s could not be found", name.Data()); + return 0x0; + } + } + -- 2.43.5