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

Annotation of /yoda/techmodel/ReaderAlgorithms.h

Parent Directory Parent Directory | Revision Log Revision Log


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

1 kusanagi 1.1 /** @file
2 kusanagi 1.2 * $Author: kusanagi $
3 kusanagi 1.7 * $Date: 2004/07/29 16:19:11 $
4     * $Revision: 1.6 $
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    
16 kusanagi 1.7 #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 kusanagi 1.2 #include "CalibTrk1Event.h"
25     #include "CalibTrk2Event.h"
26 kusanagi 1.1 #include "CalibTrdEvent.h"
27     #include "CalibTofEvent.h"
28     #include "CalibS4Event.h"
29 kusanagi 1.7 #include "CalibCalPedEvent.h"
30     #include "CalibAcEvent.h"
31 kusanagi 1.1 #include "RunHeaderEvent.h"
32     #include "RunTrailerEvent.h"
33 kusanagi 1.7 #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 kusanagi 1.1 #include "tmtc/TmtcEvent.h"
44     #include "mcmd/McmdEvent.h"
45 kusanagi 1.7 #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 kusanagi 1.1
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 kusanagi 1.7
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 kusanagi 1.1 class PhysicsReader: public TechmodelAlgorithm {
121     private:
122     /** The reader for tracker physics events. */
123 kusanagi 1.5 tracker::TrackerReader* trackerReader;
124     anticounter::AnticounterReader* anticounterReader;
125     calorimeter::CalorimeterReader* calorimeterReader;
126 kusanagi 1.7 neutron::NeutronDetectorReader* neutronReader;
127 kusanagi 1.1 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 kusanagi 1.7
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 kusanagi 1.1 private:
281 kusanagi 1.7 /** The RunTrailer event that is created in the reader. */
282     RunTrailerEvent* RunTrailer;
283 kusanagi 1.1 public:
284 kusanagi 1.7 RunTrailerReader(void);
285 kusanagi 1.1 virtual void Init(PamelaRun *);
286 kusanagi 1.7 virtual void RunEvent(int, long int);
287     virtual std::string GetVersionInfo(void) const;
288 kusanagi 1.1 };
289    
290    
291 kusanagi 1.7 /**********************************************
292     * Event reader algorithm for CalibHeader events.
293     **********************************************/
294     class CalibHeaderReader: public TechmodelAlgorithm {
295 kusanagi 1.1 private:
296 kusanagi 1.7 /** The CalibHeader event that is created in the reader. */
297     CalibHeaderEvent* calibHeader;
298 kusanagi 1.1 public:
299 kusanagi 1.7 CalibHeaderReader(void);
300     virtual void Init(PamelaRun *);
301     virtual void RunEvent(int, long int);
302     virtual std::string GetVersionInfo(void) const;
303 kusanagi 1.1 };
304    
305    
306 kusanagi 1.7 /**********************************************
307     * Event reader algorithm for CalibTrailer events.
308     **********************************************/
309     class CalibTrailerReader: public TechmodelAlgorithm {
310 kusanagi 1.1 private:
311 kusanagi 1.7 /** The CalibTrailer event that is created in the reader. */
312     CalibTrailerEvent* calibTrailer;
313 kusanagi 1.1 public:
314 kusanagi 1.7 CalibTrailerReader(void);
315 kusanagi 1.1 virtual void Init(PamelaRun *);
316     virtual void RunEvent(int, long int);
317     virtual std::string GetVersionInfo(void) const;
318     };
319    
320 kusanagi 1.7
321     /**********************************************
322     * Event reader algorithm for InitHeader events.
323     **********************************************/
324     class InitHeaderReader: public TechmodelAlgorithm {
325 kusanagi 1.1 private:
326 kusanagi 1.7 /** The InitHeader event that is created in the reader. */
327     InitHeaderEvent* initHeader;
328 kusanagi 1.1 public:
329 kusanagi 1.7 InitHeaderReader(void);
330 kusanagi 1.1 virtual void Init(PamelaRun *);
331     virtual void RunEvent(int, long int);
332     virtual std::string GetVersionInfo(void) const;
333     };
334    
335 kusanagi 1.7
336     /**********************************************
337     * Event reader algorithm for InitTrailer events.
338     **********************************************/
339     class InitTrailerReader: public TechmodelAlgorithm {
340 kusanagi 1.1 private:
341 kusanagi 1.7 /** The InitTrailer event that is created in the reader. */
342     InitTrailerEvent* initTrailer;
343 kusanagi 1.1 public:
344 kusanagi 1.7 InitTrailerReader(void);
345 kusanagi 1.1 virtual void Init(PamelaRun *);
346     virtual void RunEvent(int, long int);
347     virtual std::string GetVersionInfo(void) const;
348     };
349    
350 kusanagi 1.7
351     /**********************************************
352     * Event reader algorithm for EventTrk events.
353     **********************************************/
354     class EventTrkReader: public TechmodelAlgorithm {
355 kusanagi 1.1 private:
356 kusanagi 1.7 /** The EventTrk event that is created in the reader. */
357     EventTrkEvent* eventTrk;
358 kusanagi 1.1 public:
359 kusanagi 1.7 EventTrkReader(void);
360 kusanagi 1.1 virtual void Init(PamelaRun *);
361     virtual void RunEvent(int, long int);
362     virtual std::string GetVersionInfo(void) const;
363     };
364    
365 kusanagi 1.7
366     /**********************************************
367     * Event reader algorithm for TestTrk events.
368     **********************************************/
369     class TestTrkReader: public TechmodelAlgorithm {
370 kusanagi 1.1 private:
371 kusanagi 1.7 /** The TestTrk event that is created in the reader. */
372     TestTrkEvent* testTrk;
373 kusanagi 1.1 public:
374 kusanagi 1.7 TestTrkReader(void);
375 kusanagi 1.1 virtual void Init(PamelaRun *);
376     virtual void RunEvent(int, long int);
377     virtual std::string GetVersionInfo(void) const;
378     };
379    
380 kusanagi 1.7
381     /**********************************************
382     * Event reader algorithm for Log events.
383     **********************************************/
384 kusanagi 1.1 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 kusanagi 1.7
396     /***********************************************
397     * Event reader algorithm for VarDump events.
398     **********************************************/
399     class VarDumpReader: public TechmodelAlgorithm {
400 kusanagi 1.1 private:
401 kusanagi 1.7 /** 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 kusanagi 1.1 public:
419 kusanagi 1.7 ArrDumpReader(void);
420 kusanagi 1.1 virtual void Init(PamelaRun *);
421     virtual void RunEvent(int, long int);
422     virtual std::string GetVersionInfo(void) const;
423     };
424    
425 kusanagi 1.7
426     /**********************************************
427     * Event reader algorithm for TabDump events.
428     **********************************************/
429     class TabDumpReader: public TechmodelAlgorithm {
430 kusanagi 1.3 private:
431 kusanagi 1.7 /** The TabDump event that is created in the reader. */
432     TabDumpEvent* TabDump;
433 kusanagi 1.3 public:
434 kusanagi 1.7 TabDumpReader(void);
435 kusanagi 1.3 virtual void Init(PamelaRun *);
436     virtual void RunEvent(int, long int);
437     virtual std::string GetVersionInfo(void) const;
438     };
439    
440    
441 kusanagi 1.7 /**********************************************
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 kusanagi 1.1 private:
468 kusanagi 1.7 /** The Mcmd event that is created in the reader. */
469     McmdEvent* Mcmd;
470 kusanagi 1.1 public:
471 kusanagi 1.7 McmdReader(void);
472 kusanagi 1.1 virtual void Init(PamelaRun *);
473     virtual void RunEvent(int, long int);
474     virtual std::string GetVersionInfo(void) const;
475     };
476    
477 kusanagi 1.7
478     /**********************************************
479     * Event reader algorithm for ForcedFECmd events.
480     **********************************************/
481     class ForcedFECmdReader: public TechmodelAlgorithm {
482 kusanagi 1.1 private:
483 kusanagi 1.7 /** The ForcedFECmd event that is created in the reader. */
484     ForcedFECmdEvent* forcedFECmd;
485 kusanagi 1.1 public:
486 kusanagi 1.7 ForcedFECmdReader(void);
487 kusanagi 1.1 virtual void Init(PamelaRun *);
488     virtual void RunEvent(int, long int);
489     virtual std::string GetVersionInfo(void) const;
490     };
491    
492 kusanagi 1.7
493     /**********************************************
494     * Event reader algorithm for AcInit events.
495     **********************************************/
496     class AcInitReader: public TechmodelAlgorithm {
497 kusanagi 1.1 private:
498 kusanagi 1.7 /** The AcInit event that is created in the reader. */
499     AcInitEvent* acInit;
500 kusanagi 1.1 public:
501 kusanagi 1.7 AcInitReader(void);
502 kusanagi 1.1 virtual void Init(PamelaRun *);
503     virtual void RunEvent(int, long int);
504     virtual std::string GetVersionInfo(void) const;
505     };
506    
507 kusanagi 1.7
508     /**********************************************
509     * Event reader algorithm for CalInit events.
510     **********************************************/
511     class CalInitReader: public TechmodelAlgorithm {
512 kusanagi 1.1 private:
513 kusanagi 1.7 /** The CalInit event that is created in the reader. */
514     CalInitEvent* calInit;
515 kusanagi 1.1 public:
516 kusanagi 1.7 CalInitReader(void);
517 kusanagi 1.1 virtual void Init(PamelaRun *);
518     virtual void RunEvent(int, long int);
519     virtual std::string GetVersionInfo(void) const;
520     };
521    
522 kusanagi 1.7
523     /**********************************************
524     * Event reader algorithm for TrkInit events.
525     **********************************************/
526     class TrkInitReader: public TechmodelAlgorithm {
527 kusanagi 1.1 private:
528 kusanagi 1.7 /** The TrkInit event that is created in the reader. */
529     TrkInitEvent* trkInit;
530 kusanagi 1.1 public:
531 kusanagi 1.7 TrkInitReader(void);
532 kusanagi 1.1 virtual void Init(PamelaRun *);
533     virtual void RunEvent(int, long int);
534     virtual std::string GetVersionInfo(void) const;
535     };
536    
537    
538 kusanagi 1.7 /**********************************************
539     * Event reader algorithm for TofInit events.
540     **********************************************/
541     class TofInitReader: public TechmodelAlgorithm {
542 kusanagi 1.1 private:
543 kusanagi 1.7 /** The TofInit event that is created in the reader. */
544     TofInitEvent* tofInit;
545 kusanagi 1.1 public:
546 kusanagi 1.7 TofInitReader(void);
547 kusanagi 1.1 virtual void Init(PamelaRun *);
548     virtual void RunEvent(int, long int);
549     virtual std::string GetVersionInfo(void) const;
550     };
551    
552 kusanagi 1.7
553     /**********************************************
554     * Event reader algorithm for TrgInit events.
555     **********************************************/
556     class TrgInitReader: public TechmodelAlgorithm {
557 kusanagi 1.1 private:
558 kusanagi 1.7 /** The TrgInit event that is created in the reader. */
559     TrgInitEvent* trgInit;
560 kusanagi 1.1 public:
561 kusanagi 1.7 TrgInitReader(void);
562 kusanagi 1.1 virtual void Init(PamelaRun *);
563     virtual void RunEvent(int, long int);
564     virtual std::string GetVersionInfo(void) const;
565     };
566    
567    
568 kusanagi 1.7 /**********************************************
569     * Event reader algorithm for PSCU events.
570     **********************************************/
571     class PscuReader: public TechmodelAlgorithm {
572 kusanagi 1.4 private:
573 kusanagi 1.7 /** The PSCU event that is created in the reader. */
574     PscuEvent* Pscu;
575 kusanagi 1.4 public:
576 kusanagi 1.7 PscuReader(void);
577 kusanagi 1.4 virtual void Init(PamelaRun *);
578     virtual void RunEvent(int, long int);
579     virtual std::string GetVersionInfo(void) const;
580     };
581 kusanagi 1.7
582    
583 kusanagi 1.1 }
584     }
585    
586     #endif /* READER_ALGORITHM_H */
587    
588    

  ViewVC Help
Powered by ViewVC 1.1.23