--- chewbacca/PamOffLineSW/techmodel/CalibCalReader.cpp 2008/09/23 07:20:24 1.1 +++ chewbacca/PamOffLineSW/techmodel/CalibCalReader.cpp 2008/10/02 14:37:18 1.2 @@ -40,7 +40,21 @@ */ void CalibCalReader::PKT_RunEvent(char* subData, long int dataLength) throw (WrongCRCException){ - calibCal->calibCalData = new TArrayC(dataLength, subData); - PamOffLineSW::mainLogUtil->logAll("PKT_RunEvent: Used CalibCal packet."); - + + if ( dataLength == 6 ){ + calibCal->CAL_RESET = (((UINT16)(subData[0]<<8))&0xFF00) + (((UINT16)(subData[1]))&0x00FF); + calibCal->WRITE_DSP_MEM = (((UINT16)(subData[2]<<8))&0xFF00) + (((UINT16)(subData[3]))&0x00FF); + calibCal->WRITE_FPGA_REG = (((UINT16)(subData[4]<<8))&0xFF00) + (((UINT16)(subData[5]))&0x00FF); + // calibCal->calibCalData = new TArrayC(dataLength, subData); + } else { + calibCal->CAL_RESET = 0; + calibCal->WRITE_DSP_MEM = 0; + calibCal->WRITE_FPGA_REG = 0; + string msg; + std::stringstream oss; + oss << "CalibCal: wrong pkt length"; + msg=oss.str(); + PamOffLineSW::mainLogUtil->logWarning(msg); + // PamOffLineSW::mainLogUtil->logAll("PKT_RunEvent: Used CalibCal packet."); + }; }