]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALBiasAPD.h
first version of new classes for time-dependent corrections; not yet used in Preproce...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALBiasAPD.h
CommitLineData
d81e6423 1#ifndef ALIEMCALBIASAPD_H
2#define ALIEMCALBIASAPD_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;
12
13/*
14 Objects of this class read txt file with APD data
15 AliEMCALBiasAPD inherits TObject only to use AliLog "functions".
16*/
17
18class AliEMCALBiasAPD : public TObject {
19public:
20 AliEMCALBiasAPD();
21
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
25
26 void WriteBiasAPDInfo(const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
27
28 virtual ~AliEMCALBiasAPD();
29
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)
35 };
36
37 // pointer to stored info.
38 Int_t GetNSuperModule() const { return fNSuperModule; };
39 AliEMCALSuperModuleBiasAPD * GetSuperModuleData() const { return fSuperModuleData; };
40
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;
45
46protected:
47
48 Int_t fNSuperModule; // Number of supermodules.
49 AliEMCALSuperModuleBiasAPD *fSuperModuleData; // SuperModule data
50
51private:
52
53 AliEMCALBiasAPD(const AliEMCALBiasAPD &);
54 AliEMCALBiasAPD &operator = (const AliEMCALBiasAPD &);
55
56 ClassDef(AliEMCALBiasAPD, 1) //BiasAPD data reader
57};
58
59#endif