| 1 |
/** @file |
/** @file |
| 2 |
* $Source: /home/cvspamela/yoda/techmodel/VarDumpReader.cpp,v $ |
* $Source: /home/cvsmanager/yoda/techmodel/VarDumpReader.cpp,v $ |
| 3 |
* $Id: VarDumpReader.cpp,v 1.7 2004/05/11 10:12:35 nagni Exp $ |
* $Id: VarDumpReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 kusanagi Exp $ |
| 4 |
* $Author: nagni $ |
* $Author: kusanagi $ |
| 5 |
* |
* |
| 6 |
* Implementation of the VarDumpReader class. |
* Implementation of the VarDumpReader class. |
| 7 |
*/ |
*/ |
| 33 |
* Get a string with the version info of the algorithm. |
* Get a string with the version info of the algorithm. |
| 34 |
*/ |
*/ |
| 35 |
std::string VarDumpReader::GetVersionInfo(void) const { |
std::string VarDumpReader::GetVersionInfo(void) const { |
| 36 |
return "$Header: /home/cvspamela/yoda/techmodel/VarDumpReader.cpp,v 1.7 2004/05/11 10:12:35 nagni Exp $\n"; |
return "$Header: /home/cvsmanager/yoda/techmodel/VarDumpReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 kusanagi Exp $\n"; |
| 37 |
} |
} |
| 38 |
|
|
| 39 |
/** |
/** |
| 67 |
InputFile->read(eventCRC, sizeof(eventCRC)); |
InputFile->read(eventCRC, sizeof(eventCRC)); |
| 68 |
readCRC = (((UINT16)(eventCRC[0]<<8))&0xFF00) + (((UINT16)eventCRC[1])&0x00FF); |
readCRC = (((UINT16)(eventCRC[0]<<8))&0xFF00) + (((UINT16)eventCRC[1])&0x00FF); |
| 69 |
|
|
|
if(!(subCRC == readCRC)) { |
|
|
cat << log4cpp::Priority::ERROR |
|
|
<< "The test of calculated CRC with one wrote on file FAILED!!" |
|
|
<< "\n " << log4cpp::CategoryStream::ENDLINE; |
|
|
} |
|
|
|
|
| 70 |
//finally check if the RecordCRC is correct and finally update the partialCRC |
//finally check if the RecordCRC is correct and finally update the partialCRC |
| 71 |
if (subCRC == readCRC){ |
if (subCRC == readCRC){ |
| 72 |
/**************************************************************************** |
VarDumpRecord* rec; |
| 73 |
---------------------TBD read the data--------------------------- |
VarDump->Records->Clear(); |
| 74 |
****************************************************************************/ |
TClonesArray &recs = *(VarDump->Records); |
| 75 |
|
rec = new(recs[0]) VarDumpRecord(); //add a new TabDump |
| 76 |
|
memcpy(rec->Data, subData, dataLength); |
| 77 |
free(subData); |
free(subData); |
| 78 |
} else { |
} else { |
| 79 |
cat << log4cpp::Priority::ERROR |
cat << log4cpp::Priority::ERROR |
| 80 |
<< "Wrong CRC on Subpacket in VarDump Packet " |
<< "Wrong CRC in VarDump Packet " |
| 81 |
<< "\n " << log4cpp::CategoryStream::ENDLINE; |
<< "\n " << log4cpp::CategoryStream::ENDLINE; |
| 82 |
} |
} |
| 83 |
} |
} |