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

Contents of /yoda/techmodel/ReaderAlgorithms.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sat Jul 17 20:03:38 2004 UTC (20 years, 5 months ago) by kusanagi
Branch: MAIN
Changes since 1.4: +8 -8 lines
File MIME type: text/plain
*** empty log message ***

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

  ViewVC Help
Powered by ViewVC 1.1.23