1 |
/** @file |
/** @file |
2 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
3 |
* $Date: 2004/09/21 20:24:33 $ |
* $Date: 2006/02/15 15:47:14 $ |
4 |
* $Revision: 1.8 $ |
* $Revision: 6.1 $ |
5 |
* |
* |
6 |
* Header file for the algorithms used to read the techmodel data file. |
* Header file for the algorithms used to read the techmodel data file. |
7 |
*/ |
*/ |
13 |
#include "PscuEvent.h" |
#include "PscuEvent.h" |
14 |
|
|
15 |
|
|
16 |
#include "PhysEndRunEvent.h" |
#include "endrun/PhysEndRunEvent.h" |
17 |
#include "CalibCalPulse1Event.h" |
#include "CalibCalPulse1Event.h" |
18 |
#include "CalibCalPulse2Event.h" |
#include "CalibCalPulse2Event.h" |
19 |
#include "physics/TrackerReader.h" |
#include "physics/TrackerReader.h" |
20 |
#include "physics/AnticounterReader.h" |
#include "physics/AnticounterReader.h" |
21 |
#include "physics/CalorimeterReader.h" |
#include "physics/CalorimeterReader.h" |
22 |
#include "physics/NeutronDetectorReader.h" |
#include "physics/NeutronDetectorReader.h" |
23 |
#include "CalibTrkBothEvent.h" |
#include "physics/S4Reader.h" |
24 |
|
#include "physics/TofReader.h" |
25 |
|
#include "physics/TriggerReader.h" |
26 |
#include "CalibTrk1Event.h" |
#include "CalibTrk1Event.h" |
27 |
#include "CalibTrk2Event.h" |
#include "CalibTrk2Event.h" |
|
#include "CalibTrdEvent.h" |
|
28 |
#include "CalibTofEvent.h" |
#include "CalibTofEvent.h" |
29 |
#include "CalibS4Event.h" |
#include "CalibS4Event.h" |
30 |
#include "CalibCalPedEvent.h" |
#include "CalibCalPedEvent.h" |
31 |
#include "CalibAcEvent.h" |
#include "Calib1_Ac1Event.h" |
32 |
|
#include "Calib1_Ac2Event.h" |
33 |
|
#include "Calib2_Ac1Event.h" |
34 |
|
#include "Calib2_Ac2Event.h" |
35 |
#include "RunHeaderEvent.h" |
#include "RunHeaderEvent.h" |
36 |
#include "RunTrailerEvent.h" |
#include "RunTrailerEvent.h" |
37 |
#include "CalibHeaderEvent.h" |
#include "CalibHeaderEvent.h" |
39 |
#include "InitHeaderEvent.h" |
#include "InitHeaderEvent.h" |
40 |
#include "InitTrailerEvent.h" |
#include "InitTrailerEvent.h" |
41 |
#include "EventTrkEvent.h" |
#include "EventTrkEvent.h" |
|
#include "TestTrkEvent.h" |
|
|
#include "TestTofEvent.h" |
|
42 |
#include "log/LogEvent.h" |
#include "log/LogEvent.h" |
43 |
#include "varDump/VarDumpEvent.h" |
#include "varDump/VarDumpEvent.h" |
44 |
#include "arrDump/ArrDumpEvent.h" |
#include "arrDump/ArrDumpEvent.h" |
45 |
#include "tabDump/TabDumpEvent.h" |
#include "tabDump/TabDumpEvent.h" |
46 |
|
#include "tsbt/TsbTEvent.h" |
47 |
|
#include "tsbb/TsbBEvent.h" |
48 |
#include "tmtc/TmtcEvent.h" |
#include "tmtc/TmtcEvent.h" |
49 |
#include "mcmd/McmdEvent.h" |
#include "mcmd/McmdEvent.h" |
50 |
#include "ForcedFECmdEvent.h" |
#include "ForcedFECmdEvent.h" |
51 |
#include "AcInitEvent.h" |
#include "Ac1InitEvent.h" |
52 |
#include "CalInitEvent.h" |
#include "CalInitEvent.h" |
53 |
#include "TrkInitEvent.h" |
#include "TrkInitEvent.h" |
54 |
#include "TofInitEvent.h" |
#include "TofInitEvent.h" |
55 |
#include "TrgInitEvent.h" |
#include "TrgInitEvent.h" |
56 |
|
#include "NdInitEvent.h" |
57 |
|
#include "S4InitEvent.h" |
58 |
|
#include "Ac2InitEvent.h" |
59 |
#include "CalAlarmEvent.h" |
#include "CalAlarmEvent.h" |
60 |
#include "AcAlarmEvent.h" |
#include "AcAlarmEvent.h" |
61 |
#include "TrkAlarmEvent.h" |
#include "TrkAlarmEvent.h" |
62 |
#include "TrgAlarmEvent.h" |
#include "TrgAlarmEvent.h" |
63 |
#include "TofAlarmEvent.h" |
#include "TofAlarmEvent.h" |
64 |
|
#include "S4AlarmEvent.h" |
65 |
|
#include <fstream> |
66 |
|
#include <log4cxx/logger.h> |
67 |
|
|
68 |
|
extern "C" { |
69 |
|
#include "CRC.h" |
70 |
#define UINT32 unsigned int |
} |
|
#define UINT16 unsigned short |
|
|
#define BYTE unsigned char |
|
71 |
|
|
72 |
using namespace std; |
using namespace std; |
73 |
|
|
74 |
namespace pamela { |
namespace pamela { |
75 |
namespace techmodel { |
namespace techmodel { |
76 |
|
|
77 |
/********************************************** |
/** |
78 |
* Event reader algorithm for PhysEndRun events. |
Event reader algorithm for PhysEndRun events. |
79 |
**********************************************/ |
* |
80 |
|
*/ |
81 |
class PhysEndRunReader: public TechmodelAlgorithm { |
class PhysEndRunReader: public TechmodelAlgorithm { |
82 |
private: |
private: |
83 |
/** The PhysEndRun event that is created in the reader. */ |
/** The PhysEndRun event that is created in the reader. */ |
84 |
PhysEndRunEvent* physEndRun; |
PhysEndRunEvent* physEndRun; |
85 |
public: |
public: |
86 |
|
/** |
87 |
|
* Constructor |
88 |
|
* @param |
89 |
|
* @return |
90 |
|
*/ |
91 |
PhysEndRunReader(void); |
PhysEndRunReader(void); |
92 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
93 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
94 |
//this type of RUNEvent should be the future develop. |
//this type of RUNEvent should be the future develop. |
95 |
//Pass the buffer not the pointer to file |
//Pass the buffer not the pointer to file |
96 |
//virtual void RunEvent(int, long int, char[]); |
//virtual void RunEvent(int, long int, char[]); |
108 |
public: |
public: |
109 |
CalibCalPulse1Reader(void); |
CalibCalPulse1Reader(void); |
110 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
111 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (Exception); |
112 |
//this type of RUNEvent should be the future develop. |
//this type of RUNEvent should be the future develop. |
113 |
//Pass the buffer not the pointer to file |
//Pass the buffer not the pointer to file |
114 |
//virtual void RunEvent(int, long int, char[]); |
//virtual void RunEvent(int, long int, char[]); |
126 |
public: |
public: |
127 |
CalibCalPulse2Reader(void); |
CalibCalPulse2Reader(void); |
128 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
129 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (Exception); |
130 |
//this type of RUNEvent should be the future develop. |
//this type of RUNEvent should be the future develop. |
131 |
//Pass the buffer not the pointer to file |
//Pass the buffer not the pointer to file |
132 |
//virtual void RunEvent(int, long int, char[]); |
//virtual void RunEvent(int, long int, char[]); |
144 |
anticounter::AnticounterReader* anticounterReader; |
anticounter::AnticounterReader* anticounterReader; |
145 |
calorimeter::CalorimeterReader* calorimeterReader; |
calorimeter::CalorimeterReader* calorimeterReader; |
146 |
neutron::NeutronDetectorReader* neutronReader; |
neutron::NeutronDetectorReader* neutronReader; |
147 |
|
S4::S4Reader* s4Reader; |
148 |
|
tof::TofReader* tofReader; |
149 |
|
trigger::TriggerReader* triggerReader; |
150 |
public: |
public: |
151 |
PhysicsReader(void); |
PhysicsReader(void); |
152 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
153 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (Exception); |
154 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
155 |
}; |
}; |
156 |
|
|
157 |
|
|
158 |
/********************************************** |
/********************************************** |
159 |
|
<<<<<<< ReaderAlgorithms.h |
160 |
* Event reader algorithm for CalibTrkBoth events. |
* Event reader algorithm for CalibTrkBoth events. |
161 |
**********************************************/ |
**********************************************/ |
162 |
class CalibTrkBothReader: public TechmodelAlgorithm { |
/* class CalibTrkBothReader: public TechmodelAlgorithm { |
163 |
private: |
private: |
164 |
/** The CalibTrkBoth event that is created in the reader. */ |
// The CalibTrkBoth event that is created in the reader. |
165 |
CalibTrkBothEvent* calibTrkBoth; |
CalibTrkBothEvent* calibTrkBoth; |
166 |
public: |
public: |
167 |
CalibTrkBothReader(void); |
CalibTrkBothReader(void); |
168 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
169 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (Exception); |
170 |
//this type of RUNEvent should be the future develop. |
//this type of RUNEvent should be the future develop. |
171 |
//Pass the buffer not the pointer to file |
//Pass the buffer not the pointer to file |
172 |
//virtual void RunEvent(int, long int, char[]); |
//virtual void RunEvent(int, long int, char[]); |
173 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
174 |
}; |
}; |
175 |
|
*/ |
176 |
|
|
177 |
/********************************************** |
/********************************************** |
178 |
|
======= |
179 |
|
>>>>>>> 6.1 |
180 |
* Event reader algorithm for CalibTrk1 events. |
* Event reader algorithm for CalibTrk1 events. |
181 |
**********************************************/ |
**********************************************/ |
182 |
class CalibTrk1Reader: public TechmodelAlgorithm { |
class CalibTrk1Reader: public TechmodelAlgorithm { |
186 |
public: |
public: |
187 |
CalibTrk1Reader(void); |
CalibTrk1Reader(void); |
188 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
189 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (Exception); |
190 |
//this type of RUNEvent should be the future develop. |
//this type of RUNEvent should be the future develop. |
191 |
//Pass the buffer not the pointer to file |
//Pass the buffer not the pointer to file |
192 |
//virtual void RunEvent(int, long int, char[]); |
//virtual void RunEvent(int, long int, char[]); |
204 |
public: |
public: |
205 |
CalibTrk2Reader(void); |
CalibTrk2Reader(void); |
206 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
207 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (Exception); |
|
virtual std::string GetVersionInfo(void) const; |
|
|
}; |
|
|
|
|
|
|
|
|
/********************************************** |
|
|
* Event reader algorithm for CalibTrd events. |
|
|
**********************************************/ |
|
|
class CalibTrdReader: public TechmodelAlgorithm { |
|
|
private: |
|
|
/** The CalibTrd event that is created in the reader. */ |
|
|
CalibTrdEvent* calibTrd; |
|
|
public: |
|
|
CalibTrdReader(void); |
|
|
virtual void Init(PamelaRun *); |
|
|
virtual void RunEvent(int, long int); |
|
208 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
209 |
}; |
}; |
210 |
|
|
219 |
public: |
public: |
220 |
CalibTofReader(void); |
CalibTofReader(void); |
221 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
222 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (Exception); |
223 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
224 |
}; |
}; |
225 |
|
|
230 |
class CalibS4Reader: public TechmodelAlgorithm { |
class CalibS4Reader: public TechmodelAlgorithm { |
231 |
private: |
private: |
232 |
/** The CalibCal event that is created in the reader. */ |
/** The CalibCal event that is created in the reader. */ |
233 |
CalibS4Event* CalibS4; |
CalibS4Event* calibS4; |
234 |
public: |
public: |
235 |
CalibS4Reader(void); |
CalibS4Reader(void); |
236 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
237 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
238 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
239 |
}; |
}; |
240 |
|
|
249 |
public: |
public: |
250 |
CalibCalPedReader(void); |
CalibCalPedReader(void); |
251 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
252 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (Exception); |
253 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
254 |
}; |
}; |
255 |
|
|
256 |
|
|
257 |
/*********************************************** |
/*********************************************** |
258 |
* Event reader algorithm for CalibAc events. |
* Event reader algorithm for Calib1_Ac1 events. |
259 |
**********************************************/ |
**********************************************/ |
260 |
class CalibAcReader: public TechmodelAlgorithm { |
class Calib1_Ac1Reader: public TechmodelAlgorithm { |
261 |
private: |
private: |
262 |
/** The CalibAc event that is created in the reader. */ |
/** The CalibAc event that is created in the reader. */ |
263 |
CalibAcEvent* CalibAc; |
Calib1_Ac1Event* calib1_Ac1; |
264 |
public: |
public: |
265 |
CalibAcReader(void); |
Calib1_Ac1Reader(void); |
266 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
267 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (Exception); |
268 |
|
virtual std::string GetVersionInfo(void) const; |
269 |
|
}; |
270 |
|
|
271 |
|
|
272 |
|
/*********************************************** |
273 |
|
* Event reader algorithm for Calib1_Ac2 events. |
274 |
|
**********************************************/ |
275 |
|
class Calib1_Ac2Reader: public TechmodelAlgorithm { |
276 |
|
private: |
277 |
|
/** The Calib1_Ac2 event that is created in the reader. */ |
278 |
|
Calib1_Ac2Event* calib1_Ac2; |
279 |
|
public: |
280 |
|
Calib1_Ac2Reader(void); |
281 |
|
virtual void Init(PamelaRun *); |
282 |
|
virtual void RunEvent(int, long int) throw (Exception); |
283 |
|
virtual std::string GetVersionInfo(void) const; |
284 |
|
}; |
285 |
|
|
286 |
|
/*********************************************** |
287 |
|
* Event reader algorithm for Calib2_Ac1 events. |
288 |
|
**********************************************/ |
289 |
|
class Calib2_Ac1Reader: public TechmodelAlgorithm { |
290 |
|
private: |
291 |
|
/** The Calib2_Ac1 event that is created in the reader. */ |
292 |
|
Calib2_Ac1Event* calib2_Ac1; |
293 |
|
public: |
294 |
|
Calib2_Ac1Reader(void); |
295 |
|
virtual void Init(PamelaRun *); |
296 |
|
virtual void RunEvent(int, long int) throw (Exception); |
297 |
|
virtual std::string GetVersionInfo(void) const; |
298 |
|
}; |
299 |
|
|
300 |
|
/*********************************************** |
301 |
|
* Event reader algorithm for Calib2_Ac2 events. |
302 |
|
**********************************************/ |
303 |
|
class Calib2_Ac2Reader: public TechmodelAlgorithm { |
304 |
|
private: |
305 |
|
/** The Calib2_Ac2 event that is created in the reader. */ |
306 |
|
Calib2_Ac2Event* calib2_Ac2; |
307 |
|
public: |
308 |
|
Calib2_Ac2Reader(void); |
309 |
|
virtual void Init(PamelaRun *); |
310 |
|
virtual void RunEvent(int, long int) throw (Exception); |
311 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
312 |
}; |
}; |
313 |
|
|
322 |
public: |
public: |
323 |
RunHeaderReader(void); |
RunHeaderReader(void); |
324 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
325 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
326 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
327 |
}; |
}; |
328 |
|
|
337 |
public: |
public: |
338 |
RunTrailerReader(void); |
RunTrailerReader(void); |
339 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
340 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
341 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
342 |
}; |
}; |
343 |
|
|
352 |
public: |
public: |
353 |
CalibHeaderReader(void); |
CalibHeaderReader(void); |
354 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
355 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
356 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
357 |
}; |
}; |
358 |
|
|
367 |
public: |
public: |
368 |
CalibTrailerReader(void); |
CalibTrailerReader(void); |
369 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
370 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
371 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
372 |
}; |
}; |
373 |
|
|
382 |
public: |
public: |
383 |
InitHeaderReader(void); |
InitHeaderReader(void); |
384 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
385 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
386 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
387 |
}; |
}; |
388 |
|
|
397 |
public: |
public: |
398 |
InitTrailerReader(void); |
InitTrailerReader(void); |
399 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
400 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
401 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
402 |
}; |
}; |
403 |
|
|
412 |
public: |
public: |
413 |
EventTrkReader(void); |
EventTrkReader(void); |
414 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
415 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (Exception); |
416 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
417 |
}; |
}; |
418 |
|
|
419 |
|
|
420 |
/********************************************** |
/********************************************** |
|
* Event reader algorithm for TestTrk events. |
|
|
**********************************************/ |
|
|
class TestTrkReader: public TechmodelAlgorithm { |
|
|
private: |
|
|
/** The TestTrk event that is created in the reader. */ |
|
|
TestTrkEvent* testTrk; |
|
|
public: |
|
|
TestTrkReader(void); |
|
|
virtual void Init(PamelaRun *); |
|
|
virtual void RunEvent(int, long int); |
|
|
virtual std::string GetVersionInfo(void) const; |
|
|
}; |
|
|
|
|
|
/********************************************** |
|
|
* Event reader algorithm for TestTof events. |
|
|
**********************************************/ |
|
|
class TestTofReader: public TechmodelAlgorithm { |
|
|
private: |
|
|
/** The TestTof event that is created in the reader. */ |
|
|
TestTofEvent* testTof; |
|
|
public: |
|
|
TestTofReader(void); |
|
|
virtual void Init(PamelaRun *); |
|
|
virtual void RunEvent(int, long int); |
|
|
virtual std::string GetVersionInfo(void) const; |
|
|
}; |
|
|
|
|
|
/********************************************** |
|
421 |
* Event reader algorithm for Log events. |
* Event reader algorithm for Log events. |
422 |
**********************************************/ |
**********************************************/ |
423 |
class LogReader: public TechmodelAlgorithm { |
class LogReader: public TechmodelAlgorithm { |
427 |
public: |
public: |
428 |
LogReader(void); |
LogReader(void); |
429 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
430 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
431 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
432 |
}; |
}; |
433 |
|
|
442 |
public: |
public: |
443 |
VarDumpReader(void); |
VarDumpReader(void); |
444 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
445 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
446 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
447 |
}; |
}; |
448 |
|
|
457 |
public: |
public: |
458 |
ArrDumpReader(void); |
ArrDumpReader(void); |
459 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
460 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
461 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
462 |
}; |
}; |
463 |
|
|
472 |
public: |
public: |
473 |
TabDumpReader(void); |
TabDumpReader(void); |
474 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
475 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
476 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
477 |
}; |
}; |
478 |
|
|
482 |
**********************************************/ |
**********************************************/ |
483 |
class TmtcReader: public TechmodelAlgorithm { |
class TmtcReader: public TechmodelAlgorithm { |
484 |
//Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC) |
//Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC) |
485 |
static const int TMTC_SUB_LENGTH = 57; |
static const int TMTC_SUB_LENGTH = 44; |
486 |
//Length in bytes of the subPacketCRC |
//Length in bytes of the subPacketCRC |
487 |
static const int TMTC_SUBCRC_LENGTH = 1; |
static const int TMTC_SUBCRC_LENGTH = 1; |
488 |
//Length in bytes of the PacketCRC |
//Length in bytes of the PacketCRC |
490 |
private: |
private: |
491 |
/** The TMTC event that is created in the reader. */ |
/** The TMTC event that is created in the reader. */ |
492 |
TmtcEvent* Tmtc; |
TmtcEvent* Tmtc; |
493 |
float convert_th(int); |
//float convert_th(int); |
494 |
public: |
public: |
495 |
TmtcReader(void); |
TmtcReader(void); |
496 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
497 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
498 |
virtual string GetVersionInfo(void) const; |
virtual string GetVersionInfo(void) const; |
499 |
}; |
}; |
500 |
|
|
509 |
public: |
public: |
510 |
McmdReader(void); |
McmdReader(void); |
511 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
512 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
513 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
514 |
}; |
}; |
515 |
|
|
524 |
public: |
public: |
525 |
ForcedFECmdReader(void); |
ForcedFECmdReader(void); |
526 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
527 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
528 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
529 |
}; |
}; |
530 |
|
|
531 |
|
|
532 |
/********************************************** |
/********************************************** |
533 |
* Event reader algorithm for AcInit events. |
* Event reader algorithm for Ac1Init events. |
534 |
**********************************************/ |
**********************************************/ |
535 |
class AcInitReader: public TechmodelAlgorithm { |
class Ac1InitReader: public TechmodelAlgorithm { |
536 |
private: |
private: |
537 |
/** The AcInit event that is created in the reader. */ |
/** The Ac1Init event that is created in the reader. */ |
538 |
AcInitEvent* acInit; |
Ac1InitEvent* ac1Init; |
539 |
public: |
public: |
540 |
AcInitReader(void); |
Ac1InitReader(void); |
541 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
542 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
543 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
544 |
}; |
}; |
545 |
|
|
554 |
public: |
public: |
555 |
CalInitReader(void); |
CalInitReader(void); |
556 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
557 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
558 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
559 |
}; |
}; |
560 |
|
|
569 |
public: |
public: |
570 |
TrkInitReader(void); |
TrkInitReader(void); |
571 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
572 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
573 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
574 |
}; |
}; |
575 |
|
|
584 |
public: |
public: |
585 |
TofInitReader(void); |
TofInitReader(void); |
586 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
587 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
588 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
589 |
}; |
}; |
590 |
|
|
599 |
public: |
public: |
600 |
TrgInitReader(void); |
TrgInitReader(void); |
601 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
602 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
603 |
|
virtual std::string GetVersionInfo(void) const; |
604 |
|
}; |
605 |
|
|
606 |
|
/********************************************** |
607 |
|
* Event reader algorithm for NdInit events. |
608 |
|
**********************************************/ |
609 |
|
class NdInitReader: public TechmodelAlgorithm { |
610 |
|
private: |
611 |
|
/** The NdInit event that is created in the reader. */ |
612 |
|
NdInitEvent* ndInit; |
613 |
|
public: |
614 |
|
NdInitReader(void); |
615 |
|
virtual void Init(PamelaRun *); |
616 |
|
virtual void RunEvent(int, long int) throw (WrongCRCException); |
617 |
|
virtual std::string GetVersionInfo(void) const; |
618 |
|
}; |
619 |
|
|
620 |
|
/********************************************** |
621 |
|
* Event reader algorithm for S4Init events. |
622 |
|
**********************************************/ |
623 |
|
class S4InitReader: public TechmodelAlgorithm { |
624 |
|
private: |
625 |
|
/** The S4Init event that is created in the reader. */ |
626 |
|
S4InitEvent* s4Init; |
627 |
|
public: |
628 |
|
S4InitReader(void); |
629 |
|
virtual void Init(PamelaRun *); |
630 |
|
virtual void RunEvent(int, long int) throw (WrongCRCException); |
631 |
|
virtual std::string GetVersionInfo(void) const; |
632 |
|
}; |
633 |
|
|
634 |
|
|
635 |
|
/********************************************** |
636 |
|
* Event reader algorithm for Ac2Init events. |
637 |
|
**********************************************/ |
638 |
|
class Ac2InitReader: public TechmodelAlgorithm { |
639 |
|
private: |
640 |
|
/** The Ac2Init event that is created in the reader. */ |
641 |
|
Ac2InitEvent* ac2Init; |
642 |
|
public: |
643 |
|
Ac2InitReader(void); |
644 |
|
virtual void Init(PamelaRun *); |
645 |
|
virtual void RunEvent(int, long int) throw (WrongCRCException); |
646 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
647 |
}; |
}; |
648 |
|
|
649 |
|
|
650 |
/********************************************** |
/********************************************** |
651 |
* Event reader algorithm for CalAlarm events. |
* Event reader algorithm for CalAlarm events. |
652 |
**********************************************/ |
**********************************************/ |
657 |
public: |
public: |
658 |
CalAlarmReader(void); |
CalAlarmReader(void); |
659 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
660 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
661 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
662 |
}; |
}; |
663 |
|
|
671 |
public: |
public: |
672 |
AcAlarmReader(void); |
AcAlarmReader(void); |
673 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
674 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
675 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
676 |
}; |
}; |
677 |
|
|
685 |
public: |
public: |
686 |
TrkAlarmReader(void); |
TrkAlarmReader(void); |
687 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
688 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
689 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
690 |
}; |
}; |
691 |
|
|
699 |
public: |
public: |
700 |
TrgAlarmReader(void); |
TrgAlarmReader(void); |
701 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
702 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
703 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
704 |
}; |
}; |
705 |
|
|
713 |
public: |
public: |
714 |
TofAlarmReader(void); |
TofAlarmReader(void); |
715 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
716 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
717 |
|
virtual std::string GetVersionInfo(void) const; |
718 |
|
}; |
719 |
|
|
720 |
|
/********************************************** |
721 |
|
* Event reader algorithm for S4Alarm events. |
722 |
|
**********************************************/ |
723 |
|
class S4AlarmReader: public TechmodelAlgorithm { |
724 |
|
private: |
725 |
|
/** The S4Alarm event that is created in the reader. */ |
726 |
|
S4AlarmEvent* s4Alarm; |
727 |
|
public: |
728 |
|
S4AlarmReader(void); |
729 |
|
virtual void Init(PamelaRun *); |
730 |
|
virtual void RunEvent(int, long int) throw (WrongCRCException); |
731 |
|
virtual std::string GetVersionInfo(void) const; |
732 |
|
}; |
733 |
|
|
734 |
|
/********************************************** |
735 |
|
* Event reader algorithm for TsbT events. |
736 |
|
**********************************************/ |
737 |
|
class TsbTReader: public TechmodelAlgorithm { |
738 |
|
private: |
739 |
|
/** The TsbT event that is created in the reader. */ |
740 |
|
TsbTEvent* TsbT; |
741 |
|
public: |
742 |
|
TsbTReader(void); |
743 |
|
virtual void Init(PamelaRun *); |
744 |
|
virtual void RunEvent(int, long int) throw (WrongCRCException); |
745 |
|
virtual std::string GetVersionInfo(void) const; |
746 |
|
}; |
747 |
|
|
748 |
|
/********************************************** |
749 |
|
* Event reader algorithm for TsbB events. |
750 |
|
**********************************************/ |
751 |
|
class TsbBReader: public TechmodelAlgorithm { |
752 |
|
private: |
753 |
|
/** The TsbB event that is created in the reader. */ |
754 |
|
TsbBEvent* TsbB; |
755 |
|
public: |
756 |
|
TsbBReader(void); |
757 |
|
virtual void Init(PamelaRun *); |
758 |
|
virtual void RunEvent(int, long int) throw (WrongCRCException); |
759 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
760 |
}; |
}; |
761 |
|
|
769 |
public: |
public: |
770 |
PscuReader(void); |
PscuReader(void); |
771 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
772 |
virtual void RunEvent(int, long int); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
773 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
774 |
}; |
}; |
775 |
|
|
780 |
#endif /* READER_ALGORITHM_H */ |
#endif /* READER_ALGORITHM_H */ |
781 |
|
|
782 |
|
|
783 |
|
|
784 |
|
|