]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/SMcalib/AliEMCALMapAPD.h
Coverity corrections
[u/mrichter/AliRoot.git] / EMCAL / SMcalib / AliEMCALMapAPD.h
CommitLineData
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>
10class TString;
11
12static const int fgkEmCalRows = 24; // number of rows per module for EMCAL
13static 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
20class AliEMCALMapAPD : public TObject {
21public:
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
c093846b 33 int CheckForDuplicates(); // see if the same APD numbers occur more than once
34
a8827307 35 virtual ~AliEMCALMapAPD();
36
37 struct AliEMCALSuperModuleMapAPD {
38 Int_t fSuperModuleNum;
39 Int_t fAPDNum[fgkEmCalCols][fgkEmCalRows];
40 };
41
42 // pointer to stored info.
43 Int_t GetNSuperModule() const { return fNSuperModule; };
44 AliEMCALSuperModuleMapAPD * GetSuperModuleData() const { return fSuperModuleData; };
45
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;
50
51protected:
52
53 Int_t fNSuperModule; // Number of supermodules.
54 AliEMCALSuperModuleMapAPD *fSuperModuleData; // SuperModule data
55
56private:
57
58 AliEMCALMapAPD(const AliEMCALMapAPD &);
59 AliEMCALMapAPD &operator = (const AliEMCALMapAPD &);
60
61 ClassDef(AliEMCALMapAPD, 1) //MapAPD data reader
62};
63
64#endif