]>
Commit | Line | Data |
---|---|---|
a8827307 | 1 | #ifndef ALIEMCALMAPAPD_H |
2 | #define ALIEMCALMAPAPD_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 | class TString; | |
11 | ||
12 | static const int fgkEmCalRows = 24; // number of rows per module for EMCAL | |
13 | static const int fgkEmCalCols = 48; // number of columns per module for EMCAL | |
14 | ||
15 | /* | |
16 | Objects of this class read txt file with APD data | |
17 | AliEMCALMapAPD inherits TObject only to use AliLog "functions". | |
18 | */ | |
19 | ||
20 | class AliEMCALMapAPD : public TObject { | |
21 | public: | |
22 | AliEMCALMapAPD(); | |
23 | ||
24 | void ReadMapAPDInfoStripBasis(Int_t nSM, const TString &txtFileName); // info file is for nSm=1 to 12 SuperModules | |
25 | void ReadMapAPDInfoSingleStripBasis(Int_t iSM, Int_t iStrip, const TString &txtFileName); // info file is for one single SuperModule and StripModule | |
26 | ||
27 | void ReadMapAPDInfo(Int_t nSM, const TString &txtFileName); // info file is for nSm=1 to 12 SuperModules | |
28 | ||
29 | void WriteMapAPDInfo(const TString &txtFileName); // info file is for nSm=1 to 12 SuperModules | |
30 | ||
31 | void GenerateDummyAPDInfo(Int_t nSM, Int_t * iSM); // for debug purposes | |
32 | ||
33 | virtual ~AliEMCALMapAPD(); | |
34 | ||
35 | struct AliEMCALSuperModuleMapAPD { | |
36 | Int_t fSuperModuleNum; | |
37 | Int_t fAPDNum[fgkEmCalCols][fgkEmCalRows]; | |
38 | }; | |
39 | ||
40 | // pointer to stored info. | |
41 | Int_t GetNSuperModule() const { return fNSuperModule; }; | |
42 | AliEMCALSuperModuleMapAPD * GetSuperModuleData() const { return fSuperModuleData; }; | |
43 | ||
44 | // - via the index in the stored array: | |
45 | virtual AliEMCALSuperModuleMapAPD GetSuperModuleMapAPDId(Int_t smIndex) const; | |
46 | // - or via the actual SM number | |
47 | virtual AliEMCALSuperModuleMapAPD GetSuperModuleMapAPDNum(Int_t smNum) const; | |
48 | ||
49 | protected: | |
50 | ||
51 | Int_t fNSuperModule; // Number of supermodules. | |
52 | AliEMCALSuperModuleMapAPD *fSuperModuleData; // SuperModule data | |
53 | ||
54 | private: | |
55 | ||
56 | AliEMCALMapAPD(const AliEMCALMapAPD &); | |
57 | AliEMCALMapAPD &operator = (const AliEMCALMapAPD &); | |
58 | ||
59 | ClassDef(AliEMCALMapAPD, 1) //MapAPD data reader | |
60 | }; | |
61 | ||
62 | #endif |