StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTrsDetectorReader.cc
1 /***************************************************************************
2  *
3  * $Id: StTrsDetectorReader.cc,v 1.5 2005/09/09 22:12:49 perev Exp $
4  *
5  * Authors: bl, mcbs
6  ***************************************************************************
7  *
8  * Description: Access to the digital information via the abstract
9  * interface
10  ***************************************************************************
11  *
12  * $Log: StTrsDetectorReader.cc,v $
13  * Revision 1.5 2005/09/09 22:12:49 perev
14  * Bug fix + IdTruth added
15  *
16  * Revision 1.4 2003/12/24 13:44:53 fisyak
17  * Add (GEANT) track Id information in Trs; propagate it via St_tpcdaq_Maker; account interface change in StTrsZeroSuppressedReaded in StMixerMaker
18  *
19  * Revision 1.3 2000/03/15 18:08:56 calderon
20  * ZSR is no longer a singleton. Two will be needed for mixer chain.
21  *
22  * Revision 1.2 1999/12/08 02:10:42 calderon
23  * Modified to eliminate warnings on Linux.
24  *
25  * Revision 1.1 1999/11/05 22:18:16 calderon
26  *
27  * Made private copy constructor and operator= in StTrsDigitalSector.
28  * Renamed DigitalSignalGenerators: Fast -> Old, Parameterized -> Fast
29  * and use new "Fast" as default.
30  * Added StTrsDetectorReader and StTrsZeroSuppressedReader for DAQ type
31  * data access.
32  * Removed vestigial for loop in sampleAnalogSignal() method.
33  * Write version of data format in .trs data file.
34  *
35  ***************************************************************************/
36 #include "StTrsDetectorReader.hh"
37 #include "StTrsZeroSuppressedReader.hh"
38 
39 StTrsDetectorReader::StTrsDetectorReader()
40  : mVersion("0"), mTheEvent(0), mZSR(0) { /*nopt*/ }
41 
42 // StTrsDetectorReader::StTrsDetectorReader(string& fd)
43 // : mZSR(0)
44 // {
45 // // fd is the file descriptor
46 // //mTheEvent =
47 // }
48 // StTrsDetectorReader::StTrsDetectorReader(St_DataSet& ev)2
49 // : mZSR(0)
50 // {
51 // // ev is the dataset
52 // //mTheEvent =
53 // }
54 
55 StTrsDetectorReader::StTrsDetectorReader(StTpcRawDataEvent* ev, std::string ver)
56  : mVersion(ver), mTheEvent(ev)
57 {
58  mZSR = new StTrsZeroSuppressedReader(mTheEvent);
59 }
60 
61 StTrsDetectorReader::~StTrsDetectorReader()
62 {
63  delete mZSR;
64 }
65 
66 StTrsZeroSuppressedReader* StTrsDetectorReader::getZeroSuppressedReader(int sector)
67 {
68  if(mZSR->setSector(sector)) return mZSR;
69  return 0;
70 
71 }
72 #if 0
73 ADCRawReader* StTrsDetectorReader::getADCRawReader(int sector)
74 {
75  cerr << "StTrsDetectorReader::getADCRawReader Not Implemented" << endl;
76  return 0;
77 }
78 
79 PedestalReader* StTrsDetectorReader::getPedestalReader(int sector)
80 {
81  cerr << " Not Implemented" << endl;
82  return 0;
83 }
84 
85 PedestalRMSReader* StTrsDetectorReader::getPedestalRMSReader(int sector)
86 {
87  cerr << "StTrsDetectorReader::getPedestalRMSReader Not Implemented" << endl;
88  return 0;
89 }
90 
91 GainReader* StTrsDetectorReader::getGainReader(int sector)
92 {
93  cerr << "StTrsDetectorReader::getGainReader Not Implemented" << endl;
94  return 0;
95 }
96 
97 CPPReader* StTrsDetectorReader::getCPPReader(int sector)
98 {
99  cerr << "StTrsDetectorReader::getCPPReader Not Implemented" << endl;
100  return 0;
101 }
102 
103 BadChannelReader* StTrsDetectorReader::getBadChannelReader(int sector)
104 {
105  cerr << "StTrsDetectorReader::getBadChannelReader Not Implemented" << endl;
106  return 0;
107 }
108 
109 
110 int StTrsDetectorReader::InformBuffers(ZeroSuppressedReader *, int sector) {return 0;}
111 int StTrsDetectorReader::InformBuffers(ADCRawReader *,int sector) {return 0;}
112 int StTrsDetectorReader::InformBuffers(PedestalReader *,int sector) {return 0;}
113 int StTrsDetectorReader::InformBuffers(PedestalRMSReader *,int sector) {return 0;}
114 int StTrsDetectorReader::InformBuffers(GainReader *,int sector) {return 0;}
115 int StTrsDetectorReader::InformBuffers(CPPReader *,int sector) {return 0;}
116 int StTrsDetectorReader::InformBuffers(BadChannelReader *,int sector) {return 0;}
117 int StTrsDetectorReader::InformBuffers(ConfigReader *,int sector) {return 0;}
118 
119 int StTrsDetectorReader::AttachBuffers(ZeroSuppressedReader *, int sector) {return 0;}
120 int StTrsDetectorReader::AttachBuffers(ADCRawReader *, int sector) {return 0;}
121 int StTrsDetectorReader::AttachBuffers(PedestalReader *, int sector) {return 0;}
122 int StTrsDetectorReader::AttachBuffers(PedestalRMSReader *, int sector) {return 0;}
123 int StTrsDetectorReader::AttachBuffers(GainReader *, int sector) {return 0;}
124 int StTrsDetectorReader::AttachBuffers(CPPReader *, int sector) {return 0;}
125 int StTrsDetectorReader::AttachBuffers(BadChannelReader *, int sector) {return 0;}
126 int StTrsDetectorReader::AttachBuffers(ConfigReader *, int sector) {return 0;}
127 
128 int StTrsDetectorReader::MemUsed() {return 0;}
129 #endif