StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPmdDBUtil.h
1 
5 /*********************************************************
6  *
7  * $Id: StPmdDBUtil.h,v 1.6 2007/07/12 19:52:31 fisyak Exp $
8  *
9  * Author: Subhasis Chattopadhyay
10  *
11  ************************************************************
12  *
13  * Description: This is the class of PMD Utility which provides
14  * FEE boardwise info.
15  *
16  *************************************************************
17  *
18  * $Log: StPmdDBUtil.h,v $
19  * Revision 1.6 2007/07/12 19:52:31 fisyak
20  * Add includes for ROOT 5.16
21  *
22  * Revision 1.5 2004/04/10 00:48:39 subhasis
23  * 2016 changed to 1728 in DbUtil
24  *
25  * Revision 1.4 2004/03/11 12:17:11 subhasis
26  * *** empty log message ***
27  *
28  * Revision 1.2 2003/12/03 11:55:59 subhasis
29  * Comment header changed by Supriya
30  *
31  *************************************************************/
32 #ifndef STAR_StPmdDBUtil
33 #define STAR_StPmdDBUtil
34 #include <stdlib.h>
35 #include <TMatrix.h>
36 #include "Stsstream.h"
37 #include <math.h>
38 #include "StPmdGeom.h"
39 
40 #define PMD_BOARD_CH_MAX 64
41 #define PMD_BOARD_MAX 1296
42 #define PMD_ROW_MAX 120
43 #define PMD_COL_MAX 120
44 #define PMD_CHAIN_CHANNEL_MAX 1728
45 #define PMD_CHAIN_MAX 48
46 #define PMD_SECTOR 2
47 #define PMD_CRAMS_MAX 12
48 #define PMD_CRAMS_BLOCK 2
49 // made like daqlib/EVP
50 #define PMD_CRAMS_CH_MAX 1728
51 //#define PMD_CRAMS_CH_MAX 2016
52 
53 class StPmdGeom;
54 
55 class StPmdDBUtil {
56  private:
57  StPmdGeom * mPmdGeom;
58  protected:
59  Int_t m_BoardNumber[PMD_CRAMS_MAX*2][PMD_ROW_MAX][PMD_COL_MAX];
60  Int_t m_ChannelInBoard[PMD_CRAMS_MAX*2][PMD_ROW_MAX][PMD_COL_MAX];
61  Int_t m_Chain[PMD_CRAMS_MAX*2][PMD_ROW_MAX][PMD_COL_MAX];
62  public:
63  StPmdDBUtil();
64  virtual ~StPmdDBUtil();
65 
66  void GetBoardInfo();
67  void BoardNumber( Int_t,Int_t,Int_t,Int_t& );
68  void ChannelInBoard( Int_t, Int_t, Int_t, Int_t& );
69  void Chain( Int_t, Int_t, Int_t, Int_t& );
70 
71  ClassDef(StPmdDBUtil, 1)
72  };
73 
74  inline void StPmdDBUtil::BoardNumber(Int_t sm, Int_t row, Int_t col, Int_t& brd)
75 {brd=m_BoardNumber[sm][row][col];}
76 
77 inline void StPmdDBUtil::ChannelInBoard(Int_t sm, Int_t row, Int_t col, Int_t& channel)
78 {channel=m_ChannelInBoard[sm][row][col];}
79 
80 inline void StPmdDBUtil::Chain(Int_t sm, Int_t row, Int_t col, Int_t& chain)
81 {chain=m_Chain[sm][row][col];}
82 #endif
83 
virtual ~StPmdDBUtil()
A constructor.
Definition: StPmdDBUtil.cxx:39
void GetBoardInfo()
A destructor.
Definition: StPmdDBUtil.cxx:42
StPmdDBUtil()
A constructor.
Definition: StPmdDBUtil.cxx:33