1 |
/** @file |
/** @file |
2 |
* $Source: /home/cvsmanager/yoda/techmodel/RunHeaderReader.cpp,v $ |
* $Source: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/RunHeaderReader.cpp,v $ |
3 |
* $Id: RunHeaderReader.cpp,v 6.1 2006/05/30 19:10:02 kusanagi Exp $ |
* $Id: RunHeaderReader.cpp,v 6.2 2006/05/30 19:10:03 kusanagi Exp $ |
4 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
5 |
* |
* |
6 |
* Implementation of the RunHeader class. |
* Implementation of the RunHeader class. |
30 |
*/ |
*/ |
31 |
std::string RunHeaderReader::GetVersionInfo(void) const { |
std::string RunHeaderReader::GetVersionInfo(void) const { |
32 |
return |
return |
33 |
"$Header: /home/cvsmanager/yoda/techmodel/RunHeaderReader.cpp,v 6.1 2006/05/30 19:10:02 kusanagi Exp $\n"; |
"$Header: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/RunHeaderReader.cpp,v 6.2 2006/05/30 19:10:03 kusanagi Exp $\n"; |
34 |
} |
} |
35 |
|
|
36 |
/** |
/** |
52 |
UINT16 subCRC; //calculated CRC of the data |
UINT16 subCRC; //calculated CRC of the data |
53 |
UINT16 readCRC; //CRC read from the end of the subpacket |
UINT16 readCRC; //CRC read from the end of the subpacket |
54 |
long int dataLength = length - 2; //the block of data |
long int dataLength = length - 2; //the block of data |
55 |
|
memset(subData, 0, length*sizeof(char)); |
56 |
InputFile->read(subData, sizeof(subData)); |
InputFile->read(subData, sizeof(subData)); |
57 |
subCRC = CM_Compute_CRC16(0, (UINT8*)subData, dataLength); |
subCRC = CM_Compute_CRC16(0, (UINT8*)subData, dataLength); |
58 |
readCRC = (((UINT16)(subData[length - 2]<<8))&0xFF00) + (((UINT16)subData[length - 1])&0x00FF); |
readCRC = (((UINT16)(subData[length - 2]<<8))&0xFF00) + (((UINT16)subData[length - 1])&0x00FF); |