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