]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/Nuclei/B2/AliLnHistoMap.h
Adding Eulogios analysis
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / B2 / AliLnHistoMap.h
1 #ifndef ALILNHISTOMAP_H
2 #define ALILNHISTOMAP_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 // class for handling histograms
8 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
9
10 #include <TObject.h>
11 #include <TMap.h>
12
13 class TString;
14 class TH1D;
15 class TH2D;
16
17 class AliLnHistoMap: public TObject
18 {
19   public:
20         AliLnHistoMap();
21         
22         virtual ~AliLnHistoMap();
23         
24         virtual Int_t Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0);
25         virtual Int_t Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const;
26         
27         TObject* Get(const TString& keyname) const { return fHistoMap->GetValue(keyname.Data()); }
28         TObject* Get(const char* keyname) const { return fHistoMap->GetValue(keyname); }
29         
30         TObject* Add(const TString& keyname, TObject* value);
31         
32         TH1D* Add(const TString& name, Int_t nbins, Double_t xmin, Double_t xmax, const TString& title="", const TString& xlabel="", const TString& ylabel="");
33         
34         TH2D* Add(const TString& name, Int_t xbins, Double_t xmin, Double_t xmax, Int_t ybins, Double_t ymin, Double_t ymax, const TString& title="", const TString& xlabel="", const TString& ylabel="");
35         
36   private:
37
38         AliLnHistoMap(const AliLnHistoMap& other);
39         AliLnHistoMap& operator=(const AliLnHistoMap& other);
40
41   private:
42  
43         TMap* fHistoMap; //-> histogram map
44         
45         ClassDef(AliLnHistoMap, 1)
46 };
47
48 #endif // ALILNHISTOMAP_H