/[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 5.0 by kusanagi, Mon Aug 29 09:46:13 2005 UTC revision 6.3 by mocchiut, Fri Sep 29 10:19:18 2006 UTC
# Line 1  Line 1 
 #include <log4cxx/logger.h>  
 #include <fstream>  
1    
2  extern "C" {  extern "C" {
3    
# Line 21  extern "C" { Line 19  extern "C" {
19  }  }
20    
21  #include "ReaderAlgorithms.h"  #include "ReaderAlgorithms.h"
 #include "event/CalibCalPedEvent.h"  
   
 using namespace pamela;  
22  using namespace pamela::techmodel;  using namespace pamela::techmodel;
23    
24  static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalibCalPedReader"));  static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalibCalPedReader"));
# Line 42  CalibCalPedReader::CalibCalPedReader(voi Line 37  CalibCalPedReader::CalibCalPedReader(voi
37   */   */
38  std::string CalibCalPedReader::GetVersionInfo(void) const {  std::string CalibCalPedReader::GetVersionInfo(void) const {
39    return    return
40      "$Header: /home/cvsmanager/yoda/techmodel/CalibCalPedReader.cpp,v 4.4 2005/05/28 10:44:10 kusanagi Exp $\n";      "$Header: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/CalibCalPedReader.cpp,v 6.2 2006/05/30 19:10:03 kusanagi Exp $\n";
41  }  }
42    
43  /**  /**
# Line 62  void CalibCalPedReader::RunEvent(int Eve Line 57  void CalibCalPedReader::RunEvent(int Eve
57      stringstream oss;            stringstream oss;      
58      int         ERROR;      int         ERROR;
59      char packetData[dataLength];      char packetData[dataLength];
60        memset(packetData,  0, dataLength*sizeof(char));
61      InputFile->read(packetData, sizeof(packetData));      InputFile->read(packetData, sizeof(packetData));
62    
63      calpedestal_((char*)packetData, &dataLength, &ERROR);      calpedestal_((char*)packetData, &dataLength, &ERROR);
# Line 76  void CalibCalPedReader::RunEvent(int Eve Line 72  void CalibCalPedReader::RunEvent(int Eve
72          oss << "Fortran77 function calpedestal error code = " << ERROR          oss << "Fortran77 function calpedestal error code = " << ERROR
73              <<  " " << errmsg;              <<  " " << errmsg;
74          logger->warn(oss.str().c_str());          logger->warn(oss.str().c_str());
75      } else {       } //else {
76        //Store the unpacked data        //Store the unpacked data
77          calibCalPed->iev = calib_.iev;          calibCalPed->iev = calib_.iev;
78          memcpy(calibCalPed->cstwerr, calib_.cstwerr, sizeof(calibCalPed->cstwerr));          memcpy(calibCalPed->cstwerr, calib_.cstwerr, sizeof(calibCalPed->cstwerr));
# Line 119  void CalibCalPedReader::RunEvent(int Eve Line 115  void CalibCalPedReader::RunEvent(int Eve
115              }              }
116          }          }
117      //-----------------------------------------------------------------------------------------      //-----------------------------------------------------------------------------------------
118      }      //}
119  }  }
120    
121    

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

  ViewVC Help
Powered by ViewVC 1.1.23