1 |
/** @file |
/** @file |
2 |
* $Source: /repository/PamOffLineSW/techmodel/Calib1_Ac2Reader.cpp,v $ |
* $Source: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/PamOffLineSW/techmodel/Calib1_Ac2Reader.cpp,v $ |
3 |
* $Id: Calib1_Ac2Reader.cpp,v 1.5 2008-03-04 18:09:30 messineo Exp $ |
* $Id: Calib1_Ac2Reader.cpp,v 1.2 2009-08-04 13:58:11 mocchiut Exp $ |
4 |
* $Author: messineo $ |
* $Author: mocchiut $ |
5 |
* |
* |
6 |
* Implementation of the Calib1_Ac2Reader class. |
* Implementation of the Calib1_Ac2Reader class. |
7 |
*/ |
*/ |
12 |
extern "C" { |
extern "C" { |
13 |
#include "CRC.h" |
#include "CRC.h" |
14 |
#include "forroutines/anticounter/AC.h" |
#include "forroutines/anticounter/AC.h" |
15 |
extern int ACcalib(int length, unsigned char* calibpointer, struct calibstruct* calibpointer); |
extern int ACcalib(int length, unsigned char* datapointer, struct calibstruct* calibpointer); |
16 |
} |
} |
17 |
|
|
18 |
#include "ReaderAlgorithms.h" |
#include "ReaderAlgorithms.h" |
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 Calib1_Ac2Reader::GetVersionInfo(void) const { |
std::string Calib1_Ac2Reader::GetVersionInfo(void) const { |
36 |
return "$Header: /repository/PamOffLineSW/techmodel/Calib1_Ac2Reader.cpp,v 1.5 2008-03-04 18:09:30 messineo Exp $\n"; |
return "$Header: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/PamOffLineSW/techmodel/Calib1_Ac2Reader.cpp,v 1.2 2009-08-04 13:58:11 mocchiut Exp $\n"; |
37 |
} |
} |
38 |
|
|
39 |
/** |
/** |
49 |
*/ |
*/ |
50 |
void Calib1_Ac2Reader::PKT_RunEvent(char* subData, long int dataLength) throw (Exception){ |
void Calib1_Ac2Reader::PKT_RunEvent(char* subData, long int dataLength) throw (Exception){ |
51 |
|
|
52 |
struct calibstruct output = {0}; |
struct calibstruct output;// = {0}; |
53 |
calib1_Ac2->ERROR = ACcalib(dataLength, (unsigned char*)subData, &output); |
calib1_Ac2->ERROR = ACcalib(dataLength, (unsigned char*)subData, &output); |
54 |
memcpy(calib1_Ac2->header, output.header, sizeof(output.header)); |
memcpy(calib1_Ac2->header, output.header, sizeof(output.header)); |
55 |
memcpy(calib1_Ac2->status, output.status, sizeof(output.status)); |
memcpy(calib1_Ac2->status, output.status, sizeof(output.status)); |