]>
Commit | Line | Data |
---|---|---|
979b5a5f | 1 | #ifndef ALIITSDDLMODULEMAPSDD_H |
2 | #define ALIITSDDLMODULEMAPSDD_H | |
3 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: $ */ | |
7 | ||
8 | /////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // Class to store SDD DDL mapping in the OCDB // | |
11 | // Origin: F.Prino, Torino, prino@to.infn.it // | |
12 | // // | |
13 | /////////////////////////////////////////////////////////////////// | |
14 | ||
15 | #include<TObject.h> | |
1de75654 | 16 | #include<AliITSgeomTGeo.h> |
979b5a5f | 17 | |
18 | ||
19 | class AliITSDDLModuleMapSDD : public TObject { | |
20 | ||
21 | public: | |
22 | ||
23 | AliITSDDLModuleMapSDD(); | |
24 | AliITSDDLModuleMapSDD(Char_t *ddlmapfile); | |
25 | virtual ~AliITSDDLModuleMapSDD(){}; | |
26 | ||
27 | void SetDefaultMap(); | |
28 | void SetDec07part1Map(); | |
29 | void SetDec07part2Map(); | |
94934b95 | 30 | void SetFeb08Map(); |
8ce449c9 | 31 | void SetJun08Map(); |
97d39a18 | 32 | void SetJun09Map(); |
979b5a5f | 33 | void SetDDLMapElement(Int_t iDDL, Int_t iChan, Int_t iMod){fDDLModuleMap[iDDL][iChan]=iMod;} |
34 | void SetDDLMap(AliITSDDLModuleMapSDD* ddlmap); | |
35 | void ReadDDLModuleMap(Char_t *ddlmapfile); | |
36 | ||
37 | Int_t GetModuleNumber(UInt_t iDDL, UInt_t iChan) const {return fDDLModuleMap[iDDL][iChan];} | |
1de75654 | 38 | void FindInDDLMap(Int_t modIndex, Int_t &iDDL, Int_t &iCarlos) const; |
39 | void FindInDDLMap(Int_t lay, Int_t lad, Int_t det, Int_t &iDDL, Int_t &iCarlos) const { | |
40 | FindInDDLMap(AliITSgeomTGeo::GetModuleIndex(lay,lad,det),iDDL,iCarlos); | |
41 | } | |
94934b95 | 42 | static Int_t GetNDDLs(){return kDDLsNumber;} |
43 | static Int_t GetNModPerDDL(){return kModulesPerDDL;} | |
44 | ||
979b5a5f | 45 | |
46 | void PrintDDLMap() const ; | |
47 | ||
48 | protected: | |
49 | ||
50 | enum {kDDLsNumber = 24}; // number of DDLs in SDD | |
51 | enum {kModulesPerDDL = 12}; // number of modules in each DDL | |
52 | ||
53 | Int_t fDDLModuleMap[kDDLsNumber][kModulesPerDDL]; // mapping DDL/module -> module number | |
54 | ||
55 | ClassDef(AliITSDDLModuleMapSDD,1); | |
56 | }; | |
57 | #endif |