1 #ifndef ALIHISTOLISTWRAPPER_H
2 #define ALIHISTOLISTWRAPPER_H
4 //-------------------------------------------------------------------------
6 // This class is used to contain a list of histograms to be merged
7 // with another list, not necessarily containing the same histos in the
10 // The merging method checks if the lists contain the same histograms
11 // and, if not, adds an empty copy of the missing histograms to the
14 // Can only contain objects inheriting from TH1. Can be useful if you
15 // want to run a task on CAF and book your histograms dinamically
16 // (e.g. in your UserExec method rather than in the UserCreateObject)
18 // Author: Michele Floris, CERN
20 //-------------------------------------------------------------------------
32 class AliHistoListWrapper : public TNamed
36 AliHistoListWrapper();
37 AliHistoListWrapper(const char* name, const char* title);
38 AliHistoListWrapper(const AliHistoListWrapper& obj);
39 ~AliHistoListWrapper();
41 void AddHistoToList(TObject* h){fList->Add(h);}
42 TList * GetList(){return fList;}
44 Long64_t Merge(TCollection* list);
46 AliHistoListWrapper& operator=(const AliHistoListWrapper& wrap);
53 ClassDef(AliHistoListWrapper, 1);