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

Diff of /yoda/techmodel/CalibCalPulse2Reader.cpp

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

revision 1.2 by kusanagi, Fri Aug 20 15:01:42 2004 UTC revision 1.3 by kusanagi, Tue Aug 24 16:01:57 2004 UTC
# Line 51  CalibCalPulse2Reader::CalibCalPulse2Read Line 51  CalibCalPulse2Reader::CalibCalPulse2Read
51   */   */
52  std::string CalibCalPulse2Reader::GetVersionInfo(void) const {  std::string CalibCalPulse2Reader::GetVersionInfo(void) const {
53    return    return
54      "$Header: /home/cvsmanager/yoda/techmodel/CalibCalPulse2Reader.cpp,v 1.1 2004/08/19 15:24:46 kusanagi Exp $\n";      "$Header: /home/cvsmanager/yoda/techmodel/CalibCalPulse2Reader.cpp,v 1.2 2004/08/20 15:01:42 kusanagi Exp $\n";
55  }  }
56    
57  /**  /**
# Line 68  void CalibCalPulse2Reader::Init(PamelaRu Line 68  void CalibCalPulse2Reader::Init(PamelaRu
68   */   */
69  void CalibCalPulse2Reader::RunEvent(int EventNumber, long int length) {  void CalibCalPulse2Reader::RunEvent(int EventNumber, long int length) {
70                
71      char        packetData[length-2];      char        *packetData;
72      char        CRCevent[2];      char        CRCevent[2];
73      UINT16      calculatedCRC    = 0;   //calculated CRC      UINT16      calculatedCRC    = 0;   //calculated CRC
74      UINT16      readCRC          = 0;   //read CRC      UINT16      readCRC          = 0;   //read CRC
# Line 76  void CalibCalPulse2Reader::RunEvent(int Line 76  void CalibCalPulse2Reader::RunEvent(int
76      int         ERROR;      int         ERROR;
77    
78      dataLength = length - 2;      dataLength = length - 2;
79        packetData = new char[dataLength];
80      InputFile->read(packetData, sizeof(packetData));      InputFile->read(packetData, sizeof(packetData));
81      InputFile->read(CRCevent, sizeof(CRCevent));      InputFile->read(CRCevent, sizeof(CRCevent));
82    
# Line 140  void CalibCalPulse2Reader::RunEvent(int Line 141  void CalibCalPulse2Reader::RunEvent(int
141              <<  "The test of calculated CRC with one wrote on file FAILED!!"              <<  "The test of calculated CRC with one wrote on file FAILED!!"
142              <<  "\n " << log4cpp::CategoryStream::ENDLINE;                  <<  "\n " << log4cpp::CategoryStream::ENDLINE;    
143      }      }
144      free(packetData);          delete [] packetData;
145  }  }
146    

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

  ViewVC Help
Powered by ViewVC 1.1.23