]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSConTableDB.h
2985c4b56d27b952ce203f622a14d12f68285876
[u/mrichter/AliRoot.git] / PHOS / AliPHOSConTableDB.h
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
8 //_________________________________________________________________________
9 //  Base Class for PHOS     
10 //                  
11 //*-- Author: (SUBATECH)
12
13
14 // --- ROOT system ---
15 #include "TNamed.h"
16 class TArrayS ;
17
18 // --- Standard library ---
19
20 // --- AliRoot header files ---
21 class AliPHOSGeometry ;
22
23 class AliPHOSConTableDB: public TNamed {
24
25 public:
26   AliPHOSConTableDB() ;          // ctor
27   AliPHOSConTableDB(const char * title) ;          // ctor
28   virtual ~AliPHOSConTableDB() ; // dtor
29
30   //Calculate table from known numbe of raws/columns 
31   //assuming that prototype is situated in the center of 3 PHOS mod.
32   void BuildDB(void) ;
33
34   //set the number of columns in prototype
35   void SetNCols(Int_t ncolumns){fProtoColumns = ncolumns ;}
36   //Set the number of raw in prototype
37   void SetNRaws(Int_t nraws){fProtoRaws = nraws ;}
38
39   //Plot correspondance between Prototype Id and PHOS
40   //Options are "Zoom" - only proto region is plotted
41   //            "PHOS" - presents both PHOS and Proto ids
42   void PlotProtoMap(Option_t * opt="Zoom") ; 
43
44   //Transforms channel number in prototype into AbsId number in PHOS
45   Int_t Raw2AbsId(Int_t raw) ;
46
47   //Transforms AbsId number in PHOS into channel number in prototype 
48   Int_t AbsId2Raw(Int_t AbsId){return 0 ;} //To be implemented
49
50   virtual void Print(Option_t * option="") const ;
51
52 private:
53   AliPHOSGeometry * fGeom ;   //!
54
55   Int_t     fProtoRaws ;        //Parameters
56   Int_t     fProtoColumns ;     //used to calculate
57   Int_t     fRawOffset ;        //correspondance
58   Int_t     fColOffset ;        //map
59   Int_t     fNcrInProto ;    //Number of channels in prototype
60   TArrayS * fAbsIdMap ;      //Map of correspondance between Raw and PHOS ID
61
62   ClassDef(AliPHOSConTableDB,1)  // description 
63
64
65 };
66
67 #endif // AliPHOSCONTABLEDB_H