1 #ifndef ALIEMCALMAPAPD_H
2 #define ALIEMCALMAPAPD_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
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
16 Objects of this class read txt file with APD data
17 AliEMCALMapAPD inherits TObject only to use AliLog "functions".
20 class AliEMCALMapAPD : public TObject {
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
27 void ReadMapAPDInfo(Int_t nSM, const TString &txtFileName); // info file is for nSm=1 to 12 SuperModules
29 void WriteMapAPDInfo(const TString &txtFileName); // info file is for nSm=1 to 12 SuperModules
31 void GenerateDummyAPDInfo(Int_t nSM, Int_t * iSM); // for debug purposes
33 int CheckForDuplicates(); // see if the same APD numbers occur more than once
35 virtual ~AliEMCALMapAPD();
37 struct AliEMCALSuperModuleMapAPD {
38 Int_t fSuperModuleNum;
39 Int_t fAPDNum[fgkEmCalCols][fgkEmCalRows];
42 // pointer to stored info.
43 Int_t GetNSuperModule() const { return fNSuperModule; };
44 AliEMCALSuperModuleMapAPD * GetSuperModuleData() const { return fSuperModuleData; };
46 // - via the index in the stored array:
47 virtual AliEMCALSuperModuleMapAPD GetSuperModuleMapAPDId(Int_t smIndex) const;
48 // - or via the actual SM number
49 virtual AliEMCALSuperModuleMapAPD GetSuperModuleMapAPDNum(Int_t smNum) const;
53 Int_t fNSuperModule; // Number of supermodules.
54 AliEMCALSuperModuleMapAPD *fSuperModuleData; // SuperModule data
58 AliEMCALMapAPD(const AliEMCALMapAPD &);
59 AliEMCALMapAPD &operator = (const AliEMCALMapAPD &);
61 ClassDef(AliEMCALMapAPD, 1) //MapAPD data reader