1 |
/** @file |
/** @file |
2 |
* $Source: /home/cvsmanager/yoda/techmodel/CalibTrk1Reader.cpp,v $ |
* $Source: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/CalibTrk1Reader.cpp,v $ |
3 |
* $Id: CalibTrk1Reader.cpp,v 5.0 2005/08/29 09:46:13 Maurizio Nagni Exp $ |
* $Id: CalibTrk1Reader.cpp,v 6.2 2006/05/30 19:10:03 kusanagi Exp $ |
4 |
* $Author: Maurizio Nagni $ |
* $Author: kusanagi $ |
5 |
* |
* |
6 |
* Implementation of the LogReader class. |
* Implementation of the LogReader class. |
7 |
* ToBeDone: |
* ToBeDone: |
8 |
* Control the CRC for the entire data Packet not just for single records |
* Control the CRC for the entire data Packet not just for single records |
9 |
*/ |
*/ |
10 |
|
|
|
#define UINT unsigned int |
|
|
#define BYTE unsigned char |
|
|
#include <string> |
|
|
#include <log4cxx/logger.h> |
|
|
#include <fstream> |
|
|
#include "stdio.h" |
|
11 |
#include "ReaderAlgorithms.h" |
#include "ReaderAlgorithms.h" |
|
#include "event/PamelaRun.h" |
|
|
|
|
|
#include "event/CalibTrk1Event.h" |
|
12 |
|
|
13 |
extern "C" { |
extern "C" { |
14 |
#include "CRC.h" |
#include "CRC.h" |
40 |
#include <dirent.h> |
#include <dirent.h> |
41 |
} |
} |
42 |
|
|
|
using namespace pamela; |
|
43 |
using namespace pamela::techmodel; |
using namespace pamela::techmodel; |
44 |
|
|
45 |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalibTrk1Reader")); |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalibTrk1Reader")); |
58 |
*/ |
*/ |
59 |
std::string CalibTrk1Reader::GetVersionInfo(void) const { |
std::string CalibTrk1Reader::GetVersionInfo(void) const { |
60 |
return |
return |
61 |
"$Header: /home/cvsmanager/yoda/techmodel/CalibTrk1Reader.cpp,v 5.0 2005/08/29 09:46:13 Maurizio Nagni Exp $\n"; |
"$Header: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/CalibTrk1Reader.cpp,v 6.2 2006/05/30 19:10:03 kusanagi Exp $\n"; |
62 |
} |
} |
63 |
|
|
64 |
/** |
/** |
79 |
std::stringstream oss; |
std::stringstream oss; |
80 |
char subData[dataLength]; |
char subData[dataLength]; |
81 |
int ERROR; |
int ERROR; |
82 |
|
memset(subData, 0, dataLength*sizeof(char)); |
83 |
InputFile->read(subData, sizeof(unsigned char)*dataLength); |
InputFile->read(subData, sizeof(unsigned char)*dataLength); |
84 |
|
|
85 |
char *data = new char[dataLength]; |
char *data = new char[dataLength]; |