]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/background/AliHistoListWrapper.h
Fix Coverity 15062, 15063
[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:
2787875e 35
dbec3946 36 AliHistoListWrapper();
37 AliHistoListWrapper(const char* name, const char* title);
38 AliHistoListWrapper(const AliHistoListWrapper& obj);
39 ~AliHistoListWrapper();
40
41 void AddHistoToList(TObject* h){fList->Add(h);}
42 TList * GetList(){return fList;}
43
44 Long64_t Merge(TCollection* list);
45
46 AliHistoListWrapper& operator=(const AliHistoListWrapper& wrap);
47
2787875e 48protected:
dbec3946 49 TList * fList;
50
2787875e 51private:
52
dbec3946 53 ClassDef(AliHistoListWrapper, 1);
54};
55
56#endif