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"
15 Objects of this class contain info on APD bias settings/voltages
18 // ******* internal class definition *************
19 // 1 SuperModule's worth of info
20 class AliEMCALSuperModuleBiasAPD : public TObject {
22 AliEMCALSuperModuleBiasAPD() : TObject(), // just init values
25 for (int icol=0; icol<AliEMCALGeoParams::fgkEMCALCols; icol++) {
26 for (int irow=0; irow<AliEMCALGeoParams::fgkEMCALRows; irow++) {
27 fElecId[icol][irow] = 0;
29 fVoltage[icol][irow] = 0;
35 Int_t fSuperModuleNum; // SM index
36 Int_t fElecId[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]; // ElectronicsIndex/Address - we keep this to help ensure that the column/row info matches with electronics indices
37 Int_t fDAC[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]; // 0-0x3ff register
38 Float_t fVoltage[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]; // 210 to ca 417 V. (function of DAC setting)
40 ClassDef(AliEMCALSuperModuleBiasAPD, 1) // help class
42 // ******* end of internal class definition *************
44 class AliEMCALBiasAPD : public TObject {
48 // Read and Write txt I/O methods are normally not used, but are useful for
49 // filling the object before it is saved in OCDB
50 void ReadTextBiasAPDInfo(Int_t nSM, const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
51 void WriteTextBiasAPDInfo(const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
52 void ReadRootBiasAPDInfo(const TString &rootFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
53 void ReadTreeBiasAPDInfo(TTree *tree, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
54 void WriteRootBiasAPDInfo(const TString &rootFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
56 virtual ~AliEMCALBiasAPD();
58 // pointer to stored info.
59 Int_t GetNSuperModule() const { return fNSuperModule; };
60 AliEMCALSuperModuleBiasAPD * GetSuperModuleData() const { return fSuperModuleData; };
62 // - via the index in the stored array:
63 virtual AliEMCALSuperModuleBiasAPD GetSuperModuleBiasAPDId(Int_t smIndex) const;
64 // - or via the actual SM number
65 virtual AliEMCALSuperModuleBiasAPD GetSuperModuleBiasAPDNum(Int_t smNum) const;
69 Int_t fNSuperModule; // Number of supermodules.
70 AliEMCALSuperModuleBiasAPD *fSuperModuleData; // SuperModule data
74 AliEMCALBiasAPD(const AliEMCALBiasAPD &);
75 AliEMCALBiasAPD &operator = (const AliEMCALBiasAPD &);
77 ClassDef(AliEMCALBiasAPD, 2) //BiasAPD data reader