/[PAMELA software]/yoda/techmodel/McmdReader.cpp
ViewVC logotype

Diff of /yoda/techmodel/McmdReader.cpp

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

revision 1.1.1.1 by kusanagi, Tue Jul 6 12:20:23 2004 UTC revision 1.4 by kusanagi, Thu Aug 26 08:21:31 2004 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /home/cvspamela/yoda/techmodel/McmdReader.cpp,v $   * $Source: /home/cvsmanager/yoda/techmodel/McmdReader.cpp,v $
3   * $Id: McmdReader.cpp,v 1.9 2004/04/28 09:01:27 nagni Exp $   * $Id: McmdReader.cpp,v 1.3 2004/08/24 16:01:57 kusanagi Exp $
4   * $Author: nagni $   * $Author: kusanagi $
5   *   *
6   * Implementation of the McmdReader class.   * Implementation of the McmdReader class.
7   */   */
# Line 41  McmdReader::McmdReader(void): Line 41  McmdReader::McmdReader(void):
41   */   */
42  std::string McmdReader::GetVersionInfo(void) const {  std::string McmdReader::GetVersionInfo(void) const {
43    return    return
44      "$Header: /home/cvspamela/yoda/techmodel/McmdReader.cpp,v 1.9 2004/04/28 09:01:27 nagni Exp $\n";      "$Header: /home/cvsmanager/yoda/techmodel/McmdReader.cpp,v 1.3 2004/08/24 16:01:57 kusanagi Exp $\n";
45  }  }
46    
47  /**  /**
# Line 165  void McmdReader::RunEvent(int EventNumbe Line 165  void McmdReader::RunEvent(int EventNumbe
165          rec->McmdLength      = (0x0fff)&(((UINT16)(subHeader[4]<<8)) + ((UINT16)subHeader[5]));          rec->McmdLength      = (0x0fff)&(((UINT16)(subHeader[4]<<8)) + ((UINT16)subHeader[5]));
166          rec->TimeTag         = (((UINT32)OBT[6]<<24)&0xFF000000) + (((UINT32)OBT[7]<<16)&0x00FF0000) +  (((UINT32)OBT[8]<<8)&0x0000FF00) + (((UINT32)OBT[9])&0x000000FF);          rec->TimeTag         = (((UINT32)OBT[6]<<24)&0xFF000000) + (((UINT32)OBT[7]<<16)&0x00FF0000) +  (((UINT32)OBT[8]<<8)&0x0000FF00) + (((UINT32)OBT[9])&0x000000FF);
167          rec->endID           = (BYTE)subTrailer[1];          rec->endID           = (BYTE)subTrailer[1];
168          rec->setMcmdData((BYTE*)&subData);  
169          //partialCRC = CM_Compute_CRC16(partialCRC, (BYTE*)&readCRC, 1);          rec->McmdData        = new TArrayC(dataLength, subData);
170          free(subData);          //memcpy(rec->McmdData, (BYTE*)subData, sizeof(rec->McmdData));
171            //rec->setMcmdData((BYTE*)&subData);
172            delete [] subData;
173      } else {      } else {
174          cat <<  log4cpp::Priority::ERROR          cat <<  log4cpp::Priority::ERROR
175              <<  "Wrong CRC on Subpacket int MCMD Packet starting at position " << start              <<  "Wrong CRC on Subpacket int MCMD Packet starting at position " << start
# Line 180  void McmdReader::RunEvent(int EventNumbe Line 182  void McmdReader::RunEvent(int EventNumbe
182            
183      if(!(partialCRC == readCRC)) {      if(!(partialCRC == readCRC)) {
184             cat <<  log4cpp::Priority::ERROR             cat <<  log4cpp::Priority::ERROR
185              <<  "The test of calculated CRC with one wrote on file FAILED!!"              <<  "Wrong CRC for CalibS4 Packet"
186              <<  "\n " << log4cpp::CategoryStream::ENDLINE;              <<  "\n " << log4cpp::CategoryStream::ENDLINE;
187      }      }
188  }  }

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23