//*-- Author : Jochen Markert 18.07.2007 #ifndef __HHISTMAP_H__ #define __HHISTMAP_H__ #include "TString.h" #include "TObjArray.h" #include "TH1.h" #include "TObject.h" #include "TArrayI.h" #include "TFile.h" #include #include using namespace std; class HHistMap : public TObject { private: map hDir; // directories per histogram map < TString , TObjArray* > hM; // TObjArray for histogram pointers map < TString , TArrayI* > hD; // Array for dimensions TFile* output; // store hists later public: HHistMap(TString outputname="") ; ~HHistMap(); const map < TString , TObjArray* >* getMap() { return &hM; } TFile* getFile(){ return output;} void printMap(); Bool_t addHist (TH1* h ,TString dir=""); Bool_t addHistArray(TH1* h[],TString name,TString dir="",Int_t i1max=-1,Int_t i2max=-1,Int_t i3max=-1,Int_t i4max=-1,Int_t i5max=-1); TH1* get(TString name,Int_t i1=0,Int_t i2=-1,Int_t i3=-1,Int_t i4=-1,Int_t i5=-1); Bool_t setOutputFile(TString name=""); Bool_t writeHists(); ClassDef(HHistMap,0) }; #endif /* !__HHISTMAP_H__ */