/[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 2.2 by kusanagi, Fri Dec 3 22:08:00 2004 UTC revision 2.5 by kusanagi, Wed Feb 9 22:20:48 2005 UTC
# Line 1  Line 1 
 #define BYTE  unsigned char  
 #include <string>  
1  #include <log4cxx/logger.h>  #include <log4cxx/logger.h>
2  #include <fstream>  #include <fstream>
3  #include "stdio.h"  
4  extern "C" {  extern "C" {
5  #include "CRC.h"    
6      //Struct per il passaggio di dati da e verso la chiamata fortran      //Struct per il passaggio di dati da e verso la chiamata fortran
7      extern struct {      extern struct {
8          int   iev;          int   iev;
# Line 44  CalibCalPedReader::CalibCalPedReader(voi Line 42  CalibCalPedReader::CalibCalPedReader(voi
42   */   */
43  std::string CalibCalPedReader::GetVersionInfo(void) const {  std::string CalibCalPedReader::GetVersionInfo(void) const {
44    return    return
45      "$Header: /home/cvsmanager/yoda/techmodel/CalibCalPedReader.cpp,v 2.1 2004/10/17 12:28:38 kusanagi Exp $\n";      "$Header: /home/cvsmanager/yoda/techmodel/CalibCalPedReader.cpp,v 2.4 2005/01/13 14:48:04 kusanagi Exp $\n";
46  }  }
47    
48  /**  /**
# Line 66  void CalibCalPedReader::RunEvent(int Eve Line 64  void CalibCalPedReader::RunEvent(int Eve
64      char packetData[dataLength];      char packetData[dataLength];
65      InputFile->read(packetData, sizeof(packetData));      InputFile->read(packetData, sizeof(packetData));
66    
67      calpedestal_(packetData, &dataLength, &ERROR);      calpedestal_((char*)packetData, &dataLength, &ERROR);
68    
69        calibCalPed->unpackError = ERROR;
70      if (ERROR != 0) {      if (ERROR != 0) {
71          char *errmsg;          char *errmsg;
72          switch (ERROR){          switch (ERROR){
# Line 74  void CalibCalPedReader::RunEvent(int Eve Line 74  void CalibCalPedReader::RunEvent(int Eve
74          }          }
75          oss.str("");          oss.str("");
76          oss << "Fortran77 function calpedestal error code = " << ERROR          oss << "Fortran77 function calpedestal error code = " << ERROR
77              <<  "\n" <<errmsg;              <<  " " << errmsg;
78          logger->warn(oss.str().c_str());          logger->warn(oss.str().c_str());
79      } else {      } else {
80        //Store the unpacked data        //Store the unpacked data

Legend:
Removed from v.2.2  
changed lines
  Added in v.2.5

  ViewVC Help
Powered by ViewVC 1.1.23