1 |
kusanagi |
1.1 |
/** @file |
2 |
kusanagi |
1.2 |
* $Author: kusanagi $ |
3 |
|
|
* $Date: 2004/07/06 12:20:23 $ |
4 |
|
|
* $Revision: 1.1.1.1 $ |
5 |
kusanagi |
1.1 |
* |
6 |
|
|
* Header file for the algorithms used to read the techmodel data file. |
7 |
|
|
*/ |
8 |
|
|
|
9 |
|
|
#ifndef READER_ALGORITHM_H |
10 |
|
|
#define READER_ALGORITHM_H |
11 |
|
|
|
12 |
|
|
#include "TechmodelAlgorithm.h" |
13 |
|
|
#include "PscuEvent.h" |
14 |
|
|
|
15 |
|
|
#include "VarDumpEvent.h" |
16 |
|
|
#include "ArrDumpEvent.h" |
17 |
|
|
#include "TabDumpEvent.h" |
18 |
|
|
|
19 |
|
|
#include "CalibCalEvent.h" |
20 |
kusanagi |
1.2 |
#include "CalibTrk1Event.h" |
21 |
|
|
#include "CalibTrk2Event.h" |
22 |
kusanagi |
1.1 |
#include "CalibTrdEvent.h" |
23 |
|
|
#include "CalibTofEvent.h" |
24 |
|
|
#include "CalibS4Event.h" |
25 |
|
|
#include "RunHeaderEvent.h" |
26 |
|
|
#include "RunTrailerEvent.h" |
27 |
|
|
#include "ForcedPktEvent.h" |
28 |
|
|
#include "tmtc/TmtcEvent.h" |
29 |
|
|
#include "mcmd/McmdEvent.h" |
30 |
|
|
#include "log/LogEvent.h" |
31 |
|
|
|
32 |
|
|
#include "physics/TrackerReader.h" |
33 |
|
|
|
34 |
|
|
#define UINT32 unsigned int |
35 |
|
|
#define UINT16 unsigned short |
36 |
|
|
#define BYTE unsigned char |
37 |
|
|
|
38 |
|
|
using namespace std; |
39 |
|
|
|
40 |
|
|
namespace pamela { |
41 |
|
|
namespace techmodel { |
42 |
|
|
/** |
43 |
|
|
* Event reader algorithm for physics events. |
44 |
|
|
*/ |
45 |
|
|
class PhysicsReader: public TechmodelAlgorithm { |
46 |
|
|
private: |
47 |
|
|
/** The reader for tracker physics events. */ |
48 |
|
|
tracker::TrackerReader* trackerReader; |
49 |
|
|
/** The reader for anticoincidence physics events. */ |
50 |
|
|
//anticoinc::AnticounterReader* AcReader; |
51 |
|
|
/** The reader for calorimeter physics events. */ |
52 |
|
|
//calorimeter::CalorimeterReader* CalorimeterReader; |
53 |
|
|
public: |
54 |
|
|
PhysicsReader(void); |
55 |
|
|
virtual void Init(PamelaRun *); |
56 |
|
|
virtual void RunEvent(int, long int); |
57 |
|
|
virtual std::string GetVersionInfo(void) const; |
58 |
|
|
}; |
59 |
|
|
|
60 |
|
|
/** |
61 |
|
|
* Event reader algorithm for housekeeping events. |
62 |
|
|
*/ |
63 |
|
|
/* |
64 |
|
|
class HousekeepingReader: public TechmodelAlgorithm { |
65 |
|
|
private: |
66 |
|
|
public: |
67 |
|
|
HousekeepingReader(void); |
68 |
|
|
virtual void Init(PamelaRun *); |
69 |
|
|
virtual void RunEvent(int); |
70 |
|
|
virtual string GetVersionInfo(void) const; |
71 |
|
|
}; |
72 |
|
|
*/ |
73 |
|
|
|
74 |
|
|
|
75 |
|
|
/** |
76 |
|
|
* Event reader algorithm for TMTC events. |
77 |
|
|
*/ |
78 |
|
|
class TmtcReader: public TechmodelAlgorithm { |
79 |
|
|
//Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC) |
80 |
|
|
static const int TMTC_SUB_LENGTH = 57; |
81 |
|
|
//Length in bytes of the subPacketCRC |
82 |
|
|
static const int TMTC_SUBCRC_LENGTH = 1; |
83 |
|
|
//Length in bytes of the PacketCRC |
84 |
|
|
static const int TMTC_CRC_LENGTH = 2; |
85 |
|
|
private: |
86 |
|
|
/** The TMTC event that is created in the reader. */ |
87 |
|
|
TmtcEvent* Tmtc; |
88 |
|
|
float convert_th(int); |
89 |
|
|
public: |
90 |
|
|
TmtcReader(void); |
91 |
|
|
virtual void Init(PamelaRun *); |
92 |
|
|
virtual void RunEvent(int, long int); |
93 |
|
|
virtual string GetVersionInfo(void) const; |
94 |
|
|
}; |
95 |
|
|
|
96 |
|
|
|
97 |
|
|
/** |
98 |
|
|
* Event reader algorithm for PSCU events. |
99 |
|
|
*/ |
100 |
|
|
class PscuReader: public TechmodelAlgorithm { |
101 |
|
|
private: |
102 |
|
|
/** The PSCU event that is created in the reader. */ |
103 |
|
|
PscuEvent* Pscu; |
104 |
|
|
public: |
105 |
|
|
PscuReader(void); |
106 |
|
|
virtual void Init(PamelaRun *); |
107 |
|
|
virtual void RunEvent(int, long int); |
108 |
|
|
virtual std::string GetVersionInfo(void) const; |
109 |
|
|
}; |
110 |
|
|
|
111 |
|
|
/** |
112 |
|
|
* Event reader algorithm for VarDump events. |
113 |
|
|
*/ |
114 |
|
|
class VarDumpReader: public TechmodelAlgorithm { |
115 |
|
|
private: |
116 |
|
|
/** The VarDump event that is created in the reader. */ |
117 |
|
|
VarDumpEvent* VarDump; |
118 |
|
|
public: |
119 |
|
|
VarDumpReader(void); |
120 |
|
|
virtual void Init(PamelaRun *); |
121 |
|
|
virtual void RunEvent(int, long int); |
122 |
|
|
virtual std::string GetVersionInfo(void) const; |
123 |
|
|
}; |
124 |
|
|
|
125 |
|
|
/** |
126 |
|
|
* Event reader algorithm for ArrDump events. |
127 |
|
|
*/ |
128 |
|
|
class ArrDumpReader: public TechmodelAlgorithm { |
129 |
|
|
private: |
130 |
|
|
/** The ArrDump event that is created in the reader. */ |
131 |
|
|
ArrDumpEvent* ArrDump; |
132 |
|
|
public: |
133 |
|
|
ArrDumpReader(void); |
134 |
|
|
virtual void Init(PamelaRun *); |
135 |
|
|
virtual void RunEvent(int, long int); |
136 |
|
|
virtual std::string GetVersionInfo(void) const; |
137 |
|
|
}; |
138 |
|
|
|
139 |
|
|
/** |
140 |
|
|
* Event reader algorithm for TabDump events. |
141 |
|
|
*/ |
142 |
|
|
class TabDumpReader: public TechmodelAlgorithm { |
143 |
|
|
private: |
144 |
|
|
/** The TabDump event that is created in the reader. */ |
145 |
|
|
TabDumpEvent* TabDump; |
146 |
|
|
public: |
147 |
|
|
TabDumpReader(void); |
148 |
|
|
virtual void Init(PamelaRun *); |
149 |
|
|
virtual void RunEvent(int, long int); |
150 |
|
|
virtual std::string GetVersionInfo(void) const; |
151 |
|
|
}; |
152 |
|
|
|
153 |
|
|
/** |
154 |
|
|
* Event reader algorithm for Mcmd events. |
155 |
|
|
*/ |
156 |
|
|
class McmdReader: public TechmodelAlgorithm { |
157 |
|
|
private: |
158 |
|
|
/** The Mcmd event that is created in the reader. */ |
159 |
|
|
McmdEvent* Mcmd; |
160 |
|
|
public: |
161 |
|
|
McmdReader(void); |
162 |
|
|
virtual void Init(PamelaRun *); |
163 |
|
|
virtual void RunEvent(int, long int); |
164 |
|
|
virtual std::string GetVersionInfo(void) const; |
165 |
|
|
}; |
166 |
|
|
|
167 |
|
|
/** |
168 |
|
|
* Event reader algorithm for Log events. |
169 |
|
|
*/ |
170 |
|
|
class LogReader: public TechmodelAlgorithm { |
171 |
|
|
private: |
172 |
|
|
/** The Log event that is created in the reader. */ |
173 |
|
|
LogEvent* Log; |
174 |
|
|
public: |
175 |
|
|
LogReader(void); |
176 |
|
|
virtual void Init(PamelaRun *); |
177 |
|
|
virtual void RunEvent(int, long int); |
178 |
|
|
virtual std::string GetVersionInfo(void) const; |
179 |
|
|
}; |
180 |
|
|
|
181 |
|
|
/** |
182 |
|
|
* Event reader algorithm for CalibCal events. |
183 |
|
|
*/ |
184 |
|
|
class CalibCalReader: public TechmodelAlgorithm { |
185 |
|
|
private: |
186 |
|
|
/** The CalibCal event that is created in the reader. */ |
187 |
|
|
CalibCalEvent* CalibCal; |
188 |
|
|
public: |
189 |
|
|
CalibCalReader(void); |
190 |
|
|
virtual void Init(PamelaRun *); |
191 |
|
|
virtual void RunEvent(int, long int); |
192 |
|
|
virtual std::string GetVersionInfo(void) const; |
193 |
|
|
}; |
194 |
|
|
|
195 |
|
|
/** |
196 |
kusanagi |
1.2 |
* Event reader algorithm for CalibTrk1 events. |
197 |
kusanagi |
1.1 |
*/ |
198 |
kusanagi |
1.2 |
class CalibTrk1Reader: public TechmodelAlgorithm { |
199 |
kusanagi |
1.1 |
private: |
200 |
kusanagi |
1.2 |
/** The CalibTrk1 event that is created in the reader. */ |
201 |
|
|
CalibTrk1Event* calibTrk1; |
202 |
kusanagi |
1.1 |
public: |
203 |
kusanagi |
1.2 |
CalibTrk1Reader(void); |
204 |
kusanagi |
1.1 |
virtual void Init(PamelaRun *); |
205 |
|
|
virtual void RunEvent(int, long int); |
206 |
|
|
//this type of RUNEvent should be the future develop. |
207 |
|
|
//Pass the buffer not the pointer to file |
208 |
|
|
//virtual void RunEvent(int, long int, char[]); |
209 |
|
|
virtual std::string GetVersionInfo(void) const; |
210 |
|
|
}; |
211 |
|
|
|
212 |
|
|
/** |
213 |
kusanagi |
1.2 |
* Event reader algorithm for CalibTrk2 events. |
214 |
kusanagi |
1.1 |
*/ |
215 |
kusanagi |
1.2 |
class CalibTrk2Reader: public TechmodelAlgorithm { |
216 |
kusanagi |
1.1 |
private: |
217 |
kusanagi |
1.2 |
/** The CalibTrk2 event that is created in the reader. */ |
218 |
|
|
CalibTrk2Event* calibTrk2; |
219 |
kusanagi |
1.1 |
public: |
220 |
kusanagi |
1.2 |
CalibTrk2Reader(void); |
221 |
kusanagi |
1.1 |
virtual void Init(PamelaRun *); |
222 |
|
|
virtual void RunEvent(int, long int); |
223 |
|
|
virtual std::string GetVersionInfo(void) const; |
224 |
|
|
}; |
225 |
|
|
|
226 |
|
|
/** |
227 |
|
|
* Event reader algorithm for CalibTrd events. |
228 |
|
|
*/ |
229 |
|
|
class CalibTrdReader: public TechmodelAlgorithm { |
230 |
|
|
private: |
231 |
|
|
/** The CalibTrd event that is created in the reader. */ |
232 |
|
|
CalibTrdEvent* CalibTrd; |
233 |
|
|
public: |
234 |
|
|
CalibTrdReader(void); |
235 |
|
|
virtual void Init(PamelaRun *); |
236 |
|
|
virtual void RunEvent(int, long int); |
237 |
|
|
virtual std::string GetVersionInfo(void) const; |
238 |
|
|
}; |
239 |
|
|
|
240 |
|
|
/** |
241 |
|
|
* Event reader algorithm for CalibTof events. |
242 |
|
|
*/ |
243 |
|
|
class CalibTofReader: public TechmodelAlgorithm { |
244 |
|
|
private: |
245 |
|
|
/** The CalibTof event that is created in the reader. */ |
246 |
|
|
CalibTofEvent* CalibTof; |
247 |
|
|
public: |
248 |
|
|
CalibTofReader(void); |
249 |
|
|
virtual void Init(PamelaRun *); |
250 |
|
|
virtual void RunEvent(int, long int); |
251 |
|
|
virtual std::string GetVersionInfo(void) const; |
252 |
|
|
}; |
253 |
|
|
|
254 |
|
|
/** |
255 |
|
|
* Event reader algorithm for CalibS4 events. |
256 |
|
|
*/ |
257 |
|
|
class CalibS4Reader: public TechmodelAlgorithm { |
258 |
|
|
private: |
259 |
|
|
/** The CalibCal event that is created in the reader. */ |
260 |
|
|
CalibS4Event* CalibS4; |
261 |
|
|
public: |
262 |
|
|
CalibS4Reader(void); |
263 |
|
|
virtual void Init(PamelaRun *); |
264 |
|
|
virtual void RunEvent(int, long int); |
265 |
|
|
virtual std::string GetVersionInfo(void) const; |
266 |
|
|
}; |
267 |
|
|
|
268 |
|
|
|
269 |
|
|
/** |
270 |
|
|
* Event reader algorithm for RunTrailer events. |
271 |
|
|
*/ |
272 |
|
|
class RunTrailerReader: public TechmodelAlgorithm { |
273 |
|
|
private: |
274 |
|
|
/** The RunTrailer event that is created in the reader. */ |
275 |
|
|
RunTrailerEvent* RunTrailer; |
276 |
|
|
public: |
277 |
|
|
RunTrailerReader(void); |
278 |
|
|
virtual void Init(PamelaRun *); |
279 |
|
|
virtual void RunEvent(int, long int); |
280 |
|
|
virtual std::string GetVersionInfo(void) const; |
281 |
|
|
}; |
282 |
|
|
|
283 |
|
|
/** |
284 |
|
|
* Event reader algorithm for RunHeader events. |
285 |
|
|
*/ |
286 |
|
|
class RunHeaderReader: public TechmodelAlgorithm { |
287 |
|
|
private: |
288 |
|
|
/** The RunHeader event that is created in the reader. */ |
289 |
|
|
RunHeaderEvent* RunHeader; |
290 |
|
|
public: |
291 |
|
|
RunHeaderReader(void); |
292 |
|
|
virtual void Init(PamelaRun *); |
293 |
|
|
virtual void RunEvent(int, long int); |
294 |
|
|
virtual std::string GetVersionInfo(void) const; |
295 |
|
|
}; |
296 |
|
|
|
297 |
|
|
/** |
298 |
|
|
* Event reader algorithm for ForcedPkt events. |
299 |
|
|
*/ |
300 |
|
|
class ForcedPktReader: public TechmodelAlgorithm { |
301 |
|
|
private: |
302 |
|
|
/** The ForcedPkt event that is created in the reader. */ |
303 |
|
|
ForcedPktEvent* ForcedPkt; |
304 |
|
|
public: |
305 |
|
|
ForcedPktReader(void); |
306 |
|
|
virtual void Init(PamelaRun *); |
307 |
|
|
virtual void RunEvent(int, long int); |
308 |
|
|
virtual std::string GetVersionInfo(void) const; |
309 |
|
|
}; |
310 |
|
|
|
311 |
|
|
} |
312 |
|
|
} |
313 |
|
|
|
314 |
|
|
#endif /* READER_ALGORITHM_H */ |
315 |
|
|
|
316 |
|
|
|