]>
Commit | Line | Data |
---|---|---|
f74edaba | 1 | #ifndef ALIPHOSCONTABLEDB_H |
2 | #define ALIPHOSCONTABLEDB_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
702ab87e | 8 | /* History of cvs commits: |
9 | * | |
10 | * $Log$ | |
11 | */ | |
12 | ||
f74edaba | 13 | //_________________________________________________________________________ |
cd228525 | 14 | // Class for PHOS connection table, i.e. correspondence between |
15 | // "cable number" and PHOS AbsId number. | |
f74edaba | 16 | // |
cd228525 | 17 | //*-- Author: D.Peressounko "RRC Kurchatov Institute" |
f74edaba | 18 | |
19 | ||
20 | // --- ROOT system --- | |
21 | #include "TNamed.h" | |
22 | class TArrayS ; | |
23 | ||
24 | // --- Standard library --- | |
25 | ||
26 | // --- AliRoot header files --- | |
27 | class AliPHOSGeometry ; | |
28 | ||
29 | class AliPHOSConTableDB: public TNamed { | |
30 | ||
31 | public: | |
32 | AliPHOSConTableDB() ; // ctor | |
33 | AliPHOSConTableDB(const char * title) ; // ctor | |
540e818b | 34 | |
35 | AliPHOSConTableDB(const AliPHOSConTableDB & cdb) ; // cpy ctor | |
f74edaba | 36 | virtual ~AliPHOSConTableDB() ; // dtor |
37 | ||
cd228525 | 38 | //Calculate table from known number of raws/columns |
f74edaba | 39 | //assuming that prototype is situated in the center of 3 PHOS mod. |
40 | void BuildDB(void) ; | |
cd228525 | 41 | Int_t GetNchanels()const {return fNcrInProto ; } |
42 | Int_t GetNRaws()const{return fProtoRaws ;} | |
43 | Int_t GetNColumns()const{return fProtoColumns ;} | |
f74edaba | 44 | |
45 | //set the number of columns in prototype | |
46 | void SetNCols(Int_t ncolumns){fProtoColumns = ncolumns ;} | |
47 | //Set the number of raw in prototype | |
48 | void SetNRaws(Int_t nraws){fProtoRaws = nraws ;} | |
49 | ||
50 | //Plot correspondance between Prototype Id and PHOS | |
51 | //Options are "Zoom" - only proto region is plotted | |
52 | // "PHOS" - presents both PHOS and Proto ids | |
53 | void PlotProtoMap(Option_t * opt="Zoom") ; | |
54 | ||
f74edaba | 55 | //Transforms channel number in prototype into AbsId number in PHOS |
cd228525 | 56 | Int_t Raw2AbsId(Int_t raw)const ; |
f74edaba | 57 | |
58 | //Transforms AbsId number in PHOS into channel number in prototype | |
cd228525 | 59 | Int_t AbsId2Raw(Int_t AbsId)const ; |
f74edaba | 60 | |
702ab87e | 61 | virtual void Print(const Option_t * = "") const ; |
f74edaba | 62 | |
cd228525 | 63 | |
64 | AliPHOSConTableDB& operator=(const AliPHOSConTableDB& cdb) ; | |
65 | ||
f74edaba | 66 | private: |
cd228525 | 67 | AliPHOSGeometry * fGeom ; //! PHOS geometry class |
68 | ||
69 | Int_t fProtoRaws ; // Parameters | |
70 | Int_t fProtoColumns ; // used to calculate | |
71 | Int_t fRawOffset ; // correspondance | |
72 | Int_t fColOffset ; // map | |
73 | Int_t fNcrInProto ; //Number of channels in prototype | |
74 | Int_t fMinAbsId ; //Minimal AbsId, corresponding to some prototype cristall. | |
75 | Int_t fMaxAbsId ; //Maximal AbsId, corresponding to some prototype cristall | |
76 | TArrayS * fAbsIdMap ; //Map of correspondance between Raw and PHOS ID | |
77 | TArrayS * fRawIdMap ; //Map of correspondance between AbsId and Raw | |
f74edaba | 78 | |
79 | ClassDef(AliPHOSConTableDB,1) // description | |
80 | ||
81 | ||
82 | }; | |
83 | ||
84 | #endif // AliPHOSCONTABLEDB_H |