]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEcollection.h
Adding Id to PWG3 classes for better tracking of the coverity defect fixes (Ivana)
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEcollection.h
1 #ifndef ALIHFECOLLECTION_H
2 #define ALIHFECOLLECTION_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */ 
8
9 //                                                                      
10 // Class for AliHFEcollection                                           
11 // Serves as a data container - currently based on internal TList      
12 //                                                                      
13 // Authors:                                                             
14 //   Markus Fasel  <M.Fasel@gsi.de>                                    
15 //   Matus Kalisky <matus.kalisky@cern.ch>  (contact)                   
16 //
17
18
19 //
20 // Provides an option for storing and creating histograms outside the
21 // analysis class
22 // the performance will be improved once the TMap is used insted of TTree
23 //
24
25 /*
26  * vesion: 1.0.1
27  */
28
29
30 #ifndef ROOT_TNamed
31 #include "TNamed.h"
32 #endif
33
34 #ifndef ROOT_THashList
35 #include "THashList.h"
36 #endif
37
38 class TCollection;
39 class TBrowser;
40
41 class AliHFEcollection : public TNamed{
42
43  public:
44   AliHFEcollection();
45   AliHFEcollection(const char* name, const char* title);
46   AliHFEcollection(const AliHFEcollection &c);
47   AliHFEcollection &operator=(const AliHFEcollection &c);
48   virtual ~AliHFEcollection();
49   
50
51   virtual void Browse(TBrowser *b);
52   virtual Bool_t IsFolder() const { return kTRUE; }
53
54   // Set & Create functions
55   Bool_t CreateTH1F(const char* name, const char* title, Int_t nBin, Float_t nMin, Float_t nMax, Int_t logAxis = -1);
56
57   Bool_t CreateTH2F(const char* name, const char* title, Int_t nBinX, Float_t nMinX, Float_t nMaxX, Int_t nBinY, Float_t nMinY, Float_t nMaxY, Int_t logAxis = -1);
58
59   Bool_t CreateTH1Fvector1(Int_t X, const char* name, const char* title, Int_t nBin, Float_t nMin, Float_t nMax, Int_t logAxis = -1);
60   Bool_t CreateTH1Fvector2(Int_t X, Int_t Y, const char* name, const char* title, Int_t nBin, Float_t nMin, Float_t nMax, Int_t logAxis = -1);
61   Bool_t CreateTH2Fvector1(Int_t X, const char* name, const char* title, Int_t nBinX, Float_t nMinX, Float_t nMaxX, Int_t nBinY, Float_t nMinY, Float_t nMaxY, Int_t logAxis = -1);
62   Bool_t CreateProfile(const char* name, const char* title, Int_t nbins, Double_t xmin, Double_t xmax);
63   Bool_t CreateTHnSparse(const char* name, const char* title, Int_t dim, Int_t* nbins, Double_t* xmin, Double_t* xmax);
64
65   Bool_t BinLogAxis(const char* name, Int_t dim);
66   Bool_t Sumw2(const char*name);
67     
68
69   Long64_t Merge(TCollection *list);
70
71   // Get functions
72   TList* GetList() const { return fList; }
73   TObject* Get(const char* name); 
74
75   // Fill functions
76   Bool_t Fill(const char* name, Double_t v);
77   Bool_t Fill(const char* name, Int_t v);
78   Bool_t Fill(const char* name, Int_t X, Double_t v);
79   Bool_t Fill(const char* name, Int_t X, Int_t Y, Double_t v);
80   Bool_t Fill(const char* name, Double_t v1, Double_t v2);
81   Bool_t Fill(const char* name, Int_t X, Double_t v1, Double_t v2);
82   Bool_t Fill(const char* name, Double_t* entry, Double_t weight = 1);
83  private:
84   Bool_t CheckObject(const char* name);
85    void Copy(TObject &ref) const;
86
87  private:
88   THashList*                           fList;      // Object container
89
90   ClassDef(AliHFEcollection, 1)
91
92 };
93
94 #endif