StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TPCV1P0_Reader.hh
1 /***************************************************************************
2  * $Id: TPCV1P0_Reader.hh,v 1.4 1999/07/10 21:31:25 levine Exp $
3  * Author: Jeff Landgraf and M.J. LeVine
4  ***************************************************************************
5  * Description: common definitions for TPC
6  *
7  *
8  * change log
9  *
10  ***************************************************************************
11  * $Log: TPCV1P0_Reader.hh,v $
12  * Revision 1.4 1999/07/10 21:31:25 levine
13  * Detectors RICH, EMC, TRG now have their own (defined by each detector) interfaces.
14  * Existing user code will not have to change any calls to TPC-like detector
15  * readers.
16  *
17  * Revision 1.3 1999/07/04 01:43:25 levine
18  * minor changes to make solaris CC compiler happy
19  *
20  * Revision 1.2 1999/07/02 04:43:23 levine
21  * Many changes -
22  * navigates to head of TPCP bank independent of position.
23  * move declarations out of loops where they were upsetting some compilers
24  * suppress output from class libraries with run-time switch EventReader.verbose
25  * added TPCV2P0_CPP_SR::getAsicParams()
26  *
27  *
28  **************************************************************************/
29 #ifndef TPCV1P0_READER_HH
30 #define TPCV1P0_READER_HH
31 #include "StDaqLib/GENERIC/EventReader.hh"
32 //embed version number in bank name
33 #ifdef classname
34 #undef classname
35 #endif
36 #define classname(x) x ## V1P0
37 
38 // Detector Reader Virtual Class
39 
40 struct classname(Bank_TPCP);
41 struct classname(Bank_TPCSECP);
42 struct classname(Bank_TPCRBP);
43 struct classname(Bank_TPCMZP);
44 
45 class TPCV1P0_PADK_SR ;
46 
47 struct classname(Bank_TPCADCD) ;
48 struct classname(Bank_TPCSEQD) ;
49 struct classname(Bank_TPCADCX) ;
50 struct classname(Bank_TPCPADK) ;
51 struct classname(Bank_TPCCPPR) ;
52 struct classname(Bank_TPCADCR) ;
53 struct classname(Bank_TPCCFGR) ;
54 struct classname(Bank_TPCPEDR) ;
55 struct classname(Bank_TPCRMSR) ;
56 struct classname(Bank_TPCGAINR) ;
57 struct classname(Bank_TPCBADR) ;
58 
59 
61 {
62  friend class EventReader;
63  friend class TPCV1P0_ZS_SR;
64  friend class TPCV1P0_ADCR_SR;
65  friend class TPCV1P0_PEDR_SR;
66  friend class TPCV1P0_PRMS_SR;
67  friend class TPCV1P0_G_SR;
68  friend class TPCV1P0_CPP_SR;
69  friend class TPCV1P0_BC_SR;
70  friend class TPCV1P0_CR_SR;
71  friend class TPCV1P0_PADK_SR;
72 
73 public:
74  ZeroSuppressedReader *getZeroSuppressedReader(int sector);
75  ADCRawReader *getADCRawReader(int sector);
76  PedestalReader *getPedestalReader(int sector);
77  PedestalRMSReader *getPedestalRMSReader(int sector);
78  GainReader *getGainReader(int sector);
79  CPPReader *getCPPReader(int sector);
80  BadChannelReader *getBadChannelReader(int sector);
81  ConfigReader *getConfigReader(int sector);
82 
83  TPCV1P0_Reader(EventReader *er, classname(Bank_TPCP) *ptpc);
84  ~TPCV1P0_Reader();
85 
86  int MemUsed();
87 
88 protected:
89  // MemoryManager MemMan;
90 
91  // Bank Pointers
92  Bank_DATAP *pBankDATAP;
93  classname(Bank_TPCP) *pBankTPCP;
94  classname(Bank_TPCSECP) *getBankTPCSECP(int hypersector);
95  classname(Bank_TPCRBP) *getBankTPCRBP(int interleaved_rb, classname(Bank_TPCSECP) *pBank_TPCSECP);
96  classname(Bank_TPCMZP) *getBankTPCMZP(int mz, classname(Bank_TPCRBP) *pBank_TPCRBP);
97  classname(Bank_TPCMZP) *getBankTPCMZP(int sector, int rb, int mz);
98 
99  // Sector Reader Buffers
100  TPCV1P0_PADK_SR *getPADKReader(int sector);
101  TPCV1P0_PADK_SR *padk[24]; // One PADK for each sector
102 
103  // Useful functions
104  classname(Bank_TPCADCD) *getBankTPCADCD(int sector, int rb, int mz);
105  classname(Bank_TPCSEQD) *getBankTPCSEQD(int sector, int rb, int mz);
106  classname(Bank_TPCADCX) *getBankTPCADCX(int sector, int rb, int mz);
107  classname(Bank_TPCPADK) *getBankTPCPADK(int sector, int rb, int mz);
108  classname(Bank_TPCCPPR) *getBankTPCCPPR(int sector, int rb, int mz);
109  classname(Bank_TPCADCR) *getBankTPCADCR(int sector, int rb, int mz);
110  classname(Bank_TPCCFGR) *getBankTPCCFGR(int sector, int rb, int mz);
111  classname(Bank_TPCPEDR) *getBankTPCPEDR(int sector, int rb, int mz);
112  classname(Bank_TPCRMSR) *getBankTPCRMSR(int sector, int rb, int mz);
113  classname(Bank_TPCGAINR) *getBankTPCGAINR(int sector, int rb, int mz);
114  classname(Bank_TPCBADR) *getBankTPCBADR(int sector, int rb, int mz);
115 
116  // Buffer and index functions for the various readers.
117  // Initially these will do nothing. Add functionality
118  // to increase performance
119  int InformBuffers(ZeroSuppressedReader *, int sector) { return FALSE; };
120  int InformBuffers(ADCRawReader *,int sector) { return FALSE; };
121  int InformBuffers(PedestalReader *,int sector) { return FALSE; };
122  int InformBuffers(PedestalRMSReader *,int sector) { return FALSE; };
123  int InformBuffers(GainReader *,int sector) { return FALSE; };
124  int InformBuffers(CPPReader *,int sector) { return FALSE; };
125  int InformBuffers(BadChannelReader *,int sector) { return FALSE; };
126  int InformBuffers(ConfigReader *,int sector) { return FALSE; };
127 
128  int AttachBuffers(ZeroSuppressedReader *, int sector) { return FALSE; };
129  int AttachBuffers(ADCRawReader *, int sector) { return FALSE; };
130  int AttachBuffers(PedestalReader *, int sector) { return FALSE; };
131  int AttachBuffers(PedestalRMSReader *, int sector) { return FALSE; };
132  int AttachBuffers(GainReader *, int sector) { return FALSE; };
133  int AttachBuffers(CPPReader *, int sector) { return FALSE; };
134  int AttachBuffers(BadChannelReader *, int sector) { return FALSE; };
135  int AttachBuffers(ConfigReader *, int sector) { return FALSE; };
136 };
137 
138 #endif
Definition: rb.hh:21