2 |
// Implementation of the CalibCalPulse2Reader class. |
// Implementation of the CalibCalPulse2Reader 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 |
15 |
//external declaration of the Fortran function |
//external declaration of the Fortran function |
16 |
void calpulse_(char*, long int*, int*); |
void calpulse_(char*, long int*, int*); |
17 |
} |
} |
|
#include <fstream> |
|
|
#include "stdio.h" |
|
18 |
#include "ReaderAlgorithms.h" |
#include "ReaderAlgorithms.h" |
19 |
|
|
|
#include "event/CalibCalPulse2Event.h" |
|
|
|
|
|
using namespace pamela; |
|
20 |
using namespace pamela::techmodel; |
using namespace pamela::techmodel; |
21 |
|
|
22 |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalibCalPulse2Reader")); |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalibCalPulse2Reader")); |
35 |
*/ |
*/ |
36 |
std::string CalibCalPulse2Reader::GetVersionInfo(void) const { |
std::string CalibCalPulse2Reader::GetVersionInfo(void) const { |
37 |
return |
return |
38 |
"$Header: /home/cvsmanager/yoda/techmodel/CalibCalPulse2Reader.cpp,v 4.4 2005/05/28 10:44:11 kusanagi Exp $\n"; |
"$Header: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/CalibCalPulse2Reader.cpp,v 6.2 2006/05/30 19:10:03 kusanagi Exp $\n"; |
39 |
} |
} |
40 |
|
|
41 |
/** |
/** |
55 |
std::stringstream oss; |
std::stringstream oss; |
56 |
char packetData[dataLength]; |
char packetData[dataLength]; |
57 |
int ERROR; |
int ERROR; |
58 |
|
memset(packetData, 0, dataLength*sizeof(char)); |
59 |
InputFile->read(packetData, sizeof(packetData)); |
InputFile->read(packetData, sizeof(packetData)); |
60 |
|
|
61 |
calpulse_(packetData, &dataLength, &ERROR); |
calpulse_(packetData, &dataLength, &ERROR); |