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