51 |
*/ |
*/ |
52 |
std::string CalibCalPulse1Reader::GetVersionInfo(void) const { |
std::string CalibCalPulse1Reader::GetVersionInfo(void) const { |
53 |
return |
return |
54 |
"$Header: /home/cvsmanager/yoda/techmodel/CalibCalPulse1Reader.cpp,v 1.1 2004/08/19 15:24:46 kusanagi Exp $\n"; |
"$Header: /home/cvsmanager/yoda/techmodel/CalibCalPulse1Reader.cpp,v 1.2 2004/08/20 15:01:41 kusanagi Exp $\n"; |
55 |
} |
} |
56 |
|
|
57 |
/** |
/** |
68 |
*/ |
*/ |
69 |
void CalibCalPulse1Reader::RunEvent(int EventNumber, long int length) { |
void CalibCalPulse1Reader::RunEvent(int EventNumber, long int length) { |
70 |
|
|
71 |
char packetData[length-2]; |
char *packetData; |
72 |
char CRCevent[2]; |
char CRCevent[2]; |
73 |
UINT16 calculatedCRC = 0; //calculated CRC |
UINT16 calculatedCRC = 0; //calculated CRC |
74 |
UINT16 readCRC = 0; //read CRC |
UINT16 readCRC = 0; //read CRC |
76 |
int ERROR; |
int ERROR; |
77 |
|
|
78 |
dataLength = length - 2; |
dataLength = length - 2; |
79 |
|
packetData = new char[dataLength]; |
80 |
InputFile->read(packetData, sizeof(packetData)); |
InputFile->read(packetData, sizeof(packetData)); |
81 |
InputFile->read(CRCevent, sizeof(CRCevent)); |
InputFile->read(CRCevent, sizeof(CRCevent)); |
82 |
|
|
141 |
<< "The test of calculated CRC with one wrote on file FAILED!!" |
<< "The test of calculated CRC with one wrote on file FAILED!!" |
142 |
<< "\n " << log4cpp::CategoryStream::ENDLINE; |
<< "\n " << log4cpp::CategoryStream::ENDLINE; |
143 |
} |
} |
144 |
free(packetData); |
delete [] packetData; |
145 |
} |
} |
146 |
|
|