]> git.uio.no Git - u/mrichter/AliRoot.git/blame - OADB/AliOADBPWG2Spectra.h
memory leak fixed
[u/mrichter/AliRoot.git] / OADB / AliOADBPWG2Spectra.h
CommitLineData
e678600d 1#ifndef AliOADBPWG2Spectra_H
2#define AliOADBPWG2Spectra_H
3
4//-------------------------------------------------------------------------
5// OADB interface for the PWG2 spectra
6// Author: Michele Floris, CERN
7//
8// -------------------------------------------------------------------------
9#include "TNamed.h"
10#include "TList.h"
11
12class TList;
13class TH1D;
68037533 14class TH1;
e678600d 15class AliOADBPWG2Spectra : public TNamed {
16
17 public :
18
68037533 19 enum EPWG2SpectraDetector { kITSsa=0, kITSTPC, kTPC, kTOF, kTOFTPC, kNDetectors, kDetDummy };
e678600d 20 enum EPWG2SpectraPIDType { kGaussFit=0, kNSigma, kBayes, kKinks, kNPIDTypes };
21 enum EPWG2SpectraCharge { kPos=0, kNeg, kNCharge };
68037533 22 enum EPWG2SpectraParticle { kPion = 0, kKaon, kProton, kNParticle };
e678600d 23 AliOADBPWG2Spectra();
e3c81f72 24 AliOADBPWG2Spectra(const char* name);
e678600d 25 virtual ~AliOADBPWG2Spectra();
26
27 void Init();
28
29 static const char * GetOADBPWG2SpectraFileName();
e3c81f72 30 const char * GetHistoName(Int_t det, Int_t pidType, Int_t part,
31 Int_t charge, const char * centrTag = 0, Int_t centrBin = -1) ;
32 void AddHisto(TH1D * h, Int_t det, Int_t pidType, Int_t part,
33 Int_t charge, const char * centrTag = 0, Int_t centrBin = -1) ;
34 TH1D * GetHisto(Int_t det, Int_t pidType, Int_t part,
35 Int_t charge, const char * centrTag = 0, Int_t centrBin = -1);
36 TH1D * BookHisto(Int_t det, Int_t pidType, Int_t part,
37 Int_t charge, const char * centrTag = 0, Int_t centrBin = -1) ;
e678600d 38
e3c81f72 39 TH1D * GetHistoStandardBinning(const TH1D* h, Int_t det, Int_t pidType, Int_t part,
40 Int_t charge, const char * centrTag, Int_t centrBin) ;
41
42 static const char * GetDetectorName(Int_t i) {return fgkDetectorNames[i];}
43 static const char * GetPIDName(Int_t i) {return fgkPidTypeNames[i];}
44 static const char * GetChargeName(Int_t i) {return fgkChargeTags[i];}
45 static const char * GetParticleName(Int_t i) {return fgkParticleNames[i];}
68037533 46
47 Bool_t CompareBinning(TH1 * h1, TH1 * h2) ;
e678600d 48
49 virtual void Print (const Option_t * opt = "") const { fHistos->Print(opt); }
50
51// Browsable
52 virtual Bool_t IsFolder() const { return kTRUE; }
53 void Browse(TBrowser *b);
54
e3c81f72 55 static const char * fgkDetectorNames[] ; // Detector tags
56 static const char * fgkPidTypeNames[] ; // Name of the PID technique
57 static const char * fgkChargeTags[] ; // tags for charges
58 static const char * fgkParticleNames[] ; // Particle tags
e678600d 59
60
61 private:
62 AliOADBPWG2Spectra(const AliOADBPWG2Spectra& cont);
63 AliOADBPWG2Spectra& operator=(const AliOADBPWG2Spectra& cont);
64
65 private :
66
67 TList * fHistos; // List containtig all the histograms
e678600d 68
e3c81f72 69 ClassDef(AliOADBPWG2Spectra, 2);
e678600d 70};
71
72#endif