1 |
|
|
2 |
// Implementation of the S4InitReader class. |
// Implementation of the S4InitReader class. |
|
|
|
3 |
|
|
|
#define UINT unsigned int |
|
|
#define BYTE unsigned char |
|
|
#include <string> |
|
|
#include <log4cxx/logger.h> |
|
|
extern "C" { |
|
|
#include "CRC.h" |
|
|
} |
|
|
|
|
|
#include <fstream> |
|
|
#include "stdio.h" |
|
4 |
#include "ReaderAlgorithms.h" |
#include "ReaderAlgorithms.h" |
|
|
|
|
|
|
|
using namespace pamela; |
|
5 |
using namespace pamela::techmodel; |
using namespace pamela::techmodel; |
6 |
|
|
7 |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.S4InitReader")); |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.S4InitReader")); |
20 |
*/ |
*/ |
21 |
std::string S4InitReader::GetVersionInfo(void) const { |
std::string S4InitReader::GetVersionInfo(void) const { |
22 |
return |
return |
23 |
"$Trailer: /home/cvsmanager/yoda/techmodel/S4InitReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 kusanagi Exp $\n"; |
"$Trailer: /home/cvsmanager/yoda/techmodel/S4InitReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 Maurizio Nagni Exp $\n"; |
24 |
} |
} |
25 |
|
|
26 |
/** |
/** |
36 |
/** |
/** |
37 |
* Unpack the S4Init event from an input file. |
* Unpack the S4Init event from an input file. |
38 |
*/ |
*/ |
39 |
void S4InitReader::RunEvent(int EventNumber, long int length) throw (WrongCRCException){ |
void S4InitReader::RunEvent(int EventNumber, long int dataLength) throw (WrongCRCException){ |
40 |
|
char subData[dataLength]; |
41 |
|
InputFile->read(subData, sizeof(subData)); |
42 |
|
s4Init->s4InitData = new TArrayC(dataLength, subData); |
43 |
} |
} |
44 |
|
|