1 |
|
2 |
// Implementation of the S4InitReader class. |
3 |
|
4 |
#include "ReaderAlgorithms.h" |
5 |
using namespace pamela::techmodel; |
6 |
|
7 |
|
8 |
/** |
9 |
* Constructor. |
10 |
*/ |
11 |
S4InitReader::S4InitReader(void): |
12 |
TechmodelAlgorithm(PacketType::S4Init, "S4InitReader") { |
13 |
s4Init = new S4InitEvent; |
14 |
} |
15 |
|
16 |
/** |
17 |
* Get a string with the version info of the algorithm. |
18 |
*/ |
19 |
std::string S4InitReader::GetVersionInfo(void) const { |
20 |
return |
21 |
"$Trailer: /home/cvsmanager/yoda/techmodel/S4InitReader.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 S4InitReader::Init(PamelaRun *run) { |
29 |
run->WriteSubPacket(this, &s4Init, s4Init->Class()); |
30 |
} |
31 |
|
32 |
/** |
33 |
* Unpack the S4Init event |
34 |
*/ |
35 |
void S4InitReader::PKT_RunEvent(char* subData, long int dataLength) throw (WrongCRCException){ |
36 |
s4Init->s4InitData = new TArrayC(dataLength, subData); |
37 |
} |