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 */
8 //_________________________________________________________________________
9 // Table of Calibration coefficients
10 // Should be extended.
12 //*-- Author: Aleksei Pavlinov (WSU, Detroit, USA)
14 // --- ROOT system ---
16 #include <TObjArray.h>
19 class calibCoef : public TObject {
21 virtual const char* GetName() const {return Form("CC%5.5i",absId);}
23 calibCoef(const Int_t id, const Double_t c, const Double_t ec);
24 virtual ~calibCoef() {};
26 Int_t absId; // absolute id of cell
27 Double_t cc; // Calib. coef
28 Double_t eCc; // Calib. coef. error
30 ClassDef(calibCoef,1) // Cell calibration information
34 class AliEMCALCalibData;
36 class AliEMCALCalibCoefs : public TNamed {
38 enum EEmcalCalibType {kMC, kEQUALIZATION, kMIP, kPI0}; // type of EMCAL calibrations
40 AliEMCALCalibCoefs(); // default constractor
41 AliEMCALCalibCoefs(const char* name, const Int_t nrow);
42 virtual ~AliEMCALCalibCoefs();
44 AliEMCALCalibCoefs & operator = (const AliEMCALCalibCoefs & /*rvalue*/) {
45 // assignement operator requested by coding convention but not needed
46 Fatal("operator =", "not implemented");
49 void AddAt(calibCoef* r);
50 calibCoef* GetTable(Int_t i) const;
51 Int_t GetSize() const {return fTable->GetSize();}
52 Int_t GetNRows() const {return fCurrentInd;}
53 void Purge() {/* nothing */};
55 void SetCalibMethod(Int_t var) {fCalibMethod=var;}
56 Int_t GetCalibMethod() {return fCalibMethod;}
57 calibCoef* GetRow(const int absId);
58 // Get initial Calib Data from DB
59 static AliEMCALCalibCoefs *GetCalibTableFromDb(const char *tn="CCIN", AliEMCALCalibData **calData=0);
60 // const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB");
61 static TH1F *GetHistOfCalibTableFromDb(const char *tn="CCIN");
62 //const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB");
63 // Create DB calib table
64 static AliEMCALCalibData* GetCalibTableForDb(const AliEMCALCalibCoefs *tab,
65 const char* dbLocation="local://.", // current directory
66 const char* coment="pi0 calibration, MC, Jun 2007");
68 void PrintTable(); // *MENU*
69 void PrintTable(const Int_t i); // *MENU*
70 void PrintRec(calibCoef *r);
76 Int_t fCalibMethod; // method of calibration - EEmcalCalibType
78 ClassDef(AliEMCALCalibCoefs,2) // Table of Calibration coefficients
81 #endif // ALIEMCALCalibCoefs_H