/[PAMELA software]/chewbacca/PamOffLineSW/techmodel/CalibCalReader.cpp
ViewVC logotype

Diff of /chewbacca/PamOffLineSW/techmodel/CalibCalReader.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Tue Sep 23 07:20:24 2008 UTC revision 1.2 by mocchiut, Thu Oct 2 14:37:18 2008 UTC
# Line 40  void CalibCalReader::Init(PamelaRun *run Line 40  void CalibCalReader::Init(PamelaRun *run
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  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23