1 |
mocchiut |
1.1 |
/** @file |
2 |
|
|
* $Source: /repository/PamOffLineSW/techmodel/CalibTofReader.cpp,v $ |
3 |
|
|
* $Id: CalibTofReader.cpp,v 1.5 2008-03-04 18:09:30 messineo Exp $ |
4 |
|
|
* $Author: messineo $ |
5 |
|
|
* |
6 |
|
|
* Implementation of the LogReader class. |
7 |
|
|
* ToBeDone: |
8 |
|
|
* Control the CRC for the entire data Packet not just for single records |
9 |
|
|
*/ |
10 |
|
|
|
11 |
|
|
|
12 |
|
|
#include "ReaderAlgorithms.h" |
13 |
|
|
|
14 |
|
|
using namespace pamela::techmodel; |
15 |
|
|
|
16 |
|
|
/** |
17 |
|
|
* Constructor. |
18 |
|
|
*/ |
19 |
|
|
CalibTofReader::CalibTofReader(void): |
20 |
|
|
TechmodelAlgorithm(PacketType::Log, "TechmodelCalibTofReader") { |
21 |
|
|
calibTof = new CalibTofEvent(); |
22 |
|
|
} |
23 |
|
|
|
24 |
|
|
/** |
25 |
|
|
* Get a string with the version info of the algorithm. |
26 |
|
|
*/ |
27 |
|
|
std::string CalibTofReader::GetVersionInfo(void) const { |
28 |
|
|
return |
29 |
|
|
"$Header: /repository/PamOffLineSW/techmodel/CalibTofReader.cpp,v 1.5 2008-03-04 18:09:30 messineo Exp $\n"; |
30 |
|
|
} |
31 |
|
|
|
32 |
|
|
/** |
33 |
|
|
* Initialize the algorithm with a special run. This will initialize the |
34 |
|
|
* event reader routines for all packet types. |
35 |
|
|
*/ |
36 |
|
|
void CalibTofReader::Init(PamelaRun *run) { |
37 |
|
|
run->WriteSubPacket(this, &calibTof, calibTof->Class()); |
38 |
|
|
} |
39 |
|
|
|
40 |
|
|
/** |
41 |
|
|
* Unpack the CalibTof event from an input file. |
42 |
|
|
*/ |
43 |
|
|
void CalibTofReader::PKT_RunEvent(char* subData, long int dataLength) throw (Exception){ |
44 |
|
|
calibTof->calibTofData = new TArrayC(dataLength, subData); |
45 |
|
|
} |