40 |
*/ |
*/ |
41 |
|
|
42 |
void CalibCalReader::PKT_RunEvent(char* subData, long int dataLength) throw (WrongCRCException){ |
void CalibCalReader::PKT_RunEvent(char* subData, long int dataLength) throw (WrongCRCException){ |
43 |
calibCal->calibCalData = new TArrayC(dataLength, subData); |
|
44 |
PamOffLineSW::mainLogUtil->logAll("PKT_RunEvent: Used CalibCal packet."); |
if ( dataLength == 6 ){ |
45 |
|
calibCal->CAL_RESET = (((UINT16)(subData[0]<<8))&0xFF00) + (((UINT16)(subData[1]))&0x00FF); |
46 |
|
calibCal->WRITE_DSP_MEM = (((UINT16)(subData[2]<<8))&0xFF00) + (((UINT16)(subData[3]))&0x00FF); |
47 |
|
calibCal->WRITE_FPGA_REG = (((UINT16)(subData[4]<<8))&0xFF00) + (((UINT16)(subData[5]))&0x00FF); |
48 |
|
// calibCal->calibCalData = new TArrayC(dataLength, subData); |
49 |
|
} else { |
50 |
|
calibCal->CAL_RESET = 0; |
51 |
|
calibCal->WRITE_DSP_MEM = 0; |
52 |
|
calibCal->WRITE_FPGA_REG = 0; |
53 |
|
string msg; |
54 |
|
std::stringstream oss; |
55 |
|
oss << "CalibCal: wrong pkt length"; |
56 |
|
msg=oss.str(); |
57 |
|
PamOffLineSW::mainLogUtil->logWarning(msg); |
58 |
|
// PamOffLineSW::mainLogUtil->logAll("PKT_RunEvent: Used CalibCal packet."); |
59 |
|
}; |
60 |
} |
} |