]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALCalibTimeDepCorrection.h
Changing a default argument in the standard constructor (M. Van Leeuwen)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALCalibTimeDepCorrection.h
CommitLineData
d81e6423 1#ifndef ALIEMCALCALIBTIMEDEPCORRECTION_H
2#define ALIEMCALCALIBTIMEDEPCORRECTION_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id: $ */
8
9#include <TObject.h>
10#include "AliEMCALGeoParams.h"
11class TString;
12class TArrayF;
13
14/*
15 Objects of this class read txt file with APD data
16 AliEMCALCalibTimeDepCorrection inherits TObject only to use AliLog "functions".
17*/
18
19class AliEMCALCalibTimeDepCorrection : public TObject {
20public:
21 AliEMCALCalibTimeDepCorrection();
22
23 // interface methods; getting the whole struct should be more efficient though
24 void InitCorrection(Int_t nSM, Int_t nBins, Float_t val); // assign a certain value to all
25 // use the methods below with caution: take care that your argument ranges are valid
26 void SetCorrection(Int_t smIndex, Int_t iCol, Int_t iRow, Int_t iBin, Float_t val=1.0); // assign a certain value to a given bin
27 Float_t GetCorrection(Int_t smIndex, Int_t iCol, Int_t iRow, Int_t iBin) const; // assign a certain value to a given bin
28
29
30 // Read and Write txt I/O methods are normally not used, but are useful for
31 // filling the object before it is saved in OCDB
32 void ReadCalibTimeDepCorrectionInfo(Int_t nSM, const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
33
34 void WriteCalibTimeDepCorrectionInfo(const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
35
36 virtual ~AliEMCALCalibTimeDepCorrection();
37
38 struct AliEMCALSuperModuleCalibTimeDepCorrection {
39 Int_t fSuperModuleNum;
40 TArrayF fCorrection[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
41 };
42
43 // pointer to stored info.
44 Int_t GetNSuperModule() const { return fNSuperModule; };
45 AliEMCALSuperModuleCalibTimeDepCorrection * GetSuperModuleData() const { return fSuperModuleData; };
46
47 // - via the index in the stored array:
48 virtual AliEMCALSuperModuleCalibTimeDepCorrection GetSuperModuleCalibTimeDepCorrectionId(Int_t smIndex) const;
49 // - or via the actual SM number
50 virtual AliEMCALSuperModuleCalibTimeDepCorrection GetSuperModuleCalibTimeDepCorrectionNum(Int_t smNum) const;
51
220ed45a 52 void SetStartTime(UInt_t ui) { fStartTime = ui; } //
53 void SetNTimeBins(Int_t i) { fNTimeBins = i; } //
54 void SetTimeBinSize(Int_t i) { fTimeBinSize = i; } //
55
56 Int_t GetStartTime() const { return fStartTime; } //
57 Int_t GetNTimeBins() const { return fNTimeBins; } //
58 Int_t GetTimeBinSize() const { return fTimeBinSize; } //
59
d81e6423 60protected:
61
62 Int_t fNSuperModule; // Number of supermodules.
63 AliEMCALSuperModuleCalibTimeDepCorrection *fSuperModuleData; // SuperModule data
64
65private:
66
67 AliEMCALCalibTimeDepCorrection(const AliEMCALCalibTimeDepCorrection &);
68 AliEMCALCalibTimeDepCorrection &operator = (const AliEMCALCalibTimeDepCorrection &);
69
220ed45a 70 UInt_t fStartTime; // timestamp for start of run/first bin
71 Int_t fNTimeBins; // how many timestamp bins do we have
72 Int_t fTimeBinSize; // seconds per time-bin
73
74 ClassDef(AliEMCALCalibTimeDepCorrection, 2) //
d81e6423 75};
76
77#endif