StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
FTPV1P0_Reader.hh
1 /***************************************************************************
2  * $Id: FTPV1P0_Reader.hh,v 1.3 2001/06/25 22:59:27 jcs Exp $
3  * Author: Jeff Landgraf, M.J. LeVine, J.Klay, H.Huemmler
4  ***************************************************************************
5  * Description: common definitions for FTPC
6  *
7  *
8  * change log
9  *
10  ***************************************************************************
11  * $Log: FTPV1P0_Reader.hh,v $
12  * Revision 1.3 2001/06/25 22:59:27 jcs
13  * create copy of EventReader pointer
14  *
15  * Revision 1.2 2001/06/19 20:51:22 jeromel
16  * Commited for Janet S.
17  *
18  * Revision 1.1 2000/01/18 18:01:20 levine
19  * Hummler's implementaiton of FTPC reader. Note that method
20  *
21  * FTPV1P0_ZS_SR::getFeeSequences(int Fee, int Pin, int *nSeq,
22  * Sequence **SeqData)
23  *
24  * causes exit() since the required #include file has not yet been
25  * (correctly) implemented.
26  *
27  *
28  *
29  **************************************************************************/
30 #ifndef FTPV1P0_READER_HH
31 #define FTPV1P0_READER_HH
32 #include "StDaqLib/GENERIC/EventReader.hh"
33 //embed version number in bank name
34 #ifdef classname
35 #undef classname
36 #endif
37 #define classname(x) x ## V1P0
38 
39 struct classname(Bank_FTPP);
40 struct classname(Bank_FTPCHAP);
41 struct classname(Bank_FTPRBP);
42 struct classname(Bank_FTPAZIP);
43 struct classname(Bank_FTPMZP);
44 struct classname(Bank_FTPMZP);
45 
46 class FTPV1P0_PADK_SR;
47 
48 struct classname(Bank_FTPADCD);
49 struct classname(Bank_FTPSEQD);
50 struct classname(Bank_FTPADCX);
51 struct classname(Bank_FTPPADK);
52 struct classname(Bank_FTPCPPR);
53 struct classname(Bank_FTPADCR);
54 struct classname(Bank_FTPCFGR);
55 struct classname(Bank_FTPPEDR);
56 struct classname(Bank_FTPRMSR);
57 struct classname(Bank_FTPGAINR);
58 struct classname(Bank_FTPBADR);
59 
60 // Detector Reader Virtual Class
62 {
63  friend class EventReader;
64  friend class FTPV1P0_ZS_SR;
65  friend class FTPV1P0_ADCR_SR;
66  friend class FTPV1P0_PEDR_SR;
67  friend class FTPV1P0_PRMS_SR;
68  friend class FTPV1P0_G_SR;
69  friend class FTPV1P0_CPP_SR;
70  friend class FTPV1P0_BC_SR;
71  friend class FTPV1P0_CR_SR;
72  friend class FTPV1P0_PADK_SR;
73 
74 public:
75  ZeroSuppressedReader *getZeroSuppressedReader(int sector);
76  ADCRawReader *getADCRawReader(int sector);
77  PedestalReader *getPedestalReader(int sector);
78  PedestalRMSReader *getPedestalRMSReader(int sector);
79  GainReader *getGainReader(int sector);
80  CPPReader *getCPPReader(int sector);
81  BadChannelReader *getBadChannelReader(int sector);
82  ConfigReader *getConfigReader(int sector);
83 
84  FTPV1P0_Reader(EventReader *er, classname(Bank_FTPP) *pftp);
85  ~FTPV1P0_Reader();
86 
87  int MemUsed();
88 
89 protected:
90  // MemoryManager MemMan;
91 
92  // copy of EventReader pointer
93  EventReader *ercpy;
94 
95  // Bank Pointers
96  Bank_DATAP *pBankDATAP;
97  classname(Bank_FTPP) *pBankFTPP;
98  classname(Bank_FTPCHAP) *getBankFTPCHAP(int sector);
99  classname(Bank_FTPRBP) *getBankFTPRBP(int sector, classname(Bank_FTPCHAP) *pBank_FTPCHAP);
100  classname(Bank_FTPAZIP) *getBankFTPAZIP(int sector, classname(Bank_FTPRBP) *pBank_FTPRBP);
101  classname(Bank_FTPMZP) *getBankFTPMZP(int sector, classname(Bank_FTPAZIP) *pBank_FTPAZIP);
102  classname(Bank_FTPMZP) *getBankFTPMZP(int sector, classname(Bank_FTPRBP) *pBank_FTPRBP);
103  classname(Bank_FTPMZP) *getBankFTPMZP(int sector);
104 
105  // Sector Reader Buffers
106  FTPV1P0_PADK_SR *getPADKReader(int sector);
107  FTPV1P0_PADK_SR *padk[FTP_SECTORS]; // One PADK for each sector
108 
109  // Useful functions
110  classname(Bank_FTPADCD) *getBankFTPADCD(int sector);
111  classname(Bank_FTPSEQD) *getBankFTPSEQD(int sector);
112  classname(Bank_FTPADCX) *getBankFTPADCX(int sector);
113  classname(Bank_FTPPADK) *getBankFTPPADK(int sector);
114  classname(Bank_FTPCPPR) *getBankFTPCPPR(int sector);
115  classname(Bank_FTPADCR) *getBankFTPADCR(int sector);
116  classname(Bank_FTPCFGR) *getBankFTPCFGR(int sector);
117  classname(Bank_FTPPEDR) *getBankFTPPEDR(int sector);
118  classname(Bank_FTPRMSR) *getBankFTPRMSR(int sector);
119  classname(Bank_FTPGAINR) *getBankFTPGAINR(int sector);
120  classname(Bank_FTPBADR) *getBankFTPBADR(int sector);
121 
122  // Buffer and index functions for the various readers.
123  // Initially these will do nothing. Add functionality
124  // to increase performance
125  int InformBuffers(ZeroSuppressedReader *, int sector) { return FALSE; };
126  int InformBuffers(ADCRawReader *,int sector) { return FALSE; };
127  int InformBuffers(PedestalReader *,int sector) { return FALSE; };
128  int InformBuffers(PedestalRMSReader *,int sector) { return FALSE; };
129  int InformBuffers(GainReader *,int sector) { return FALSE; };
130  int InformBuffers(CPPReader *,int sector) { return FALSE; };
131  int InformBuffers(BadChannelReader *,int sector) { return FALSE; };
132  int InformBuffers(ConfigReader *,int sector) { return FALSE; };
133 
134  int AttachBuffers(ZeroSuppressedReader *, int sector) { return FALSE; };
135  int AttachBuffers(ADCRawReader *, int sector) { return FALSE; };
136  int AttachBuffers(PedestalReader *, int sector) { return FALSE; };
137  int AttachBuffers(PedestalRMSReader *, int sector) { return FALSE; };
138  int AttachBuffers(GainReader *, int sector) { return FALSE; };
139  int AttachBuffers(CPPReader *, int sector) { return FALSE; };
140  int AttachBuffers(BadChannelReader *, int sector) { return FALSE; };
141  int AttachBuffers(ConfigReader *, int sector) { return FALSE; };
142 };
143 #endif
144 
145 
146 
147 
148