]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/background/AliHistoListWrapper.h
Adding a subfolder "background" to PWG1, containing:
[u/mrichter/AliRoot.git] / PWG1 / background / AliHistoListWrapper.h
CommitLineData
dbec3946 1#ifndef ALIHISTOLISTWRAPPER_H
2#define ALIHISTOLISTWRAPPER_H
3
4//-------------------------------------------------------------------------
5// AliHistoListWrapper
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
8// same order.
9//
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
12// relevant list.
13//
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)
17//
18// Author: Michele Floris, CERN
19//
20//-------------------------------------------------------------------------
21
22#include <TNamed.h>
23#include "TList.h"
24
25class TList;
26class TH1;
27class TCollection;
28
29
30
31
32class AliHistoListWrapper : public TNamed
33{
34public:
35 AliHistoListWrapper();
36 AliHistoListWrapper(const char* name, const char* title);
37 AliHistoListWrapper(const AliHistoListWrapper& obj);
38 ~AliHistoListWrapper();
39
40 void AddHistoToList(TObject* h){fList->Add(h);}
41 TList * GetList(){return fList;}
42
43 Long64_t Merge(TCollection* list);
44
45 AliHistoListWrapper& operator=(const AliHistoListWrapper& wrap);
46
47private:
48 TList * fList;
49
50 ClassDef(AliHistoListWrapper, 1);
51};
52
53#endif