| 1 |
/** @file |
/** @file |
| 2 |
* $Source: /home/cvsmanager/yoda/techmodel/Calib2_Ac1Reader.cpp,v $ |
* $Source: /home/cvsmanager/yoda/techmodel/Calib2_Ac1Reader.cpp,v $ |
| 3 |
* $Id: Calib2_Ac1Reader.cpp,v 2.3 2004/12/21 16:50:45 kusanagi Exp $ |
* $Id: Calib2_Ac1Reader.cpp,v 2.4 2005/01/03 14:20:09 kusanagi Exp $ |
| 4 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
| 5 |
* |
* |
| 6 |
* Implementation of the Calib2_Ac1Reader class. |
* Implementation of the Calib2_Ac1Reader class. |
| 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 Calib2_Ac1Reader::GetVersionInfo(void) const { |
std::string Calib2_Ac1Reader::GetVersionInfo(void) const { |
| 39 |
return "$Header: /home/cvsmanager/yoda/techmodel/Calib2_Ac1Reader.cpp,v 2.3 2004/12/21 16:50:45 kusanagi Exp $\n"; |
return "$Header: /home/cvsmanager/yoda/techmodel/Calib2_Ac1Reader.cpp,v 2.4 2005/01/03 14:20:09 kusanagi Exp $\n"; |
| 40 |
} |
} |
| 41 |
|
|
| 42 |
/** |
/** |
| 53 |
* Unpack the CalibAc event from an input file. |
* Unpack the CalibAc event from an input file. |
| 54 |
*/ |
*/ |
| 55 |
void Calib2_Ac1Reader::RunEvent(int EventNumber, long int dataLength) throw (Exception){ |
void Calib2_Ac1Reader::RunEvent(int EventNumber, long int dataLength) throw (Exception){ |
| 56 |
|
/* |
| 57 |
char subData[dataLength]; |
char subData[dataLength]; |
|
struct calibstruct *output = {0}; |
|
|
|
|
| 58 |
InputFile->read(subData, sizeof(unsigned char)*dataLength); |
InputFile->read(subData, sizeof(unsigned char)*dataLength); |
| 59 |
/* |
|
| 60 |
calib2_Ac1->ERROR = ACcalib(dataLength, (unsigned char*)subData, output); |
struct calibstruct output; |
| 61 |
memcpy(calib2_Ac1->header, output.header, sizeof(output.header)); |
|
| 62 |
memcpy(calib2_Ac1->status, output.status, sizeof(output.status)); |
calib1_Ac1->ERROR = ACcalib(dataLength, (unsigned char*)subData, &output); |
| 63 |
memcpy(calib2_Ac1->temp, output.temp, sizeof(output.temp)); |
calib1_Ac1->ResetDSP = output.ResetDSP; |
| 64 |
memcpy(calib2_Ac1->DAC1, output.DAC1, sizeof(output.DAC1)); |
calib1_Ac1->DSPinit = output.DSPinit; |
| 65 |
memcpy(calib2_Ac1->DAC2, output.DAC2, sizeof(output.DAC2)); |
calib1_Ac1->DSPprog = output.DSPprog; |
| 66 |
memcpy(calib2_Ac1->regist, output.regist, sizeof(output.regist)); |
calib1_Ac1->ModeCalib = output.ModeCalib; |
| 67 |
memcpy(calib2_Ac1->time, output.time, sizeof(output.time)); |
calib1_Ac1->SetDAC = output.SetDAC; |
| 68 |
calib2_Ac1->n_tr = output.n_tr; |
calib1_Ac1->ModePhysics = output.ModePhysics; |
| 69 |
memcpy(calib2_Ac1->hitmap_tr, output.hitmap_tr, sizeof(output.hitmap_tr)); |
*/ |
|
memcpy(calib2_Ac1->curve1, output.curve1, sizeof(output.curve1)); |
|
|
memcpy(calib2_Ac1->curve2, output.curve2, sizeof(output.curve2)); |
|
|
calib2_Ac1->iCRC = output.iCRC; |
|
|
calib2_Ac1->tail = output.tail; |
|
|
calib2_Ac1->CRC = output.CRC; |
|
|
*/ |
|
| 70 |
//delete [] subData; |
//delete [] subData; |
| 71 |
} |
} |