2 |
// Implementation of the CalibCalPulse1Reader class. |
// Implementation of the CalibCalPulse1Reader class. |
3 |
|
|
4 |
|
|
|
#define UINT unsigned int |
|
|
#define BYTE unsigned char |
|
|
#include <string> |
|
|
#include <log4cxx/logger.h> |
|
5 |
extern "C" { |
extern "C" { |
6 |
#include "CRC.h" |
#include "CRC.h" |
7 |
//Struct per il passaggio di dati da e verso la chiamata fortran |
//Struct per il passaggio di dati da e verso la chiamata fortran |
16 |
void calpulse_(char*, long int*, int*); |
void calpulse_(char*, long int*, int*); |
17 |
} |
} |
18 |
|
|
|
#include <fstream> |
|
|
#include "stdio.h" |
|
19 |
#include "ReaderAlgorithms.h" |
#include "ReaderAlgorithms.h" |
20 |
|
|
|
#include "event/CalibCalPulse1Event.h" |
|
|
|
|
|
using namespace pamela; |
|
21 |
using namespace pamela::techmodel; |
using namespace pamela::techmodel; |
22 |
|
|
23 |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalibCalPulse1Reader")); |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalibCalPulse1Reader")); |
36 |
*/ |
*/ |
37 |
std::string CalibCalPulse1Reader::GetVersionInfo(void) const { |
std::string CalibCalPulse1Reader::GetVersionInfo(void) const { |
38 |
return |
return |
39 |
"$Header: /home/cvsmanager/yoda/techmodel/CalibCalPulse1Reader.cpp,v 3.0 2005/03/04 15:54:11 kusanagi Exp $\n"; |
"$Header: /home/cvsmanager/yoda/techmodel/CalibCalPulse1Reader.cpp,v 6.0 2006/02/07 17:11:09 kusanagi Exp $\n"; |
40 |
} |
} |
41 |
|
|
42 |
/** |
/** |
70 |
oss << "Fortran77 function calpulse error code = " << ERROR |
oss << "Fortran77 function calpulse error code = " << ERROR |
71 |
<< " " << errmsg; |
<< " " << errmsg; |
72 |
logger->warn(oss.str().c_str()); |
logger->warn(oss.str().c_str()); |
73 |
} else { |
} //else { |
74 |
//Store the unpacked data |
//Store the unpacked data |
75 |
calibCalPulse1->iev = calpul_.iev; |
calibCalPulse1->iev = calpul_.iev; |
76 |
memcpy(calibCalPulse1->pstwerr, calpul_.pstwerr, sizeof(calibCalPulse1->pstwerr)); |
memcpy(calibCalPulse1->pstwerr, calpul_.pstwerr, sizeof(calibCalPulse1->pstwerr)); |
86 |
} |
} |
87 |
} |
} |
88 |
//----------------------------------------------------------------------------------------- |
//----------------------------------------------------------------------------------------- |
89 |
} |
//} |
90 |
} |
} |
91 |
|
|