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

Diff of /yoda/techmodel/CalibCalPedReader.cpp

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

revision 1.5 by kusanagi, Fri Aug 20 15:01:41 2004 UTC revision 1.6 by kusanagi, Tue Aug 24 16:01:57 2004 UTC
# Line 47  CalibCalPedReader::CalibCalPedReader(voi Line 47  CalibCalPedReader::CalibCalPedReader(voi
47   */   */
48  std::string CalibCalPedReader::GetVersionInfo(void) const {  std::string CalibCalPedReader::GetVersionInfo(void) const {
49    return    return
50      "$Header: /home/cvsmanager/yoda/techmodel/CalibCalPedReader.cpp,v 1.4 2004/08/19 15:24:46 kusanagi Exp $\n";      "$Header: /home/cvsmanager/yoda/techmodel/CalibCalPedReader.cpp,v 1.5 2004/08/20 15:01:41 kusanagi Exp $\n";
51  }  }
52    
53  /**  /**
# Line 64  void CalibCalPedReader::Init(PamelaRun * Line 64  void CalibCalPedReader::Init(PamelaRun *
64   */   */
65  void CalibCalPedReader::RunEvent(int EventNumber, long int length) {  void CalibCalPedReader::RunEvent(int EventNumber, long int length) {
66    
67      char        packetData[length-2];      char        *packetData;
68      char        CRCevent[2];      char        CRCevent[2];
69      UINT16      calculatedCRC    = 0;   //calculated CRC      UINT16      calculatedCRC    = 0;   //calculated CRC
70      UINT16      readCRC          = 0;   //read CRC      UINT16      readCRC          = 0;   //read CRC
# Line 72  void CalibCalPedReader::RunEvent(int Eve Line 72  void CalibCalPedReader::RunEvent(int Eve
72      int         ERROR;      int         ERROR;
73    
74      dataLength = length - 2;      dataLength = length - 2;
75        packetData = new char[dataLength];
76      InputFile->read(packetData, sizeof(packetData));      InputFile->read(packetData, sizeof(packetData));
77      InputFile->read(CRCevent, sizeof(CRCevent));      InputFile->read(CRCevent, sizeof(CRCevent));
78    
# Line 136  void CalibCalPedReader::RunEvent(int Eve Line 137  void CalibCalPedReader::RunEvent(int Eve
137              <<  "The test of calculated CRC with one wrote on file FAILED!!"              <<  "The test of calculated CRC with one wrote on file FAILED!!"
138              <<  "\n " << log4cpp::CategoryStream::ENDLINE;                  <<  "\n " << log4cpp::CategoryStream::ENDLINE;    
139      }      }
140      free(packetData);      delete [] packetData;
141  }  }
142    
143    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.23