/[PAMELA software]/yoda/techmodel/CalibCalReader.cpp
ViewVC logotype

Contents of /yoda/techmodel/CalibCalReader.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6.3 - (show annotations) (download)
Fri Sep 29 10:19:19 2006 UTC (18 years, 2 months ago) by mocchiut
Branch: MAIN
CVS Tags: YODA6_3/19, YODA6_3/18, YODA6_3/13, YODA6_3/12, YODA6_3/11, YODA6_3/17, YODA6_3/16, YODA6_3/15, YODA6_3/14, YODA6_3/20, HEAD
Changes since 6.2: +1 -0 lines
Last event bug fixed, compilation warnings/errors fixed

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

  ViewVC Help
Powered by ViewVC 1.1.23