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