| 1 |
/** @file |
/** @file |
| 2 |
* $Source: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v $ |
* $Source: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v $ |
| 3 |
* $Id: CalibAcReader.cpp,v 1.5 2004/09/21 20:24:33 kusanagi Exp $ |
* $Id: CalibAcReader.cpp,v 2.0 2004/09/21 20:50:54 kusanagi Exp $ |
| 4 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
| 5 |
* |
* |
| 6 |
* Implementation of the ArrDumpReader class. |
* Implementation of the ArrDumpReader class. |
| 12 |
#include "stdio.h" |
#include "stdio.h" |
| 13 |
extern "C" { |
extern "C" { |
| 14 |
#include "CRC.h" |
#include "CRC.h" |
| 15 |
#include "forroutines/anticounter/ACcalib.h" |
#include "forroutines/anticounter/AC.h" |
| 16 |
extern int ACcalib(int length, unsigned short* datapointer, struct datastruct* calibpointer); |
extern int ACcalib(int length, unsigned char* calibpointer, struct calibstruct* calibpointer); |
| 17 |
} |
} |
| 18 |
|
|
| 19 |
#include "ReaderAlgorithms.h" |
#include "ReaderAlgorithms.h" |
| 36 |
* Get a string with the version info of the algorithm. |
* Get a string with the version info of the algorithm. |
| 37 |
*/ |
*/ |
| 38 |
std::string CalibAcReader::GetVersionInfo(void) const { |
std::string CalibAcReader::GetVersionInfo(void) const { |
| 39 |
return "$Header: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v 1.5 2004/09/21 20:24:33 kusanagi Exp $\n"; |
return "$Header: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v 2.0 2004/09/21 20:50:54 kusanagi Exp $\n"; |
| 40 |
} |
} |
| 41 |
|
|
| 42 |
/** |
/** |
| 71 |
readCRC = (((UINT16)(eventCRC[0]<<8))&0xFF00) + (((UINT16)eventCRC[1])&0x00FF); |
readCRC = (((UINT16)(eventCRC[0]<<8))&0xFF00) + (((UINT16)eventCRC[1])&0x00FF); |
| 72 |
|
|
| 73 |
if (subCRC == readCRC){ |
if (subCRC == readCRC){ |
| 74 |
datastruct output; |
calibstruct output; |
| 75 |
int ERROR; |
int ERROR; |
| 76 |
ERROR = ACcalib(dataLength, (unsigned short*)subData, &output); |
ERROR = ACcalib(dataLength, (unsigned char*)subData, &output); |
| 77 |
|
|
| 78 |
CalibAc->header = output.header; |
CalibAc->header = output.header; |
| 79 |
memcpy(CalibAc->status, output.status, sizeof(CalibAc->status)); |
memcpy(CalibAc->status, output.status, sizeof(CalibAc->status)); |