/[PAMELA software]/yoda/techmodel/ReaderAlgorithms.h
ViewVC logotype

Contents of /yoda/techmodel/ReaderAlgorithms.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Thu Aug 19 15:24:46 2004 UTC (20 years, 8 months ago) by kusanagi
Branch: MAIN
Changes since 1.6: +408 -152 lines
File MIME type: text/plain
*** empty log message ***

1 /** @file
2 * $Author: kusanagi $
3 * $Date: 2004/07/29 16:19:11 $
4 * $Revision: 1.6 $
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 "PhysEndRunEvent.h"
17 #include "CalibCalPulse1Event.h"
18 #include "CalibCalPulse2Event.h"
19 #include "physics/TrackerReader.h"
20 #include "physics/AnticounterReader.h"
21 #include "physics/CalorimeterReader.h"
22 #include "physics/NeutronDetectorReader.h"
23 #include "CalibTrkBothEvent.h"
24 #include "CalibTrk1Event.h"
25 #include "CalibTrk2Event.h"
26 #include "CalibTrdEvent.h"
27 #include "CalibTofEvent.h"
28 #include "CalibS4Event.h"
29 #include "CalibCalPedEvent.h"
30 #include "CalibAcEvent.h"
31 #include "RunHeaderEvent.h"
32 #include "RunTrailerEvent.h"
33 #include "CalibHeaderEvent.h"
34 #include "CalibTrailerEvent.h"
35 #include "InitHeaderEvent.h"
36 #include "InitTrailerEvent.h"
37 #include "EventTrkEvent.h"
38 #include "TestTrkEvent.h"
39 #include "log/LogEvent.h"
40 #include "varDump/VarDumpEvent.h"
41 #include "arrDump/ArrDumpEvent.h"
42 #include "tabDump/TabDumpEvent.h"
43 #include "tmtc/TmtcEvent.h"
44 #include "mcmd/McmdEvent.h"
45 #include "ForcedFECmdEvent.h"
46 #include "AcInitEvent.h"
47 #include "CalInitEvent.h"
48 #include "TrkInitEvent.h"
49 #include "TofInitEvent.h"
50 #include "TrgInitEvent.h"
51
52
53
54 #define UINT32 unsigned int
55 #define UINT16 unsigned short
56 #define BYTE unsigned char
57
58 using namespace std;
59
60 namespace pamela {
61 namespace techmodel {
62
63 /**********************************************
64 * Event reader algorithm for PhysEndRun events.
65 **********************************************/
66 class PhysEndRunReader: public TechmodelAlgorithm {
67 private:
68 /** The PhysEndRun event that is created in the reader. */
69 PhysEndRunEvent* physEndRun;
70 public:
71 PhysEndRunReader(void);
72 virtual void Init(PamelaRun *);
73 virtual void RunEvent(int, long int);
74 //this type of RUNEvent should be the future develop.
75 //Pass the buffer not the pointer to file
76 //virtual void RunEvent(int, long int, char[]);
77 virtual std::string GetVersionInfo(void) const;
78 };
79
80
81 /**********************************************
82 * Event reader algorithm for CalibCalPulse1 events.
83 **********************************************/
84 class CalibCalPulse1Reader: public TechmodelAlgorithm {
85 private:
86 /** The CalibCalPulse1 event that is created in the reader. */
87 CalibCalPulse1Event* calibCalPulse1;
88 public:
89 CalibCalPulse1Reader(void);
90 virtual void Init(PamelaRun *);
91 virtual void RunEvent(int, long int);
92 //this type of RUNEvent should be the future develop.
93 //Pass the buffer not the pointer to file
94 //virtual void RunEvent(int, long int, char[]);
95 virtual std::string GetVersionInfo(void) const;
96 };
97
98
99 /**********************************************
100 * Event reader algorithm for CalibCalPulse2 events.
101 **********************************************/
102 class CalibCalPulse2Reader: public TechmodelAlgorithm {
103 private:
104 /** The CalibCalPulse2 event that is created in the reader. */
105 CalibCalPulse2Event* calibCalPulse2;
106 public:
107 CalibCalPulse2Reader(void);
108 virtual void Init(PamelaRun *);
109 virtual void RunEvent(int, long int);
110 //this type of RUNEvent should be the future develop.
111 //Pass the buffer not the pointer to file
112 //virtual void RunEvent(int, long int, char[]);
113 virtual std::string GetVersionInfo(void) const;
114 };
115
116
117 /**********************************************
118 * Event reader algorithm for physics events.
119 **********************************************/
120 class PhysicsReader: public TechmodelAlgorithm {
121 private:
122 /** The reader for tracker physics events. */
123 tracker::TrackerReader* trackerReader;
124 anticounter::AnticounterReader* anticounterReader;
125 calorimeter::CalorimeterReader* calorimeterReader;
126 neutron::NeutronDetectorReader* neutronReader;
127 public:
128 PhysicsReader(void);
129 virtual void Init(PamelaRun *);
130 virtual void RunEvent(int, long int);
131 virtual std::string GetVersionInfo(void) const;
132 };
133
134
135 /**********************************************
136 * Event reader algorithm for CalibTrkBoth events.
137 **********************************************/
138 class CalibTrkBothReader: public TechmodelAlgorithm {
139 private:
140 /** The CalibTrkBoth event that is created in the reader. */
141 CalibTrkBothEvent* calibTrkBoth;
142 public:
143 CalibTrkBothReader(void);
144 virtual void Init(PamelaRun *);
145 virtual void RunEvent(int, long int);
146 //this type of RUNEvent should be the future develop.
147 //Pass the buffer not the pointer to file
148 //virtual void RunEvent(int, long int, char[]);
149 virtual std::string GetVersionInfo(void) const;
150 };
151
152
153 /**********************************************
154 * Event reader algorithm for CalibTrk1 events.
155 **********************************************/
156 class CalibTrk1Reader: public TechmodelAlgorithm {
157 private:
158 /** The CalibTrk1 event that is created in the reader. */
159 CalibTrk1Event* calibTrk1;
160 public:
161 CalibTrk1Reader(void);
162 virtual void Init(PamelaRun *);
163 virtual void RunEvent(int, long int);
164 //this type of RUNEvent should be the future develop.
165 //Pass the buffer not the pointer to file
166 //virtual void RunEvent(int, long int, char[]);
167 virtual std::string GetVersionInfo(void) const;
168 };
169
170
171 /**********************************************
172 * Event reader algorithm for CalibTrk2 events.
173 **********************************************/
174 class CalibTrk2Reader: public TechmodelAlgorithm {
175 private:
176 /** The CalibTrk2 event that is created in the reader. */
177 CalibTrk2Event* calibTrk2;
178 public:
179 CalibTrk2Reader(void);
180 virtual void Init(PamelaRun *);
181 virtual void RunEvent(int, long int);
182 virtual std::string GetVersionInfo(void) const;
183 };
184
185
186 /**********************************************
187 * Event reader algorithm for CalibTrd events.
188 **********************************************/
189 class CalibTrdReader: public TechmodelAlgorithm {
190 private:
191 /** The CalibTrd event that is created in the reader. */
192 CalibTrdEvent* calibTrd;
193 public:
194 CalibTrdReader(void);
195 virtual void Init(PamelaRun *);
196 virtual void RunEvent(int, long int);
197 virtual std::string GetVersionInfo(void) const;
198 };
199
200
201 /**********************************************
202 * Event reader algorithm for CalibTof events.
203 **********************************************/
204 class CalibTofReader: public TechmodelAlgorithm {
205 private:
206 /** The CalibTof event that is created in the reader. */
207 CalibTofEvent* CalibTof;
208 public:
209 CalibTofReader(void);
210 virtual void Init(PamelaRun *);
211 virtual void RunEvent(int, long int);
212 virtual std::string GetVersionInfo(void) const;
213 };
214
215
216 /**********************************************
217 * Event reader algorithm for CalibS4 events.
218 **********************************************/
219 class CalibS4Reader: public TechmodelAlgorithm {
220 private:
221 /** The CalibCal event that is created in the reader. */
222 CalibS4Event* CalibS4;
223 public:
224 CalibS4Reader(void);
225 virtual void Init(PamelaRun *);
226 virtual void RunEvent(int, long int);
227 virtual std::string GetVersionInfo(void) const;
228 };
229
230
231 /**********************************************
232 * Event reader algorithm for CalibCalPed events.
233 **********************************************/
234 class CalibCalPedReader: public TechmodelAlgorithm {
235 private:
236 /** The CalibCalPed event that is created in the reader. */
237 CalibCalPedEvent* calibCalPed;
238 public:
239 CalibCalPedReader(void);
240 virtual void Init(PamelaRun *);
241 virtual void RunEvent(int, long int);
242 virtual std::string GetVersionInfo(void) const;
243 };
244
245
246 /***********************************************
247 * Event reader algorithm for CalibAc events.
248 **********************************************/
249 class CalibAcReader: public TechmodelAlgorithm {
250 private:
251 /** The CalibAc event that is created in the reader. */
252 CalibAcEvent* CalibAc;
253 public:
254 CalibAcReader(void);
255 virtual void Init(PamelaRun *);
256 virtual void RunEvent(int, long int);
257 virtual std::string GetVersionInfo(void) const;
258 };
259
260
261 /**********************************************
262 * Event reader algorithm for RunHeader events.
263 **********************************************/
264 class RunHeaderReader: public TechmodelAlgorithm {
265 private:
266 /** The RunHeader event that is created in the reader. */
267 RunHeaderEvent* RunHeader;
268 public:
269 RunHeaderReader(void);
270 virtual void Init(PamelaRun *);
271 virtual void RunEvent(int, long int);
272 virtual std::string GetVersionInfo(void) const;
273 };
274
275
276 /**********************************************
277 * Event reader algorithm for RunTrailer events.
278 **********************************************/
279 class RunTrailerReader: public TechmodelAlgorithm {
280 private:
281 /** The RunTrailer event that is created in the reader. */
282 RunTrailerEvent* RunTrailer;
283 public:
284 RunTrailerReader(void);
285 virtual void Init(PamelaRun *);
286 virtual void RunEvent(int, long int);
287 virtual std::string GetVersionInfo(void) const;
288 };
289
290
291 /**********************************************
292 * Event reader algorithm for CalibHeader events.
293 **********************************************/
294 class CalibHeaderReader: public TechmodelAlgorithm {
295 private:
296 /** The CalibHeader event that is created in the reader. */
297 CalibHeaderEvent* calibHeader;
298 public:
299 CalibHeaderReader(void);
300 virtual void Init(PamelaRun *);
301 virtual void RunEvent(int, long int);
302 virtual std::string GetVersionInfo(void) const;
303 };
304
305
306 /**********************************************
307 * Event reader algorithm for CalibTrailer events.
308 **********************************************/
309 class CalibTrailerReader: public TechmodelAlgorithm {
310 private:
311 /** The CalibTrailer event that is created in the reader. */
312 CalibTrailerEvent* calibTrailer;
313 public:
314 CalibTrailerReader(void);
315 virtual void Init(PamelaRun *);
316 virtual void RunEvent(int, long int);
317 virtual std::string GetVersionInfo(void) const;
318 };
319
320
321 /**********************************************
322 * Event reader algorithm for InitHeader events.
323 **********************************************/
324 class InitHeaderReader: public TechmodelAlgorithm {
325 private:
326 /** The InitHeader event that is created in the reader. */
327 InitHeaderEvent* initHeader;
328 public:
329 InitHeaderReader(void);
330 virtual void Init(PamelaRun *);
331 virtual void RunEvent(int, long int);
332 virtual std::string GetVersionInfo(void) const;
333 };
334
335
336 /**********************************************
337 * Event reader algorithm for InitTrailer events.
338 **********************************************/
339 class InitTrailerReader: public TechmodelAlgorithm {
340 private:
341 /** The InitTrailer event that is created in the reader. */
342 InitTrailerEvent* initTrailer;
343 public:
344 InitTrailerReader(void);
345 virtual void Init(PamelaRun *);
346 virtual void RunEvent(int, long int);
347 virtual std::string GetVersionInfo(void) const;
348 };
349
350
351 /**********************************************
352 * Event reader algorithm for EventTrk events.
353 **********************************************/
354 class EventTrkReader: public TechmodelAlgorithm {
355 private:
356 /** The EventTrk event that is created in the reader. */
357 EventTrkEvent* eventTrk;
358 public:
359 EventTrkReader(void);
360 virtual void Init(PamelaRun *);
361 virtual void RunEvent(int, long int);
362 virtual std::string GetVersionInfo(void) const;
363 };
364
365
366 /**********************************************
367 * Event reader algorithm for TestTrk events.
368 **********************************************/
369 class TestTrkReader: public TechmodelAlgorithm {
370 private:
371 /** The TestTrk event that is created in the reader. */
372 TestTrkEvent* testTrk;
373 public:
374 TestTrkReader(void);
375 virtual void Init(PamelaRun *);
376 virtual void RunEvent(int, long int);
377 virtual std::string GetVersionInfo(void) const;
378 };
379
380
381 /**********************************************
382 * Event reader algorithm for Log events.
383 **********************************************/
384 class LogReader: public TechmodelAlgorithm {
385 private:
386 /** The Log event that is created in the reader. */
387 LogEvent* Log;
388 public:
389 LogReader(void);
390 virtual void Init(PamelaRun *);
391 virtual void RunEvent(int, long int);
392 virtual std::string GetVersionInfo(void) const;
393 };
394
395
396 /***********************************************
397 * Event reader algorithm for VarDump events.
398 **********************************************/
399 class VarDumpReader: public TechmodelAlgorithm {
400 private:
401 /** The VarDump event that is created in the reader. */
402 VarDumpEvent* VarDump;
403 public:
404 VarDumpReader(void);
405 virtual void Init(PamelaRun *);
406 virtual void RunEvent(int, long int);
407 virtual std::string GetVersionInfo(void) const;
408 };
409
410
411 /**********************************************
412 * Event reader algorithm for ArrDump events.
413 **********************************************/
414 class ArrDumpReader: public TechmodelAlgorithm {
415 private:
416 /** The ArrDump event that is created in the reader. */
417 ArrDumpEvent* ArrDump;
418 public:
419 ArrDumpReader(void);
420 virtual void Init(PamelaRun *);
421 virtual void RunEvent(int, long int);
422 virtual std::string GetVersionInfo(void) const;
423 };
424
425
426 /**********************************************
427 * Event reader algorithm for TabDump events.
428 **********************************************/
429 class TabDumpReader: public TechmodelAlgorithm {
430 private:
431 /** The TabDump event that is created in the reader. */
432 TabDumpEvent* TabDump;
433 public:
434 TabDumpReader(void);
435 virtual void Init(PamelaRun *);
436 virtual void RunEvent(int, long int);
437 virtual std::string GetVersionInfo(void) const;
438 };
439
440
441 /**********************************************
442 * Event reader algorithm for TMTC events.
443 **********************************************/
444 class TmtcReader: public TechmodelAlgorithm {
445 //Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC)
446 static const int TMTC_SUB_LENGTH = 57;
447 //Length in bytes of the subPacketCRC
448 static const int TMTC_SUBCRC_LENGTH = 1;
449 //Length in bytes of the PacketCRC
450 static const int TMTC_CRC_LENGTH = 2;
451 private:
452 /** The TMTC event that is created in the reader. */
453 TmtcEvent* Tmtc;
454 float convert_th(int);
455 public:
456 TmtcReader(void);
457 virtual void Init(PamelaRun *);
458 virtual void RunEvent(int, long int);
459 virtual string GetVersionInfo(void) const;
460 };
461
462
463 /**********************************************
464 * Event reader algorithm for Mcmd events.
465 **********************************************/
466 class McmdReader: public TechmodelAlgorithm {
467 private:
468 /** The Mcmd event that is created in the reader. */
469 McmdEvent* Mcmd;
470 public:
471 McmdReader(void);
472 virtual void Init(PamelaRun *);
473 virtual void RunEvent(int, long int);
474 virtual std::string GetVersionInfo(void) const;
475 };
476
477
478 /**********************************************
479 * Event reader algorithm for ForcedFECmd events.
480 **********************************************/
481 class ForcedFECmdReader: public TechmodelAlgorithm {
482 private:
483 /** The ForcedFECmd event that is created in the reader. */
484 ForcedFECmdEvent* forcedFECmd;
485 public:
486 ForcedFECmdReader(void);
487 virtual void Init(PamelaRun *);
488 virtual void RunEvent(int, long int);
489 virtual std::string GetVersionInfo(void) const;
490 };
491
492
493 /**********************************************
494 * Event reader algorithm for AcInit events.
495 **********************************************/
496 class AcInitReader: public TechmodelAlgorithm {
497 private:
498 /** The AcInit event that is created in the reader. */
499 AcInitEvent* acInit;
500 public:
501 AcInitReader(void);
502 virtual void Init(PamelaRun *);
503 virtual void RunEvent(int, long int);
504 virtual std::string GetVersionInfo(void) const;
505 };
506
507
508 /**********************************************
509 * Event reader algorithm for CalInit events.
510 **********************************************/
511 class CalInitReader: public TechmodelAlgorithm {
512 private:
513 /** The CalInit event that is created in the reader. */
514 CalInitEvent* calInit;
515 public:
516 CalInitReader(void);
517 virtual void Init(PamelaRun *);
518 virtual void RunEvent(int, long int);
519 virtual std::string GetVersionInfo(void) const;
520 };
521
522
523 /**********************************************
524 * Event reader algorithm for TrkInit events.
525 **********************************************/
526 class TrkInitReader: public TechmodelAlgorithm {
527 private:
528 /** The TrkInit event that is created in the reader. */
529 TrkInitEvent* trkInit;
530 public:
531 TrkInitReader(void);
532 virtual void Init(PamelaRun *);
533 virtual void RunEvent(int, long int);
534 virtual std::string GetVersionInfo(void) const;
535 };
536
537
538 /**********************************************
539 * Event reader algorithm for TofInit events.
540 **********************************************/
541 class TofInitReader: public TechmodelAlgorithm {
542 private:
543 /** The TofInit event that is created in the reader. */
544 TofInitEvent* tofInit;
545 public:
546 TofInitReader(void);
547 virtual void Init(PamelaRun *);
548 virtual void RunEvent(int, long int);
549 virtual std::string GetVersionInfo(void) const;
550 };
551
552
553 /**********************************************
554 * Event reader algorithm for TrgInit events.
555 **********************************************/
556 class TrgInitReader: public TechmodelAlgorithm {
557 private:
558 /** The TrgInit event that is created in the reader. */
559 TrgInitEvent* trgInit;
560 public:
561 TrgInitReader(void);
562 virtual void Init(PamelaRun *);
563 virtual void RunEvent(int, long int);
564 virtual std::string GetVersionInfo(void) const;
565 };
566
567
568 /**********************************************
569 * Event reader algorithm for PSCU events.
570 **********************************************/
571 class PscuReader: public TechmodelAlgorithm {
572 private:
573 /** The PSCU event that is created in the reader. */
574 PscuEvent* Pscu;
575 public:
576 PscuReader(void);
577 virtual void Init(PamelaRun *);
578 virtual void RunEvent(int, long int);
579 virtual std::string GetVersionInfo(void) const;
580 };
581
582
583 }
584 }
585
586 #endif /* READER_ALGORITHM_H */
587
588

  ViewVC Help
Powered by ViewVC 1.1.23