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

Contents of /yoda/techmodel/ReaderAlgorithms.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Tue Jul 6 12:20:23 2004 UTC (20 years, 4 months ago) by kusanagi
Changes since 1.1: +0 -0 lines
File MIME type: text/plain

1 /** @file
2 * $Author: nagni $
3 * $Date: 2004/06/09 23:18:20 $
4 * $Revision: 1.9 $
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 "VarDumpEvent.h"
16 #include "ArrDumpEvent.h"
17 #include "TabDumpEvent.h"
18
19 #include "CalibCalEvent.h"
20 #include "CalibTrkEvent.h"
21 #include "CalibTrgEvent.h"
22 #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 * Event reader algorithm for CalibTrk events.
197 */
198 class CalibTrkReader: public TechmodelAlgorithm {
199 private:
200 /** The CalibTrk event that is created in the reader. */
201 CalibTrkEvent* calibTrk;
202 public:
203 CalibTrkReader(void);
204 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 * Event reader algorithm for CalibTrg events.
214 */
215 class CalibTrgReader: public TechmodelAlgorithm {
216 private:
217 /** The CalibTrg event that is created in the reader. */
218 CalibTrgEvent* calibTrg;
219 public:
220 CalibTrgReader(void);
221 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

  ViewVC Help
Powered by ViewVC 1.1.23