1 |
/** @file |
/** @file |
2 |
* $Source: /home/cvspamela/yoda/techmodel/physics/tracker/TrackerPhysicsReader.cpp,v $ |
* $Source: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v $ |
3 |
* $Id: TrackerPhysicsReader.cpp,v 1.6 2004/03/16 10:18:28 nagni Exp $ |
* $Id: TrackerReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 kusanagi Exp $ |
4 |
* $Author: nagni $ |
* $Author: kusanagi $ |
5 |
* |
* |
6 |
* Implementation of the TrackerPhysicsReader class. |
* Implementation of the TrackerPhysicsReader class. |
7 |
*/ |
*/ |
63 |
*/ |
*/ |
64 |
std::string TrackerReader::GetVersionInfo(void) const { |
std::string TrackerReader::GetVersionInfo(void) const { |
65 |
return |
return |
66 |
"$Header: /home/cvspamela/yoda/techmodel/physics/tracker/TrackerPhysicsReader.cpp,v 1.6 2004/03/16 10:18:28 nagni Exp $"; |
"$Header: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 kusanagi Exp $"; |
67 |
} |
} |
68 |
|
|
69 |
/** |
/** |
86 |
* Unpack the Tracker data event from the physical packet. |
* Unpack the Tracker data event from the physical packet. |
87 |
*/ |
*/ |
88 |
void TrackerReader::RunEvent(int EventNumber, const char subData[], long int length) { |
void TrackerReader::RunEvent(int EventNumber, const char subData[], long int length) { |
|
char data[length]; |
|
|
memcpy(data, subData, length); |
|
89 |
int ERROR; |
int ERROR; |
90 |
|
|
91 |
//Scrivo un file temporaneo per passarlo alla routine |
//Scrivo un file temporaneo per passarlo alla routine |
92 |
//Speriamo di cambiare la routine per passargli un buffer..... |
//Speriamo di cambiare la routine per passargli un buffer..... |
93 |
DIR *dirp; |
DIR *dirp; |
94 |
std::string pathDir((char*)getenv("YODA_DATA")); |
std::string pathDir((char*)getenv("YODA_DATA")); |
95 |
pathDir = pathDir + "/"; |
pathDir = pathDir + "/todatemp.dat"; |
|
pathDir = pathDir + PamelaRun::GetRunName(EventNumber) + "/todatemp.dat"; |
|
96 |
FILE *pfile; |
FILE *pfile; |
97 |
pfile = fopen((char*)pathDir.c_str(), "wb"); |
pfile = fopen((char*)pathDir.c_str(), "wb"); |
98 |
fwrite(subData, 1, length, pfile); |
fwrite(subData, 1, length, pfile); |