StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPmdDBUtil.cxx
1 /********************************************************
2  *
3  * $Id: StPmdDBUtil.cxx,v 1.6 2004/06/28 20:49:26 perev Exp $
4  *
5  * Author: Subhasis Chattopadhyay
6  *
7  *********************************************************
8  *
9  * Description: This the class of PMD Utillty which contains
10  * FEE boardwise information.
11  *
12  *********************************************************
13  * $Log: StPmdDBUtil.cxx,v $
14  * Revision 1.6 2004/06/28 20:49:26 perev
15  * obsolete stream replaced
16  *
17  * Revision 1.5 2004/03/23 08:50:23 subhasis
18  * biardDetail put by had
19  *
20  *
21  **********************************************************/
22 #include "Stiostream.h"
23 #include <strings.h>
24 #include <stdlib.h>
25 #include <TROOT.h>
26 #include<TMatrix.h>
27 #include<TArrayF.h>
28 #include <math.h>
29 #include "StPmdGeom.h"
30 #include "StPmdDBUtil.h"
31 ClassImp(StPmdDBUtil)
32 
34 {
35  mPmdGeom = new StPmdGeom();
36  GetBoardInfo();
37 }
38 
40 
41 
43 {
44  Int_t sm,row,col;
45  for(Int_t ism=0;ism<PMD_CRAMS_MAX*2;ism++){
46  for(Int_t irow=0;irow<PMD_ROW_MAX;irow++){
47  for(Int_t icol=0;icol<PMD_COL_MAX;icol++){
48  m_BoardNumber[ism][irow][icol]=0;
49  m_ChannelInBoard[ism][irow][icol]=0;
50  }
51  }
52  }
53 
54  for(Int_t Chain_No=1;Chain_No<=PMD_CHAIN_MAX;Chain_No++){
55  for(Int_t CHANNEL=0;CHANNEL<PMD_CHAIN_CHANNEL_MAX;CHANNEL++){
56  //Int_t Chain_No=(CRAM+1)+(SEC*12)+(BLOCK*24);
57  //?? Int_t channel=CHANNEL+1;
58  Int_t channel=CHANNEL;
59  Int_t chtemp;
60 
61  mPmdGeom->ChainMapping(Chain_No,channel,sm,col,row,chtemp);
62  Int_t Board_no=(Int_t)channel/PMD_BOARD_CH_MAX;
63 // cout<<"#2: Chain,ch,sm,col,row,brd "<<Chain_No<<" "<<channel<<" "<<sm<<" "<<col<<" "<<row<<" "<<Board_no<<endl;
64  m_BoardNumber[sm-1][row-1][col-1]=Board_no;
65  m_ChannelInBoard[sm-1][row-1][col-1]=channel;
66  m_Chain[sm-1][row-1][col-1]=Chain_No;
67  // if(Chain_No>=45) cout<<"m_ChannelInBoard = "<<m_ChannelInBoard[sm-1][row-1][col-1]<<endl;
68  }
69  }
70 }
71 
virtual ~StPmdDBUtil()
A constructor.
Definition: StPmdDBUtil.cxx:39
void GetBoardInfo()
A destructor.
Definition: StPmdDBUtil.cxx:42