#ifndef ALIEMCALCALIBTIMEDEPCORRECTION_H
#define ALIEMCALCALIBTIMEDEPCORRECTION_H
#include <TObject.h>
#include <TObjArray.h>
#include <TArrayF.h>
#include "AliEMCALGeoParams.h"
class TString;
class TTree;
class AliEMCALSuperModuleCalibTimeDepCorrection : public TObject {
public:
AliEMCALSuperModuleCalibTimeDepCorrection(const int smNum=0) : TObject(),
fSuperModuleNum(smNum)
{
for (int icol=0; icol<AliEMCALGeoParams::fgkEMCALCols; icol++) {
for (int irow=0; irow<AliEMCALGeoParams::fgkEMCALRows; irow++) {
fCorrection[icol][irow].Reset();
}
}
}
public:
void SetSuperModuleNum(Int_t i) { fSuperModuleNum = i;};
Int_t GetSuperModuleNum() const { return fSuperModuleNum;};
TArrayF * GetCorrection(int icol, int irow)
{ return &fCorrection[icol][irow]; };
private:
Int_t fSuperModuleNum;
TArrayF fCorrection[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
ClassDef(AliEMCALSuperModuleCalibTimeDepCorrection, 2)
};
class AliEMCALCalibTimeDepCorrection : public TObject {
public:
AliEMCALCalibTimeDepCorrection(const int nSM = AliEMCALGeoParams::fgkEMCALModules);
void InitCorrection(Int_t nSM, Int_t nBins, Float_t val=1.0);
void SetCorrection(Int_t smIndex, Int_t iCol, Int_t iRow, Int_t iBin, Float_t val=1.0);
Float_t GetCorrection(Int_t smIndex, Int_t iCol, Int_t iRow, Int_t iBin) const;
void ReadTextInfo(Int_t nSM, const TString &txtFileName, Bool_t swapSides=kFALSE);
void WriteTextInfo(const TString &txtFileName, Bool_t swapSides=kFALSE);
void ReadRootInfo(const TString &rootFileName, Bool_t swapSides=kFALSE);
void ReadTreeInfo(TTree *treeGlob, TTree *treeCorr, Bool_t swapSides=kFALSE);
void WriteRootInfo(const TString &rootFileName, Bool_t swapSides=kFALSE);
virtual ~AliEMCALCalibTimeDepCorrection();
Int_t GetNSuperModule() const { return fNSuperModule; };
virtual AliEMCALSuperModuleCalibTimeDepCorrection * GetSuperModuleCalibTimeDepCorrectionId(Int_t smIndex) const
{ return (AliEMCALSuperModuleCalibTimeDepCorrection*) fSuperModuleData[smIndex]; };
virtual AliEMCALSuperModuleCalibTimeDepCorrection * GetSuperModuleCalibTimeDepCorrectionNum(Int_t smNum) const;
void SetStartTime(UInt_t ui) { fStartTime = ui; }
void SetNTimeBins(Int_t i) { fNTimeBins = i; }
void SetTimeBinSize(Int_t i) { fTimeBinSize = i; }
Int_t GetStartTime() const { return fStartTime; }
Int_t GetNTimeBins() const { return fNTimeBins; }
Int_t GetTimeBinSize() const { return fTimeBinSize; }
static Int_t GetMaxTimeBins() { return fgkMaxTimeBins; }
protected:
Int_t fNSuperModule;
TObjArray fSuperModuleData;
private:
AliEMCALCalibTimeDepCorrection(const AliEMCALCalibTimeDepCorrection &);
AliEMCALCalibTimeDepCorrection &operator = (const AliEMCALCalibTimeDepCorrection &);
UInt_t fStartTime;
Int_t fNTimeBins;
Int_t fTimeBinSize;
static const Int_t fgkMaxTimeBins = 50;
ClassDef(AliEMCALCalibTimeDepCorrection, 3)
};
#endif
AliEMCALCalibTimeDepCorrection.h:1 AliEMCALCalibTimeDepCorrection.h:2 AliEMCALCalibTimeDepCorrection.h:3 AliEMCALCalibTimeDepCorrection.h:4 AliEMCALCalibTimeDepCorrection.h:5 AliEMCALCalibTimeDepCorrection.h:6 AliEMCALCalibTimeDepCorrection.h:7 AliEMCALCalibTimeDepCorrection.h:8 AliEMCALCalibTimeDepCorrection.h:9 AliEMCALCalibTimeDepCorrection.h:10 AliEMCALCalibTimeDepCorrection.h:11 AliEMCALCalibTimeDepCorrection.h:12 AliEMCALCalibTimeDepCorrection.h:13 AliEMCALCalibTimeDepCorrection.h:14 AliEMCALCalibTimeDepCorrection.h:15 AliEMCALCalibTimeDepCorrection.h:16 AliEMCALCalibTimeDepCorrection.h:17 AliEMCALCalibTimeDepCorrection.h:18 AliEMCALCalibTimeDepCorrection.h:19 AliEMCALCalibTimeDepCorrection.h:20 AliEMCALCalibTimeDepCorrection.h:21 AliEMCALCalibTimeDepCorrection.h:22 AliEMCALCalibTimeDepCorrection.h:23 AliEMCALCalibTimeDepCorrection.h:24 AliEMCALCalibTimeDepCorrection.h:25 AliEMCALCalibTimeDepCorrection.h:26 AliEMCALCalibTimeDepCorrection.h:27 AliEMCALCalibTimeDepCorrection.h:28 AliEMCALCalibTimeDepCorrection.h:29 AliEMCALCalibTimeDepCorrection.h:30 AliEMCALCalibTimeDepCorrection.h:31 AliEMCALCalibTimeDepCorrection.h:32 AliEMCALCalibTimeDepCorrection.h:33 AliEMCALCalibTimeDepCorrection.h:34 AliEMCALCalibTimeDepCorrection.h:35 AliEMCALCalibTimeDepCorrection.h:36 AliEMCALCalibTimeDepCorrection.h:37 AliEMCALCalibTimeDepCorrection.h:38 AliEMCALCalibTimeDepCorrection.h:39 AliEMCALCalibTimeDepCorrection.h:40 AliEMCALCalibTimeDepCorrection.h:41 AliEMCALCalibTimeDepCorrection.h:42 AliEMCALCalibTimeDepCorrection.h:43 AliEMCALCalibTimeDepCorrection.h:44 AliEMCALCalibTimeDepCorrection.h:45 AliEMCALCalibTimeDepCorrection.h:46 AliEMCALCalibTimeDepCorrection.h:47 AliEMCALCalibTimeDepCorrection.h:48 AliEMCALCalibTimeDepCorrection.h:49 AliEMCALCalibTimeDepCorrection.h:50 AliEMCALCalibTimeDepCorrection.h:51 AliEMCALCalibTimeDepCorrection.h:52 AliEMCALCalibTimeDepCorrection.h:53 AliEMCALCalibTimeDepCorrection.h:54 AliEMCALCalibTimeDepCorrection.h:55 AliEMCALCalibTimeDepCorrection.h:56 AliEMCALCalibTimeDepCorrection.h:57 AliEMCALCalibTimeDepCorrection.h:58 AliEMCALCalibTimeDepCorrection.h:59 AliEMCALCalibTimeDepCorrection.h:60 AliEMCALCalibTimeDepCorrection.h:61 AliEMCALCalibTimeDepCorrection.h:62 AliEMCALCalibTimeDepCorrection.h:63 AliEMCALCalibTimeDepCorrection.h:64 AliEMCALCalibTimeDepCorrection.h:65 AliEMCALCalibTimeDepCorrection.h:66 AliEMCALCalibTimeDepCorrection.h:67 AliEMCALCalibTimeDepCorrection.h:68 AliEMCALCalibTimeDepCorrection.h:69 AliEMCALCalibTimeDepCorrection.h:70 AliEMCALCalibTimeDepCorrection.h:71 AliEMCALCalibTimeDepCorrection.h:72 AliEMCALCalibTimeDepCorrection.h:73 AliEMCALCalibTimeDepCorrection.h:74 AliEMCALCalibTimeDepCorrection.h:75 AliEMCALCalibTimeDepCorrection.h:76 AliEMCALCalibTimeDepCorrection.h:77 AliEMCALCalibTimeDepCorrection.h:78 AliEMCALCalibTimeDepCorrection.h:79 AliEMCALCalibTimeDepCorrection.h:80 AliEMCALCalibTimeDepCorrection.h:81 AliEMCALCalibTimeDepCorrection.h:82 AliEMCALCalibTimeDepCorrection.h:83 AliEMCALCalibTimeDepCorrection.h:84 AliEMCALCalibTimeDepCorrection.h:85 AliEMCALCalibTimeDepCorrection.h:86 AliEMCALCalibTimeDepCorrection.h:87 AliEMCALCalibTimeDepCorrection.h:88 AliEMCALCalibTimeDepCorrection.h:89 AliEMCALCalibTimeDepCorrection.h:90 AliEMCALCalibTimeDepCorrection.h:91 AliEMCALCalibTimeDepCorrection.h:92 AliEMCALCalibTimeDepCorrection.h:93 AliEMCALCalibTimeDepCorrection.h:94 AliEMCALCalibTimeDepCorrection.h:95 AliEMCALCalibTimeDepCorrection.h:96 AliEMCALCalibTimeDepCorrection.h:97 AliEMCALCalibTimeDepCorrection.h:98 AliEMCALCalibTimeDepCorrection.h:99 AliEMCALCalibTimeDepCorrection.h:100 AliEMCALCalibTimeDepCorrection.h:101 AliEMCALCalibTimeDepCorrection.h:102 AliEMCALCalibTimeDepCorrection.h:103 AliEMCALCalibTimeDepCorrection.h:104 AliEMCALCalibTimeDepCorrection.h:105 AliEMCALCalibTimeDepCorrection.h:106 AliEMCALCalibTimeDepCorrection.h:107