1 #ifndef ALIEMCALBIASAPD_H
2 #define ALIEMCALBIASAPD_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 #include "AliEMCALGeoParams.h"
14 Objects of this class read txt file with APD data
15 AliEMCALBiasAPD inherits TObject only to use AliLog "functions".
18 class AliEMCALBiasAPD : public TObject {
22 // Read and Write txt I/O methods are normally not used, but are useful for
23 // filling the object before it is saved in OCDB
24 void ReadBiasAPDInfo(Int_t nSM, const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
26 void WriteBiasAPDInfo(const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
28 virtual ~AliEMCALBiasAPD();
30 struct AliEMCALSuperModuleBiasAPD {
31 Int_t fSuperModuleNum;
32 Int_t fElecId[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]; // ElectronicsIndex/Address - we keep this to help ensure that the column/row info matches with electronics indices
33 Int_t fDAC[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]; // 0-0x3ff register
34 Float_t fVoltage[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]; // 210 to ca 417 V. (function of DAC setting)
37 // pointer to stored info.
38 Int_t GetNSuperModule() const { return fNSuperModule; };
39 AliEMCALSuperModuleBiasAPD * GetSuperModuleData() const { return fSuperModuleData; };
41 // - via the index in the stored array:
42 virtual AliEMCALSuperModuleBiasAPD GetSuperModuleBiasAPDId(Int_t smIndex) const;
43 // - or via the actual SM number
44 virtual AliEMCALSuperModuleBiasAPD GetSuperModuleBiasAPDNum(Int_t smNum) const;
48 Int_t fNSuperModule; // Number of supermodules.
49 AliEMCALSuperModuleBiasAPD *fSuperModuleData; // SuperModule data
53 AliEMCALBiasAPD(const AliEMCALBiasAPD &);
54 AliEMCALBiasAPD &operator = (const AliEMCALBiasAPD &);
56 ClassDef(AliEMCALBiasAPD, 1) //BiasAPD data reader