/[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 3.0 by kusanagi, Fri Mar 4 15:54:11 2005 UTC revision 6.3 by mocchiut, Fri Sep 29 10:19:24 2006 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /home/cvsmanager/yoda/techmodel/McmdReader.cpp,v $   * $Source: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/McmdReader.cpp,v $
3   * $Id: McmdReader.cpp,v 2.1 2004/12/03 22:08:00 kusanagi Exp $   * $Id: McmdReader.cpp,v 6.2 2006/05/30 19:10:03 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Implementation of the McmdReader class.   * Implementation of the McmdReader class.
7   */   */
8    
 #define BYTE unsigned char  
 #include <string>  
 #include <log4cxx/logger.h>  
9  extern "C" {  extern "C" {
10  #include <sys/time.h>          #include "CRC.h"
 #include "CRC.h"  
11  }  }
   
 #include <fstream>  
 #include "stdio.h"  
12  #include "ReaderAlgorithms.h"  #include "ReaderAlgorithms.h"
   
 #include "event/mcmd/McmdRecord.h"  
   
 using namespace pamela;  
13  using namespace pamela::techmodel;  using namespace pamela::techmodel;
14    
15  static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.McmdReader"));  static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.McmdReader"));
# Line 39  McmdReader::McmdReader(void): Line 28  McmdReader::McmdReader(void):
28   */   */
29  std::string McmdReader::GetVersionInfo(void) const {  std::string McmdReader::GetVersionInfo(void) const {
30    return    return
31      "$Header: /home/cvsmanager/yoda/techmodel/McmdReader.cpp,v 2.1 2004/12/03 22:08:00 kusanagi Exp $\n";      "$Header: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/McmdReader.cpp,v 6.2 2006/05/30 19:10:03 kusanagi Exp $\n";
32  }  }
33    
34  /**  /**
# Line 130  void McmdReader::RunEvent(int EventNumbe Line 119  void McmdReader::RunEvent(int EventNumbe
119      // else set subData to 0      // else set subData to 0
120      //if(dataLength > 0){      //if(dataLength > 0){
121          subData = new char[dataLength];          subData = new char[dataLength];
122            memset(subData,  0, dataLength*sizeof(char));
123          InputFile->read(subData, sizeof(unsigned char)*dataLength);          InputFile->read(subData, sizeof(unsigned char)*dataLength);
124          for (int jj = 0; jj < dataLength ; jj++){          for (int jj = 0; jj < dataLength ; jj++){
125              subCRC = CM_Compute_CRC16(subCRC, (BYTE*)(subData+jj), 1);              subCRC = CM_Compute_CRC16(subCRC, (BYTE*)(subData+jj), 1);

Legend:
Removed from v.3.0  
changed lines
  Added in v.6.3

  ViewVC Help
Powered by ViewVC 1.1.23