1 |
/** @file |
2 |
* $Author: mocchiut $ |
3 |
* $Date: 2008/09/23 07:20:24 $ |
4 |
* $Revision: 1.1.1.1 $ |
5 |
* |
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 |
|
16 |
#include "endrun/PhysEndRunEvent.h" |
17 |
#include "CalibCalPulse1Event.h" |
18 |
#include "CalibCalPulse2Event.h" |
19 |
#include "CalibTrkBothEvent.h" |
20 |
#include "CalibTrk1Event.h" |
21 |
#include "CalibTrk2Event.h" |
22 |
#include "CalibTofEvent.h" |
23 |
#include "CalibS4Event.h" |
24 |
#include "CalibCalPedEvent.h" |
25 |
#include "Calib1_Ac1Event.h" |
26 |
#include "Calib2_Ac1Event.h" |
27 |
#include "Calib1_Ac2Event.h" |
28 |
#include "Calib2_Ac2Event.h" |
29 |
#include "CalibCalEvent.h" |
30 |
#include "RunHeaderEvent.h" |
31 |
#include "RunTrailerEvent.h" |
32 |
#include "CalibHeaderEvent.h" |
33 |
#include "CalibTrailerEvent.h" |
34 |
#include "InitHeaderEvent.h" |
35 |
#include "InitTrailerEvent.h" |
36 |
#include "EventTrkEvent.h" |
37 |
#include "log/LogEvent.h" |
38 |
#include "varDump/VarDumpEvent.h" |
39 |
#include "arrDump/ArrDumpEvent.h" |
40 |
#include "tabDump/TabDumpEvent.h" |
41 |
#include "tmtc/TmtcEvent.h" |
42 |
#include "mcmd/McmdEvent.h" |
43 |
#include "ForcedFECmdEvent.h" |
44 |
#include "Ac1InitEvent.h" |
45 |
#include "CalInitEvent.h" |
46 |
#include "TrkInitEvent.h" |
47 |
#include "TofInitEvent.h" |
48 |
#include "TrgInitEvent.h" |
49 |
#include "NdInitEvent.h" |
50 |
#include "S4InitEvent.h" |
51 |
#include "Ac2InitEvent.h" |
52 |
#include "CalAlarmEvent.h" |
53 |
#include "Ac1AlarmEvent.h" |
54 |
#include "TrkAlarmEvent.h" |
55 |
#include "TrgAlarmEvent.h" |
56 |
#include "TofAlarmEvent.h" |
57 |
#include "S4AlarmEvent.h" |
58 |
#include "Ac2AlarmEvent.h" |
59 |
#include "tsbt/TsbTEvent.h" |
60 |
#include "tsbb/TsbBEvent.h" |
61 |
|
62 |
#include "physics/TrackerReader.h" |
63 |
#include "physics/AnticounterReader.h" |
64 |
#include "physics/CalorimeterReader.h" |
65 |
#include "physics/NeutronDetectorReader.h" |
66 |
#include "physics/S4Reader.h" |
67 |
#include "physics/TofReader.h" |
68 |
#include "physics/TriggerReader.h" |
69 |
|
70 |
|
71 |
#include "Ac2AlarmEvent.h" |
72 |
#include <fstream> |
73 |
|
74 |
extern "C" { |
75 |
#include "CRC.h" |
76 |
} |
77 |
|
78 |
using namespace std; |
79 |
|
80 |
namespace pamela { |
81 |
namespace techmodel { |
82 |
|
83 |
/** |
84 |
Event reader algorithm for PhysEndRun events. |
85 |
* |
86 |
*/ |
87 |
class PhysEndRunReader: public TechmodelAlgorithm { |
88 |
private: |
89 |
/** The PhysEndRun event that is created in the reader. */ |
90 |
PhysEndRunEvent* physEndRun; |
91 |
|
92 |
public: |
93 |
/** |
94 |
* Constructor |
95 |
* @param |
96 |
* @return |
97 |
*/ |
98 |
PhysEndRunReader(void); |
99 |
virtual void Init(PamelaRun *); |
100 |
//virtual void PKT_RunEvent(char*, long int=0)throw (WrongCRCException_PKTUsed); |
101 |
virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
102 |
virtual std::string GetVersionInfo(void) const; |
103 |
TObject *GetPtr(TString name=""){return this;}; |
104 |
}; |
105 |
|
106 |
/********************************************** |
107 |
* Event reader algorithm for CalibCalPulse1 events. |
108 |
**********************************************/ |
109 |
class CalibCalPulse1Reader: public TechmodelAlgorithm { |
110 |
private: |
111 |
/** The CalibCalPulse1 event that is created in the reader. */ |
112 |
CalibCalPulse1Event* calibCalPulse1; |
113 |
public: |
114 |
CalibCalPulse1Reader(void); |
115 |
virtual void Init(PamelaRun *); |
116 |
virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
117 |
virtual std::string GetVersionInfo(void) const; |
118 |
TObject *GetPtr(TString name=""){return this;}; |
119 |
}; |
120 |
|
121 |
|
122 |
/********************************************** |
123 |
* Event reader algorithm for CalibCalPulse2 events. |
124 |
**********************************************/ |
125 |
class CalibCalPulse2Reader: public TechmodelAlgorithm { |
126 |
private: |
127 |
/** The CalibCalPulse2 event that is created in the reader. */ |
128 |
CalibCalPulse2Event* calibCalPulse2; |
129 |
public: |
130 |
CalibCalPulse2Reader(void); |
131 |
virtual void Init(PamelaRun *); |
132 |
virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
133 |
virtual std::string GetVersionInfo(void) const; |
134 |
TObject *GetPtr(TString name=""){return this;}; |
135 |
}; |
136 |
|
137 |
|
138 |
/********************************************** |
139 |
* Event reader algorithm for physics events. |
140 |
**********************************************/ |
141 |
class PhysicsReader: public TechmodelAlgorithm { |
142 |
private: |
143 |
/** The reader for tracker physics events. */ |
144 |
tracker::TrackerReader* trackerReader; |
145 |
anticounter::AnticounterReader* anticounterReader; |
146 |
calorimeter::CalorimeterReader* calorimeterReader; |
147 |
neutron::NeutronDetectorReader* neutronReader; |
148 |
S4::S4Reader* s4Reader; |
149 |
tof::TofReader* tofReader; |
150 |
trigger::TriggerReader* triggerReader; |
151 |
public: |
152 |
PhysicsReader(void); |
153 |
virtual void Init(PamelaRun *); |
154 |
virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
155 |
|
156 |
virtual std::string GetVersionInfo(void) const; |
157 |
TObject *GetPtr(TString name=""){return this;}; |
158 |
}; |
159 |
|
160 |
/********************************************** |
161 |
* Event reader algorithm for CalibTrkBoth events. |
162 |
**********************************************/ |
163 |
class CalibTrkBothReader: public TechmodelAlgorithm { |
164 |
private: |
165 |
/** The CalibTrkBoth event that is created in the reader. */ |
166 |
CalibTrkBothEvent* calibTrkBoth; |
167 |
public: |
168 |
CalibTrkBothReader(void); |
169 |
virtual void Init(PamelaRun *); |
170 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
171 |
|
172 |
virtual std::string GetVersionInfo(void) const; |
173 |
TObject *GetPtr(TString name=""){return this;}; |
174 |
}; |
175 |
|
176 |
|
177 |
/********************************************** |
178 |
<<<<<<< ReaderAlgorithms.h |
179 |
* Event reader algorithm for CalibTrkBoth events. |
180 |
**********************************************/ |
181 |
/* class CalibTrkBothReader: public TechmodelAlgorithm { |
182 |
private: |
183 |
// The CalibTrkBoth event that is created in the reader. |
184 |
CalibTrkBothEvent* calibTrkBoth; |
185 |
public: |
186 |
CalibTrkBothReader(void); |
187 |
virtual void Init(PamelaRun *); |
188 |
virtual void RunEvent(int, long int) throw (Exception); |
189 |
//this type of RUNEvent should be the future develop. |
190 |
//Pass the buffer not the pointer to file |
191 |
//virtual void RunEvent(int, long int, char[]); |
192 |
virtual std::string GetVersionInfo(void) const; |
193 |
}; |
194 |
*/ |
195 |
|
196 |
/********************************************** |
197 |
======= |
198 |
>>>>>>> 6.1 |
199 |
* Event reader algorithm for CalibTrk1 events. |
200 |
**********************************************/ |
201 |
class CalibTrk1Reader: public TechmodelAlgorithm { |
202 |
private: |
203 |
/** The CalibTrk1 event that is created in the reader. */ |
204 |
CalibTrk1Event* calibTrk1; |
205 |
public: |
206 |
CalibTrk1Reader(void); |
207 |
virtual void Init(PamelaRun *); |
208 |
virtual void PKT_RunEvent(char*, long int=0) throw (CalibException); |
209 |
virtual std::string GetVersionInfo(void) const; |
210 |
TObject *GetPtr(TString name=""){return this;}; |
211 |
}; |
212 |
|
213 |
/********************************************** |
214 |
* Event reader algorithm for CalibTrk2 events. |
215 |
**********************************************/ |
216 |
class CalibTrk2Reader: public TechmodelAlgorithm { |
217 |
private: |
218 |
/** The CalibTrk2 event that is created in the reader. */ |
219 |
CalibTrk2Event* calibTrk2; |
220 |
public: |
221 |
CalibTrk2Reader(void); |
222 |
virtual void Init(PamelaRun *); |
223 |
virtual void PKT_RunEvent(char*, long int=0) throw (CalibException); |
224 |
virtual std::string GetVersionInfo(void) const; |
225 |
TObject *GetPtr(TString name=""){return this;}; |
226 |
}; |
227 |
|
228 |
|
229 |
/********************************************** |
230 |
* Event reader algorithm for CalibTof events. |
231 |
**********************************************/ |
232 |
class CalibTofReader: public TechmodelAlgorithm { |
233 |
private: |
234 |
/** The CalibTof event that is created in the reader. */ |
235 |
CalibTofEvent* calibTof; |
236 |
public: |
237 |
CalibTofReader(void); |
238 |
virtual void Init(PamelaRun *); |
239 |
virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
240 |
virtual std::string GetVersionInfo(void) const; |
241 |
TObject *GetPtr(TString name=""){return this;}; |
242 |
}; |
243 |
|
244 |
|
245 |
/********************************************** |
246 |
* Event reader algorithm for CalibS4 events. |
247 |
**********************************************/ |
248 |
class CalibS4Reader: public TechmodelAlgorithm { |
249 |
private: |
250 |
/** The CalibCal event that is created in the reader. */ |
251 |
CalibS4Event* calibS4; |
252 |
public: |
253 |
CalibS4Reader(void); |
254 |
virtual void Init(PamelaRun *); |
255 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
256 |
// oppure usa: WrongCRCException_PKTUsed |
257 |
virtual std::string GetVersionInfo(void) const; |
258 |
TObject *GetPtr(TString name=""){return this;}; |
259 |
}; |
260 |
|
261 |
|
262 |
/********************************************** |
263 |
* Event reader algorithm for CalibCalPed events. |
264 |
**********************************************/ |
265 |
class CalibCalPedReader: public TechmodelAlgorithm { |
266 |
private: |
267 |
/** The CalibCalPed event that is created in the reader. */ |
268 |
CalibCalPedEvent* calibCalPed; |
269 |
public: |
270 |
CalibCalPedReader(void); |
271 |
virtual void Init(PamelaRun *); |
272 |
virtual void PKT_RunEvent(char*, long int=0) throw (CalibException); |
273 |
|
274 |
virtual std::string GetVersionInfo(void) const; |
275 |
TObject *GetPtr(TString name=""){return this;}; |
276 |
}; |
277 |
|
278 |
|
279 |
/*********************************************** |
280 |
* Event reader algorithm for Calib1_Ac1 events. |
281 |
**********************************************/ |
282 |
class Calib1_Ac1Reader: public TechmodelAlgorithm { |
283 |
private: |
284 |
/** The CalibAc event that is created in the reader. */ |
285 |
Calib1_Ac1Event* calib1_Ac1; |
286 |
public: |
287 |
Calib1_Ac1Reader(void); |
288 |
virtual void Init(PamelaRun *); |
289 |
virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
290 |
|
291 |
virtual std::string GetVersionInfo(void) const; |
292 |
TObject *GetPtr(TString name=""){return this;}; |
293 |
}; |
294 |
|
295 |
/*********************************************** |
296 |
* Event reader algorithm for Calib1_Ac2 events. |
297 |
**********************************************/ |
298 |
class Calib1_Ac2Reader: public TechmodelAlgorithm { |
299 |
private: |
300 |
/** The Calib1_Ac2 event that is created in the reader. */ |
301 |
Calib1_Ac2Event* calib1_Ac2; |
302 |
public: |
303 |
Calib1_Ac2Reader(void); |
304 |
virtual void Init(PamelaRun *); |
305 |
virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
306 |
|
307 |
virtual std::string GetVersionInfo(void) const; |
308 |
TObject *GetPtr(TString name=""){return this;}; |
309 |
}; |
310 |
|
311 |
/*********************************************** |
312 |
* Event reader algorithm for Calib2_Ac1 events. |
313 |
**********************************************/ |
314 |
class Calib2_Ac1Reader: public TechmodelAlgorithm { |
315 |
private: |
316 |
/** The Calib2_Ac1 event that is created in the reader. */ |
317 |
Calib2_Ac1Event* calib2_Ac1; |
318 |
public: |
319 |
Calib2_Ac1Reader(void); |
320 |
virtual void Init(PamelaRun *); |
321 |
virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
322 |
virtual std::string GetVersionInfo(void) const; |
323 |
TObject *GetPtr(TString name=""){return this;}; |
324 |
}; |
325 |
|
326 |
/*********************************************** |
327 |
* Event reader algorithm for Calib2_Ac2 events. |
328 |
**********************************************/ |
329 |
class Calib2_Ac2Reader: public TechmodelAlgorithm { |
330 |
private: |
331 |
/** The Calib2_Ac2 event that is created in the reader. */ |
332 |
Calib2_Ac2Event* calib2_Ac2; |
333 |
public: |
334 |
Calib2_Ac2Reader(void); |
335 |
virtual void Init(PamelaRun *); |
336 |
virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
337 |
virtual std::string GetVersionInfo(void) const; |
338 |
TObject *GetPtr(TString name=""){return this;}; |
339 |
}; |
340 |
|
341 |
/********************************************** |
342 |
* Event reader algorithm for CalibCal events. |
343 |
**********************************************/ |
344 |
class CalibCalReader: public TechmodelAlgorithm { |
345 |
private: |
346 |
/** The CalibCal event that is created in the reader. */ |
347 |
CalibCalEvent* calibCal; |
348 |
public: |
349 |
CalibCalReader(void); |
350 |
virtual void Init(PamelaRun *); |
351 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
352 |
virtual std::string GetVersionInfo(void) const; |
353 |
TObject *GetPtr(TString name=""){return this;}; |
354 |
}; |
355 |
|
356 |
|
357 |
/********************************************** |
358 |
* Event reader algorithm for RunHeader events. |
359 |
**********************************************/ |
360 |
class RunHeaderReader: public TechmodelAlgorithm { |
361 |
private: |
362 |
/** The RunHeader event that is created in the reader. */ |
363 |
RunHeaderEvent* RunHeader; |
364 |
public: |
365 |
RunHeaderReader(void); |
366 |
virtual void Init(PamelaRun *); |
367 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
368 |
// oppure usa: WrongCRCException_PKTUsed |
369 |
virtual std::string GetVersionInfo(void) const; |
370 |
TObject *GetPtr(TString name=""){return this;}; |
371 |
}; |
372 |
|
373 |
|
374 |
/********************************************** |
375 |
* Event reader algorithm for RunTrailer events. |
376 |
**********************************************/ |
377 |
class RunTrailerReader: public TechmodelAlgorithm { |
378 |
private: |
379 |
/** The RunTrailer event that is created in the reader. */ |
380 |
RunTrailerEvent* RunTrailer; |
381 |
public: |
382 |
RunTrailerReader(void); |
383 |
virtual void Init(PamelaRun *); |
384 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
385 |
// oppure usa: WrongCRCException_PKTUsed |
386 |
|
387 |
virtual std::string GetVersionInfo(void) const; |
388 |
TObject *GetPtr(TString name=""){return this;}; |
389 |
}; |
390 |
|
391 |
|
392 |
/********************************************** |
393 |
* Event reader algorithm for CalibHeader events. |
394 |
**********************************************/ |
395 |
class CalibHeaderReader: public TechmodelAlgorithm { |
396 |
private: |
397 |
/** The CalibHeader event that is created in the reader. */ |
398 |
CalibHeaderEvent* calibHeader; |
399 |
public: |
400 |
CalibHeaderReader(void); |
401 |
virtual void Init(PamelaRun *); |
402 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
403 |
// oppure usa: WrongCRCException_PKTUsed |
404 |
|
405 |
virtual std::string GetVersionInfo(void) const; |
406 |
TObject *GetPtr(TString name=""){return this;}; |
407 |
}; |
408 |
|
409 |
|
410 |
/********************************************** |
411 |
* Event reader algorithm for CalibTrailer events. |
412 |
**********************************************/ |
413 |
class CalibTrailerReader: public TechmodelAlgorithm { |
414 |
private: |
415 |
/** The CalibTrailer event that is created in the reader. */ |
416 |
CalibTrailerEvent* calibTrailer; |
417 |
public: |
418 |
CalibTrailerReader(void); |
419 |
virtual void Init(PamelaRun *); |
420 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
421 |
// oppure usa: WrongCRCException_PKTUsed |
422 |
|
423 |
virtual std::string GetVersionInfo(void) const; |
424 |
TObject *GetPtr(TString name=""){return this;}; |
425 |
}; |
426 |
|
427 |
/********************************************** |
428 |
* Event reader algorithm for InitHeader events. |
429 |
**********************************************/ |
430 |
class InitHeaderReader: public TechmodelAlgorithm { |
431 |
private: |
432 |
/** The InitHeader event that is created in the reader. */ |
433 |
InitHeaderEvent* initHeader; |
434 |
public: |
435 |
InitHeaderReader(void); |
436 |
virtual void Init(PamelaRun *); |
437 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
438 |
// oppure usa: WrongCRCException_PKTUsed |
439 |
|
440 |
virtual std::string GetVersionInfo(void) const; |
441 |
TObject *GetPtr(TString name=""){return this;}; |
442 |
}; |
443 |
|
444 |
|
445 |
/********************************************** |
446 |
* Event reader algorithm for InitTrailer events. |
447 |
**********************************************/ |
448 |
class InitTrailerReader: public TechmodelAlgorithm { |
449 |
private: |
450 |
/** The InitTrailer event that is created in the reader. */ |
451 |
InitTrailerEvent* initTrailer; |
452 |
public: |
453 |
InitTrailerReader(void); |
454 |
virtual void Init(PamelaRun *); |
455 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
456 |
// oppure usa: WrongCRCException_PKTUsed |
457 |
|
458 |
virtual std::string GetVersionInfo(void) const; |
459 |
TObject *GetPtr(TString name=""){return this;}; |
460 |
}; |
461 |
|
462 |
|
463 |
/********************************************** |
464 |
* Event reader algorithm for EventTrk events. |
465 |
**********************************************/ |
466 |
class EventTrkReader: public TechmodelAlgorithm { |
467 |
private: |
468 |
/** The EventTrk event that is created in the reader. */ |
469 |
EventTrkEvent* eventTrk; |
470 |
public: |
471 |
EventTrkReader(void); |
472 |
virtual void Init(PamelaRun *); |
473 |
virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
474 |
|
475 |
virtual std::string GetVersionInfo(void) const; |
476 |
TObject *GetPtr(TString name=""){return this;}; |
477 |
}; |
478 |
|
479 |
|
480 |
/********************************************** |
481 |
* Event reader algorithm for Log events. |
482 |
**********************************************/ |
483 |
class LogReader: public TechmodelAlgorithm { |
484 |
private: |
485 |
/** The Log event that is created in the reader. */ |
486 |
LogEvent* Log; |
487 |
public: |
488 |
LogReader(void); |
489 |
virtual void Init(PamelaRun *); |
490 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
491 |
// oppure usa: WrongCRCException_PKTUsed |
492 |
|
493 |
virtual std::string GetVersionInfo(void) const; |
494 |
TObject *GetPtr(TString name=""){return this;}; |
495 |
}; |
496 |
|
497 |
/*********************************************** |
498 |
* Event reader algorithm for VarDump events. |
499 |
**********************************************/ |
500 |
class VarDumpReader: public TechmodelAlgorithm { |
501 |
private: |
502 |
/** The VarDump event that is created in the reader. */ |
503 |
VarDumpEvent* VarDump; |
504 |
public: |
505 |
VarDumpReader(void); |
506 |
virtual void Init(PamelaRun *); |
507 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
508 |
// oppure usa: WrongCRCException_PKTUsed |
509 |
|
510 |
virtual std::string GetVersionInfo(void) const; |
511 |
TObject *GetPtr(TString name=""){return this;}; |
512 |
}; |
513 |
|
514 |
/********************************************** |
515 |
* Event reader algorithm for ArrDump events. |
516 |
**********************************************/ |
517 |
class ArrDumpReader: public TechmodelAlgorithm { |
518 |
private: |
519 |
/** The ArrDump event that is created in the reader. */ |
520 |
ArrDumpEvent* ArrDump; |
521 |
public: |
522 |
ArrDumpReader(void); |
523 |
virtual void Init(PamelaRun *); |
524 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
525 |
// oppure usa: WrongCRCException_PKTUsed |
526 |
|
527 |
virtual std::string GetVersionInfo(void) const; |
528 |
TObject *GetPtr(TString name=""){return this;}; |
529 |
}; |
530 |
|
531 |
|
532 |
/********************************************** |
533 |
* Event reader algorithm for TabDump events. |
534 |
**********************************************/ |
535 |
class TabDumpReader: public TechmodelAlgorithm { |
536 |
private: |
537 |
/** The TabDump event that is created in the reader. */ |
538 |
TabDumpEvent* TabDump; |
539 |
public: |
540 |
TabDumpReader(void); |
541 |
virtual void Init(PamelaRun *); |
542 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
543 |
// oppure usa: WrongCRCException_PKTUsed |
544 |
|
545 |
virtual std::string GetVersionInfo(void) const; |
546 |
TObject *GetPtr(TString name=""){return this;}; |
547 |
}; |
548 |
|
549 |
|
550 |
/********************************************** |
551 |
* Event reader algorithm for TMTC events. |
552 |
**********************************************/ |
553 |
class TmtcReader: public TechmodelAlgorithm { |
554 |
//Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC) |
555 |
static const int TMTC_SUB_LENGTH = 44; |
556 |
//Length in bytes of the subPacketCRC |
557 |
static const int TMTC_SUBCRC_LENGTH = 1; |
558 |
//Length in bytes of the PacketCRC |
559 |
static const int TMTC_CRC_LENGTH = 2; |
560 |
private: |
561 |
/** The TMTC event that is created in the reader. */ |
562 |
TmtcEvent* Tmtc; |
563 |
public: |
564 |
TmtcReader(void); |
565 |
virtual void Init(PamelaRun *); |
566 |
//virtual void PKT_RunEvent(char*, long int=0) throw (Exception); |
567 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException_PKTUsed); |
568 |
|
569 |
virtual std::string GetVersionInfo(void) const; |
570 |
TObject *GetPtr(TString name=""){return this;}; |
571 |
}; |
572 |
|
573 |
|
574 |
/********************************************** |
575 |
* Event reader algorithm for Mcmd events. |
576 |
**********************************************/ |
577 |
class McmdReader: public TechmodelAlgorithm { |
578 |
private: |
579 |
/** The Mcmd event that is created in the reader. */ |
580 |
McmdEvent* Mcmd; |
581 |
public: |
582 |
McmdReader(void); |
583 |
virtual void Init(PamelaRun *); |
584 |
// virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
585 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException_PKTUsed); |
586 |
virtual std::string GetVersionInfo(void) const; |
587 |
TObject *GetPtr(TString name=""){return this;}; |
588 |
McmdEvent *GetMcmd(){return Mcmd;}; |
589 |
}; |
590 |
|
591 |
|
592 |
/********************************************** |
593 |
* Event reader algorithm for ForcedFECmd events. |
594 |
**********************************************/ |
595 |
class ForcedFECmdReader: public TechmodelAlgorithm { |
596 |
private: |
597 |
/** The ForcedFECmd event that is created in the reader. */ |
598 |
ForcedFECmdEvent* forcedFECmd; |
599 |
public: |
600 |
ForcedFECmdReader(void); |
601 |
virtual void Init(PamelaRun *); |
602 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
603 |
|
604 |
virtual std::string GetVersionInfo(void) const; |
605 |
TObject *GetPtr(TString name=""){return this;}; |
606 |
}; |
607 |
|
608 |
|
609 |
/********************************************** |
610 |
* Event reader algorithm for Ac1Init events. |
611 |
**********************************************/ |
612 |
class Ac1InitReader: public TechmodelAlgorithm { |
613 |
private: |
614 |
/** The Ac1Init event that is created in the reader. */ |
615 |
Ac1InitEvent* ac1Init; |
616 |
public: |
617 |
Ac1InitReader(void); |
618 |
virtual void Init(PamelaRun *); |
619 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
620 |
|
621 |
virtual std::string GetVersionInfo(void) const; |
622 |
TObject *GetPtr(TString name=""){return this;}; |
623 |
}; |
624 |
|
625 |
|
626 |
/********************************************** |
627 |
* Event reader algorithm for CalInit events. |
628 |
**********************************************/ |
629 |
class CalInitReader: public TechmodelAlgorithm { |
630 |
private: |
631 |
/** The CalInit event that is created in the reader. */ |
632 |
CalInitEvent* calInit; |
633 |
public: |
634 |
CalInitReader(void); |
635 |
virtual void Init(PamelaRun *); |
636 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
637 |
|
638 |
virtual std::string GetVersionInfo(void) const; |
639 |
TObject *GetPtr(TString name=""){return this;}; |
640 |
}; |
641 |
|
642 |
|
643 |
/********************************************** |
644 |
* Event reader algorithm for TrkInit events. |
645 |
**********************************************/ |
646 |
class TrkInitReader: public TechmodelAlgorithm { |
647 |
private: |
648 |
/** The TrkInit event that is created in the reader. */ |
649 |
TrkInitEvent* trkInit; |
650 |
public: |
651 |
TrkInitReader(void); |
652 |
virtual void Init(PamelaRun *); |
653 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
654 |
|
655 |
virtual std::string GetVersionInfo(void) const; |
656 |
TObject *GetPtr(TString name=""){return this;}; |
657 |
}; |
658 |
|
659 |
|
660 |
/********************************************** |
661 |
* Event reader algorithm for TofInit events. |
662 |
**********************************************/ |
663 |
class TofInitReader: public TechmodelAlgorithm { |
664 |
private: |
665 |
/** The TofInit event that is created in the reader. */ |
666 |
TofInitEvent* tofInit; |
667 |
public: |
668 |
TofInitReader(void); |
669 |
virtual void Init(PamelaRun *); |
670 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
671 |
|
672 |
virtual std::string GetVersionInfo(void) const; |
673 |
TObject *GetPtr(TString name=""){return this;}; |
674 |
}; |
675 |
|
676 |
|
677 |
/********************************************** |
678 |
* Event reader algorithm for TrgInit events. |
679 |
**********************************************/ |
680 |
class TrgInitReader: public TechmodelAlgorithm { |
681 |
private: |
682 |
/** The TrgInit event that is created in the reader. */ |
683 |
TrgInitEvent* trgInit; |
684 |
public: |
685 |
TrgInitReader(void); |
686 |
virtual void Init(PamelaRun *); |
687 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
688 |
|
689 |
virtual std::string GetVersionInfo(void) const; |
690 |
TObject *GetPtr(TString name=""){return this;}; |
691 |
}; |
692 |
|
693 |
/********************************************** |
694 |
* Event reader algorithm for NdInit events. |
695 |
**********************************************/ |
696 |
class NdInitReader: public TechmodelAlgorithm { |
697 |
private: |
698 |
/** The NdInit event that is created in the reader. */ |
699 |
NdInitEvent* ndInit; |
700 |
public: |
701 |
NdInitReader(void); |
702 |
virtual void Init(PamelaRun *); |
703 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
704 |
|
705 |
virtual std::string GetVersionInfo(void) const; |
706 |
TObject *GetPtr(TString name=""){return this;}; |
707 |
}; |
708 |
|
709 |
/********************************************** |
710 |
* Event reader algorithm for S4Init events. |
711 |
**********************************************/ |
712 |
class S4InitReader: public TechmodelAlgorithm { |
713 |
private: |
714 |
/** The S4Init event that is created in the reader. */ |
715 |
S4InitEvent* s4Init; |
716 |
public: |
717 |
S4InitReader(void); |
718 |
virtual void Init(PamelaRun *); |
719 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
720 |
|
721 |
virtual std::string GetVersionInfo(void) const; |
722 |
TObject *GetPtr(TString name=""){return this;}; |
723 |
}; |
724 |
|
725 |
|
726 |
/********************************************** |
727 |
* Event reader algorithm for Ac2Init events. |
728 |
**********************************************/ |
729 |
class Ac2InitReader: public TechmodelAlgorithm { |
730 |
private: |
731 |
/** The Ac2Init event that is created in the reader. */ |
732 |
Ac2InitEvent* ac2Init; |
733 |
public: |
734 |
Ac2InitReader(void); |
735 |
virtual void Init(PamelaRun *); |
736 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
737 |
|
738 |
virtual std::string GetVersionInfo(void) const; |
739 |
TObject *GetPtr(TString name=""){return this;}; |
740 |
}; |
741 |
|
742 |
|
743 |
/********************************************** |
744 |
* Event reader algorithm for CalAlarm events. |
745 |
**********************************************/ |
746 |
class CalAlarmReader: public TechmodelAlgorithm { |
747 |
private: |
748 |
/** The CalAlarm event that is created in the reader. */ |
749 |
CalAlarmEvent* calAlarm; |
750 |
public: |
751 |
CalAlarmReader(void); |
752 |
virtual void Init(PamelaRun *); |
753 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
754 |
|
755 |
virtual std::string GetVersionInfo(void) const; |
756 |
TObject *GetPtr(TString name=""){return this;}; |
757 |
}; |
758 |
|
759 |
/********************************************** |
760 |
* Event reader algorithm for Ac1Alarm events. |
761 |
**********************************************/ |
762 |
class Ac1AlarmReader: public TechmodelAlgorithm { |
763 |
private: |
764 |
/** The Ac1Alarm event that is created in the reader. */ |
765 |
Ac1AlarmEvent* acAlarm; |
766 |
public: |
767 |
Ac1AlarmReader(void); |
768 |
virtual void Init(PamelaRun *); |
769 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
770 |
virtual std::string GetVersionInfo(void) const; |
771 |
TObject *GetPtr(TString name=""){return this;}; |
772 |
}; |
773 |
|
774 |
/********************************************** |
775 |
* Event reader algorithm for TrkAlarm events. |
776 |
**********************************************/ |
777 |
class TrkAlarmReader: public TechmodelAlgorithm { |
778 |
private: |
779 |
/** The TrkAlarm event that is created in the reader. */ |
780 |
TrkAlarmEvent* trkAlarm; |
781 |
public: |
782 |
TrkAlarmReader(void); |
783 |
virtual void Init(PamelaRun *); |
784 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
785 |
|
786 |
virtual std::string GetVersionInfo(void) const; |
787 |
TObject *GetPtr(TString name=""){return this;}; |
788 |
}; |
789 |
|
790 |
/********************************************** |
791 |
* Event reader algorithm for TrgAlarm events. |
792 |
**********************************************/ |
793 |
class TrgAlarmReader: public TechmodelAlgorithm { |
794 |
private: |
795 |
/** The TrgAlarm event that is created in the reader. */ |
796 |
TrgAlarmEvent* trgAlarm; |
797 |
public: |
798 |
TrgAlarmReader(void); |
799 |
virtual void Init(PamelaRun *); |
800 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
801 |
|
802 |
virtual std::string GetVersionInfo(void) const; |
803 |
TObject *GetPtr(TString name=""){return this;}; |
804 |
}; |
805 |
|
806 |
/********************************************** |
807 |
* Event reader algorithm for TofAlarm events. |
808 |
**********************************************/ |
809 |
class TofAlarmReader: public TechmodelAlgorithm { |
810 |
private: |
811 |
/** The TofAlarm event that is created in the reader. */ |
812 |
TofAlarmEvent* tofAlarm; |
813 |
public: |
814 |
TofAlarmReader(void); |
815 |
virtual void Init(PamelaRun *); |
816 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
817 |
|
818 |
virtual std::string GetVersionInfo(void) const; |
819 |
TObject *GetPtr(TString name=""){return this;}; |
820 |
}; |
821 |
|
822 |
/********************************************** |
823 |
* Event reader algorithm for S4Alarm events. |
824 |
**********************************************/ |
825 |
class S4AlarmReader: public TechmodelAlgorithm { |
826 |
private: |
827 |
/** The S4Alarm event that is created in the reader. */ |
828 |
S4AlarmEvent* s4Alarm; |
829 |
public: |
830 |
S4AlarmReader(void); |
831 |
virtual void Init(PamelaRun *); |
832 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
833 |
|
834 |
virtual std::string GetVersionInfo(void) const; |
835 |
TObject *GetPtr(TString name=""){return this;}; |
836 |
}; |
837 |
|
838 |
|
839 |
/********************************************** |
840 |
* Event reader algorithm for Ac2Alarm events. |
841 |
**********************************************/ |
842 |
class Ac2AlarmReader: public TechmodelAlgorithm { |
843 |
private: |
844 |
/** The Ac2Alarm event that is created in the reader. */ |
845 |
Ac2AlarmEvent* acAlarm; |
846 |
public: |
847 |
Ac2AlarmReader(void); |
848 |
virtual void Init(PamelaRun *); |
849 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
850 |
|
851 |
virtual std::string GetVersionInfo(void) const; |
852 |
TObject *GetPtr(TString name=""){return this;}; |
853 |
}; |
854 |
|
855 |
/********************************************** |
856 |
* Event reader algorithm for TsbT events. |
857 |
**********************************************/ |
858 |
class TsbTReader: public TechmodelAlgorithm { |
859 |
private: |
860 |
/** The TsbT event that is created in the reader. */ |
861 |
TsbTEvent* TsbT; |
862 |
public: |
863 |
TsbTReader(void); |
864 |
virtual void Init(PamelaRun *); |
865 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
866 |
//or use WrongCRCException_PKTUsed |
867 |
virtual std::string GetVersionInfo(void) const; |
868 |
TObject *GetPtr(TString name=""){return this;}; |
869 |
}; |
870 |
|
871 |
/********************************************** |
872 |
* Event reader algorithm for TsbB events. |
873 |
**********************************************/ |
874 |
class TsbBReader: public TechmodelAlgorithm { |
875 |
private: |
876 |
/** The TsbB event that is created in the reader. */ |
877 |
TsbBEvent* TsbB; |
878 |
public: |
879 |
TsbBReader(void); |
880 |
virtual void Init(PamelaRun *); |
881 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
882 |
//or use WrongCRCException_PKTUsed |
883 |
|
884 |
virtual std::string GetVersionInfo(void) const; |
885 |
TObject *GetPtr(TString name=""){return this;}; |
886 |
}; |
887 |
|
888 |
/********************************************** |
889 |
* Event reader algorithm for PSCU events. |
890 |
**********************************************/ |
891 |
class PscuReader: public TechmodelAlgorithm { |
892 |
private: |
893 |
/** The PSCU event that is created in the reader. */ |
894 |
PscuEvent* Pscu; |
895 |
public: |
896 |
PscuReader(void); |
897 |
virtual void Init(PamelaRun *); |
898 |
virtual void PKT_RunEvent(char*, long int=0) throw (WrongCRCException); |
899 |
|
900 |
virtual std::string GetVersionInfo(void) const; |
901 |
TObject *GetPtr(TString name=""){return this;}; |
902 |
}; |
903 |
|
904 |
|
905 |
} |
906 |
} |
907 |
|
908 |
#endif /* READER_ALGORITHM_H */ |
909 |
|
910 |
|
911 |
|
912 |
|