/[PAMELA software]/yoda/techmodel/physics/TrackerReader.cpp
ViewVC logotype

Diff of /yoda/techmodel/physics/TrackerReader.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.1 by kusanagi, Sun Oct 17 12:28:46 2004 UTC revision 2.2 by kusanagi, Wed Dec 22 11:39:16 2004 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v $   * $Source: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v $
3   * $Id: TrackerReader.cpp,v 2.0 2004/09/21 20:51:22 kusanagi Exp $   * $Id: TrackerReader.cpp,v 2.1 2004/10/17 12:28:46 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Implementation of the TrackerPhysicsReader class.   * Implementation of the TrackerPhysicsReader class.
# Line 65  TrackerReader::TrackerReader(void): Line 65  TrackerReader::TrackerReader(void):
65   */   */
66  std::string TrackerReader::GetVersionInfo(void) const {  std::string TrackerReader::GetVersionInfo(void) const {
67    return    return
68      "$Header: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v 2.0 2004/09/21 20:51:22 kusanagi Exp $";      "$Header: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v 2.1 2004/10/17 12:28:46 kusanagi Exp $";
69  }  }
70    
71  /**  /**
# Line 93  void TrackerReader::RunEvent(int EventNu Line 93  void TrackerReader::RunEvent(int EventNu
93            
94      //Scrivo un file temporaneo per passarlo alla routine      //Scrivo un file temporaneo per passarlo alla routine
95      //Speriamo di cambiare la routine per passargli un buffer.....      //Speriamo di cambiare la routine per passargli un buffer.....
96          DIR *dirp;      //DIR *dirp;
97      std::string pathDir((char*)getenv("YODA_DATA"));      
98      pathDir = pathDir + "/todatemp.dat";      //std::string pathDir((char*)getenv("YODA_DATA"));
99        
100        //pathDir = pathDir + "/todatemp.dat";
101        stringstream oss;
102        oss.str("");
103        oss << getenv("YODA_DATA") << "/" << time(NULL) << "trev.dat";
104      FILE *pfile;      FILE *pfile;
105      pfile = fopen((char*)pathDir.c_str(), "wb");      pfile = fopen(oss.str().c_str(), "wb");
106      fwrite(subData, 1, length, pfile);      fwrite(subData, 1, length, pfile);
107      fclose(pfile);      fclose(pfile);
108            
109      //Call to the FORTRAN routin that unpack tracker events      //Call to the FORTRAN routin that unpack tracker events
110      trkeventpkt_(&ERROR, (char*)pathDir.c_str());      trkeventpkt_(&ERROR, (char*)oss.str().c_str());
111            
112      remove((char*)pathDir.c_str());      remove(oss.str().c_str());
113    
114      /*if (ERROR != 0) {      /*if (ERROR != 0) {
115          char *errmsg;          char *errmsg;

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

  ViewVC Help
Powered by ViewVC 1.1.23