]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALCalibCoefs.h
correction of trivial typo preventing compilation
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALCalibCoefs.h
1 #ifndef ALIEMCALCALIBCOEFS_H
2 #define ALIEMCALCALIBCOEFS_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5
6 /* $Id$ */
7
8 //_________________________________________________________________________
9 //  Table of Calibration coefficients  
10 //  Should be extended.
11 //  Ratio high/low should be added too, pedestals and so on
12 //                  
13 //*-- Author: Aleksei Pavlinov (WSU, Detroit, USA) 
14
15 // --- ROOT system ---
16 #include <TNamed.h>
17 #include <TObjArray.h>
18
19 // unit is GeV
20 class AliEMCALCalibCoef : public TObject {
21   friend class AliEMCALCalibCoefs;
22   friend class AliEMCALFolder;
23   friend class AliEMCALCell;
24  public:
25   virtual const char* GetName() const {return Form("CC%5.5i",fAbsId);}
26   AliEMCALCalibCoef();
27   AliEMCALCalibCoef(const Int_t id, const Double_t c, const Double_t ec);
28   virtual ~AliEMCALCalibCoef() {};
29
30  protected:
31   Int_t    fAbsId; // absolute id of cell 
32   Double_t fCc;    // Calib. coef
33   Double_t fECc;   // Calib. coef. error
34   ClassDef(AliEMCALCalibCoef,1) // Cell calibration information 
35 };
36
37 class TH1F;
38 class AliEMCALCalibData;
39
40 class AliEMCALCalibCoefs : public TNamed {
41  public:
42   enum EEmcalCalibType {kMC, kEQUALIZATION, kMIP, kPI0}; // type of EMCAL calibrations 
43
44   AliEMCALCalibCoefs(); // default constractor
45   AliEMCALCalibCoefs(const char* name, const Int_t nrow);
46   virtual ~AliEMCALCalibCoefs();
47
48   AliEMCALCalibCoefs & operator = (const AliEMCALCalibCoefs  & /*rvalue*/) {
49     // assignement operator requested by coding convention but not needed
50     Fatal("operator =", "not implemented");
51     return *this;
52   };
53   void        AddAt(AliEMCALCalibCoef* r);
54   AliEMCALCalibCoef*  GetTable(Int_t i) const;
55   Int_t       GetSize()  const {return fTable->GetSize();}
56   Int_t       GetNRows() const {return fCurrentInd;}
57   void        Purge() {/* nothing */};
58
59   void  SetCalibMethod(Int_t var) {fCalibMethod=var;}
60   Int_t GetCalibMethod() const {return fCalibMethod;}
61   AliEMCALCalibCoef* GetRow(const int absId);
62   // Get initial Calib Data from DB
63   static AliEMCALCalibCoefs *GetCalibTableFromDb(const char *tn="CCIN", AliEMCALCalibData **calData=0);
64   //  const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB");
65   static TH1F *GetHistOfCalibTableFromDb(const char *tn="CCIN");
66   //const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB");
67   // Create DB calib table
68   static AliEMCALCalibData*  GetCalibTableForDb(const AliEMCALCalibCoefs *tab, 
69   const char* dbLocation="local://.", // current directory
70   const char* coment="pi0 calibration, MC, Jun 2007");
71   // Menu
72   void PrintTable();                 // *MENU*
73   void PrintTable(const Int_t i);    // *MENU*
74   void PrintRec(AliEMCALCalibCoef *r);
75
76   //
77  protected:
78   TObjArray *fTable; // table of CC
79   Int_t fCurrentInd; // Current index
80   Int_t fCalibMethod;  // method of calibration - EEmcalCalibType
81
82   ClassDef(AliEMCALCalibCoefs,2) // Table of Calibration coefficients  
83 };
84
85 #endif // ALIEMCALCalibCoefs_H