| 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")); |
| 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 |
|
|