47 |
*/ |
*/ |
48 |
std::string CalibCalPedReader::GetVersionInfo(void) const { |
std::string CalibCalPedReader::GetVersionInfo(void) const { |
49 |
return |
return |
50 |
"$Header: /home/cvsmanager/yoda/techmodel/CalibCalPedReader.cpp,v 1.4 2004/08/19 15:24:46 kusanagi Exp $\n"; |
"$Header: /home/cvsmanager/yoda/techmodel/CalibCalPedReader.cpp,v 1.5 2004/08/20 15:01:41 kusanagi Exp $\n"; |
51 |
} |
} |
52 |
|
|
53 |
/** |
/** |
64 |
*/ |
*/ |
65 |
void CalibCalPedReader::RunEvent(int EventNumber, long int length) { |
void CalibCalPedReader::RunEvent(int EventNumber, long int length) { |
66 |
|
|
67 |
char packetData[length-2]; |
char *packetData; |
68 |
char CRCevent[2]; |
char CRCevent[2]; |
69 |
UINT16 calculatedCRC = 0; //calculated CRC |
UINT16 calculatedCRC = 0; //calculated CRC |
70 |
UINT16 readCRC = 0; //read CRC |
UINT16 readCRC = 0; //read CRC |
72 |
int ERROR; |
int ERROR; |
73 |
|
|
74 |
dataLength = length - 2; |
dataLength = length - 2; |
75 |
|
packetData = new char[dataLength]; |
76 |
InputFile->read(packetData, sizeof(packetData)); |
InputFile->read(packetData, sizeof(packetData)); |
77 |
InputFile->read(CRCevent, sizeof(CRCevent)); |
InputFile->read(CRCevent, sizeof(CRCevent)); |
78 |
|
|
137 |
<< "The test of calculated CRC with one wrote on file FAILED!!" |
<< "The test of calculated CRC with one wrote on file FAILED!!" |
138 |
<< "\n " << log4cpp::CategoryStream::ENDLINE; |
<< "\n " << log4cpp::CategoryStream::ENDLINE; |
139 |
} |
} |
140 |
free(packetData); |
delete [] packetData; |
141 |
} |
} |
142 |
|
|
143 |
|
|