1 |
mocchiut |
1.1 |
|
2 |
|
|
// Implementation of the CalAlarmReader class. |
3 |
|
|
|
4 |
|
|
#include "ReaderAlgorithms.h" |
5 |
|
|
|
6 |
|
|
using namespace pamela::techmodel; |
7 |
|
|
|
8 |
|
|
/** |
9 |
|
|
* Constructor. |
10 |
|
|
*/ |
11 |
|
|
CalAlarmReader::CalAlarmReader(void): |
12 |
|
|
TechmodelAlgorithm(PacketType::CalAlarm, "TechmodelCalAlarmReader") { |
13 |
|
|
calAlarm = new CalAlarmEvent(); |
14 |
|
|
} |
15 |
|
|
|
16 |
|
|
/** |
17 |
|
|
* Get a string with the version info of the algorithm. |
18 |
|
|
*/ |
19 |
|
|
std::string CalAlarmReader::GetVersionInfo(void) const { |
20 |
|
|
return |
21 |
|
|
"$Trailer: /home/cvsmanager/yoda/techmodel/CalAlarmReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 Maurizio Nagni Exp $\n"; |
22 |
|
|
} |
23 |
|
|
|
24 |
|
|
/** |
25 |
|
|
* Initialize the algorithm with a special run. This will initialize the |
26 |
|
|
* event reader routines for all packet types. |
27 |
|
|
*/ |
28 |
|
|
void CalAlarmReader::Init(PamelaRun *run) { |
29 |
|
|
run->WriteSubPacket(this, &calAlarm, calAlarm->Class()); |
30 |
|
|
} |
31 |
|
|
|
32 |
|
|
/** |
33 |
|
|
* Unpack the CalAlarm event |
34 |
|
|
* The CPU does not add any CRC control at the packet end. |
35 |
|
|
* @param EventNumber |
36 |
|
|
* @param dataLength |
37 |
|
|
*/ |
38 |
|
|
void CalAlarmReader::PKT_RunEvent(char* subData, long int dataLength) throw (WrongCRCException){ |
39 |
|
|
calAlarm->calAlarmData = new TArrayC(dataLength, subData); |
40 |
|
|
} |