]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - EMCAL/AliEMCALCalibCoefs.h
fix effc++ warnings
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALCalibCoefs.h
... / ...
CommitLineData
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
20class 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
37class TH1F;
38class AliEMCALCalibData;
39
40class AliEMCALCalibCoefs : public TNamed {
41 public:
42 enum EEmcalCalibType {kMC, kEQUALIZATION, kMIP, kPI0}; // type of EMCAL calibrations
43
44 AliEMCALCalibCoefs(); // default constractor
45 AliEMCALCalibCoefs(const AliEMCALCalibCoefs& coefs); // copy constractor
46 AliEMCALCalibCoefs(const char* name, const Int_t nrow);
47 virtual ~AliEMCALCalibCoefs();
48
49 AliEMCALCalibCoefs & operator = (const AliEMCALCalibCoefs & /*rvalue*/) {
50 // assignement operator requested by coding convention but not needed
51 Fatal("operator =", "not implemented");
52 return *this;
53 };
54 void AddAt(AliEMCALCalibCoef* r);
55 AliEMCALCalibCoef* GetTable(Int_t i) const;
56 Int_t GetSize() const {return fTable->GetSize();}
57 Int_t GetNRows() const {return fCurrentInd;}
58 void Purge() {/* nothing */};
59
60 void SetCalibMethod(Int_t var) {fCalibMethod=var;}
61 Int_t GetCalibMethod() const {return fCalibMethod;}
62 AliEMCALCalibCoef* GetRow(const int absId);
63 // Get initial Calib Data from DB
64 static AliEMCALCalibCoefs *GetCalibTableFromDb(const char *tn="CCIN", AliEMCALCalibData **calData=0);
65 // const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB");
66 static TH1F *GetHistOfCalibTableFromDb(const char *tn="CCIN");
67 //const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB");
68 // Create DB calib table
69 static AliEMCALCalibData* GetCalibTableForDb(const AliEMCALCalibCoefs *tab,
70 const char* dbLocation="local://.", // current directory
71 const char* coment="pi0 calibration, MC, Jun 2007");
72 // Menu
73 void PrintTable(); // *MENU*
74 void PrintTable(const Int_t i); // *MENU*
75 void PrintRec(AliEMCALCalibCoef *r);
76
77 //
78 protected:
79 TObjArray *fTable; // table of CC
80 Int_t fCurrentInd; // Current index
81 Int_t fCalibMethod; // method of calibration - EEmcalCalibType
82
83 ClassDef(AliEMCALCalibCoefs,2) // Table of Calibration coefficients
84};
85
86#endif // ALIEMCALCalibCoefs_H