StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SVTV1P0_Reader.hh
1 /***************************************************************************
2  *
3  * $Id: SVTV1P0_Reader.hh,v 1.2 2001/04/18 19:47:25 ward Exp $
4  *
5  * Author: M.J. LeVine, Marcelo Munhoz, J. Schambach
6  ***************************************************************************
7  *
8  * Description: common definitions for SVT
9  *
10  ***************************************************************************
11  *
12  * $Log: SVTV1P0_Reader.hh,v $
13  * Revision 1.2 2001/04/18 19:47:25 ward
14  * StDaqLib/SVT stuff from Jo Schambach.
15  *
16  * Revision 1.1 2000/06/06 18:08:31 jml
17  * Initial version of SVT Readers (author: marcello munholz, helen caines)
18  *
19  *
20  **************************************************************************/
21 #ifndef SVTV1P0_READER_HH
22 #define SVTV1P0_READER_HH
23 #include "StDaqLib/GENERIC/EventReader.hh"
24 
25 //embed version number in bank name
26 #ifdef classname
27 #undef classname
28 #endif
29 #define classname(x) x ## V1P0
30 
31 // Detector Reader Virtual Class
32 
33 struct classname(Bank_SVTP);
34 struct classname(Bank_SVTSECP);
35 struct classname(Bank_SVTRBP);
36 struct classname(Bank_SVTMZP);
37 
38 class SVTV1P0_ANODK_SR ;
39 
40 struct classname(Bank_SVTADCD) ;
41 struct classname(Bank_SVTSEQD) ;
42 struct classname(Bank_SVTADCX) ;
43 struct classname(Bank_SVTANODK) ;
44 struct classname(Bank_SVTCPPR) ;
45 struct classname(Bank_SVTADCR) ;
46 struct classname(Bank_SVTCFGR) ;
47 struct classname(Bank_SVTPEDR) ;
48 struct classname(Bank_SVTRMSR) ;
49 struct classname(Bank_SVTGAINR) ;
50 struct classname(Bank_SVTBADR) ;
51 struct classname(Bank_SVTMZCLD) ;
52 
53 
55 {
56  friend class EventReader;
57  friend class SVTV1P0_ZS_SR;
58  friend class SVTV1P0_ADCR_SR;
59  friend class SVTV1P0_PEDR_SR;
60  friend class SVTV1P0_PRMS_SR;
61  friend class SVTV1P0_G_SR;
62  friend class SVTV1P0_CPP_SR;
63  friend class SVTV1P0_BC_SR;
64  friend class SVTV1P0_CR_SR;
65  friend class SVTV1P0_ANODK_SR;
66 
67 public:
68  ZeroSuppressedReader *getZeroSuppressedReader(int wafer);
69  ADCRawReader *getADCRawReader(int wafer);
70  PedestalReader *getPedestalReader(int wafer);
71  PedestalRMSReader *getPedestalRMSReader(int wafer);
72  GainReader *getGainReader(int wafer);
73  CPPReader *getCPPReader(int wafer);
74  BadChannelReader *getBadChannelReader(int wafer);
75  ConfigReader *getConfigReader(int wafer);
76 
77  ZeroSuppressedReader *getZeroSuppressedReader(int barrel, int ladder, int wafer);
78  ADCRawReader *getADCRawReader(int barrel, int ladder, int wafer);
79  PedestalReader *getPedestalReader(int barrel, int ladder, int wafer);
80  PedestalRMSReader *getPedestalRMSReader(int barrel, int ladder, int wafer);
81  GainReader *getGainReader(int barrel, int ladder, int wafer);
82  CPPReader *getCPPReader(int barrel, int ladder, int wafer);
83  BadChannelReader *getBadChannelReader(int barrel, int ladder, int wafer);
84  ConfigReader *getConfigReader(int barrel, int ladder, int wafer);
85 
86  SVTV1P0_Reader(EventReader *er, classname(Bank_SVTP) *psvt);
87  ~SVTV1P0_Reader();
88 
89  int getSCAZero(){return mSCAZero;}
90  int getTimeZero(){return mTimeZero;}
91 
92  int MemUsed();
93 
94 protected:
95  // MemoryManager MemMan;
96 
97  // Number of SCA capacitor corresponding to time bucket zero
98  int mSCAZero;
99  // Time zero given by the read out
100  int mTimeZero;
101 
102  // copy of EventReader pointer
103  EventReader *ercpy;
104 
105  // Bank Pointers
106  Bank_DATAP *pBankDATAP;
107  classname(Bank_SVTP) *pBankSVTP;
108  classname(Bank_SVTSECP) *getBankSVTSECP(int hypersector); // hypersector = 1 or 2
109  // (each corresponds to 12 sectors or RDO systems or RB)
110  classname(Bank_SVTRBP) *getBankSVTRBP(int interleaved_rb, classname(Bank_SVTSECP) *pBank_SVTSECP);
111  classname(Bank_SVTMZP) *getBankSVTMZP(int mz, classname(Bank_SVTRBP) *pBank_SVTRBP);
112  classname(Bank_SVTMZP) *getBankSVTMZP(int hypersector, int rb, int mz); // each rb corresponds to one sector or RDO box
113  classname(Bank_SVTMZCLD) *getBankSVTMZCLD(int hypersector, int rb, int mz);
114  // sector Reader Buffers
115  SVTV1P0_ANODK_SR *getANODKReader();
116  SVTV1P0_ANODK_SR *anodk; // One ANODK for the SVT
117 
118  // Useful functions
119  classname(Bank_SVTADCD) *getBankSVTADCD(int hypersector, int rb, int mz);
120  classname(Bank_SVTSEQD) *getBankSVTSEQD(int hypersector, int rb, int mz);
121  classname(Bank_SVTADCX) *getBankSVTADCX(int hypersector, int rb, int mz);
122  classname(Bank_SVTANODK) *getBankSVTANODK(int hypersector, int rb, int mz);
123  classname(Bank_SVTCPPR) *getBankSVTCPPR(int hypersector, int rb, int mz);
124  classname(Bank_SVTADCR) *getBankSVTADCR(int hypersector, int rb, int mz);
125  classname(Bank_SVTCFGR) *getBankSVTCFGR(int hypersector, int rb, int mz);
126  classname(Bank_SVTPEDR) *getBankSVTPEDR(int hypersector, int rb, int mz);
127  classname(Bank_SVTRMSR) *getBankSVTRMSR(int hypersector, int rb, int mz);
128  classname(Bank_SVTGAINR) *getBankSVTGAINR(int hypersector, int rb, int mz);
129  classname(Bank_SVTBADR) *getBankSVTBADR(int hypersector, int rb, int mz);
130 
131  // Buffer and index functions for the various readers.
132  // Initially these will do nothing. Add functionality
133  // to increase performance
134  int InformBuffers(ZeroSuppressedReader *, int wafer) { return FALSE; };
135  int InformBuffers(ADCRawReader *,int wafer) { return FALSE; };
136  int InformBuffers(PedestalReader *,int wafer) { return FALSE; };
137  int InformBuffers(PedestalRMSReader *,int wafer) { return FALSE; };
138  int InformBuffers(GainReader *,int wafer) { return FALSE; };
139  int InformBuffers(CPPReader *,int wafer) { return FALSE; };
140  int InformBuffers(BadChannelReader *,int wafer) { return FALSE; };
141  int InformBuffers(ConfigReader *,int wafer) { return FALSE; };
142 
143  int InformBuffers(ZeroSuppressedReader *, int barrel, int ladder, int wafer) { return FALSE; };
144  int InformBuffers(ADCRawReader *, int barrel, int ladder, int wafer) { return FALSE; };
145  int InformBuffers(PedestalReader *, int barrel, int ladder, int wafer) { return FALSE; };
146  int InformBuffers(PedestalRMSReader *, int barrel, int ladder, int wafer) { return FALSE; };
147  int InformBuffers(GainReader *, int barrel, int ladder, int wafer) { return FALSE; };
148  int InformBuffers(CPPReader *, int barrel, int ladder, int wafer) { return FALSE; };
149  int InformBuffers(BadChannelReader *, int barrel, int ladder, int wafer) { return FALSE; };
150  int InformBuffers(ConfigReader *, int barrel, int ladder, int wafer) { return FALSE; };
151 
152  int AttachBuffers(ZeroSuppressedReader *, int wafer) { return FALSE; };
153  int AttachBuffers(ADCRawReader *, int wafer) { return FALSE; };
154  int AttachBuffers(PedestalReader *, int wafer) { return FALSE; };
155  int AttachBuffers(PedestalRMSReader *, int wafer) { return FALSE; };
156  int AttachBuffers(GainReader *, int wafer) { return FALSE; };
157  int AttachBuffers(CPPReader *, int wafer) { return FALSE; };
158  int AttachBuffers(BadChannelReader *, int wafer) { return FALSE; };
159  int AttachBuffers(ConfigReader *, int wafer) { return FALSE; };
160 
161  int AttachBuffers(ZeroSuppressedReader *, int barrel, int ladder, int wafer) { return FALSE; };
162  int AttachBuffers(ADCRawReader *, int barrel, int ladder, int wafer) { return FALSE; };
163  int AttachBuffers(PedestalReader *, int barrel, int ladder, int wafer) { return FALSE; };
164  int AttachBuffers(PedestalRMSReader *, int barrel, int ladder, int wafer) { return FALSE; };
165  int AttachBuffers(GainReader *, int barrel, int ladder, int wafer) { return FALSE; };
166  int AttachBuffers(CPPReader *, int barrel, int ladder, int wafer) { return FALSE; };
167  int AttachBuffers(BadChannelReader *, int barrel, int ladder, int wafer) { return FALSE; };
168  int AttachBuffers(ConfigReader *, int barrel, int ladder, int wafer) { return FALSE; };
169 };
170 
171 #endif
Definition: rb.hh:21