/[PAMELA software]/yoda/event/PamelaRun.cpp
ViewVC logotype

Diff of /yoda/event/PamelaRun.cpp

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

revision 6.1 by kusanagi, Wed Feb 15 15:47:14 2006 UTC revision 6.2 by kusanagi, Wed Mar 8 13:51:45 2006 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: kusanagi $   * $Author: kusanagi $
3   * $Date: 2006/02/07 17:11:07 $   * $Date: 2006/02/15 15:47:14 $
4   * $Revision: 6.0 $   * $Revision: 6.1 $
5   *   *
6   * Implementation of the PamelaRun class.   * Implementation of the PamelaRun class.
7   */   */
# Line 55  std::string PamelaRun::GetRunName(int ru Line 55  std::string PamelaRun::GetRunName(int ru
55   int res;   int res;
56   DIR *dirp;   DIR *dirp;
57   std::string fileName;   std::string fileName;
58   std::string pathDir((char*)getenv("YODA_DATA"));   //std::string pathDir((char*)getenv("YODA_DATA"));
59     std::string pathDir(GetPath());
60   std::string tempName;   std::string tempName;
61   std::string::size_type pos;   std::string::size_type pos;
62    
# Line 80  std::string PamelaRun::GetRunName(int ru Line 81  std::string PamelaRun::GetRunName(int ru
81          res = 1;          res = 1;
82      }      }
83   }   }
84   oss.str("");   oss.str("");
85   oss << Path << "/" << fileName << std::setw( 2 ) << std::setfill( '0' ) << i;   oss << Path << "/" << fileName << std::setw( 2 ) << std::setfill( '0' ) << i;
86   Path = oss.str();   UnpackPath = oss.str();
87   oss.str("");   oss.str("");
88   oss << fileName << std::setw( 2 ) << std::setfill( '0' ) << i;   oss << fileName << std::setw( 2 ) << std::setfill( '0' ) << i;
89   Run = oss.str();   Run = oss.str();
# Line 132  std::string PamelaRun::GetDirName(Packet Line 133  std::string PamelaRun::GetDirName(Packet
133   */   */
134  std::string PamelaRun::GetFileName(const SubPacket* type, std::string name) {  std::string PamelaRun::GetFileName(const SubPacket* type, std::string name) {
135    if (type->IsDetectorSpecific()) {    if (type->IsDetectorSpecific()) {
136      return Path + "/" + type->GetPacketType()->GetName() + "/"      return UnpackPath + "/" + type->GetPacketType()->GetName() + "/"
137        + Run + "." + type->GetPacketType()->GetName() + "."        + Run + "." + type->GetPacketType()->GetName() + "."
138        + type->GetSubDetector()->GetName() + "."        + type->GetSubDetector()->GetName() + "."
139        + name + ".root";        + name + ".root";
140    } else {    } else {
141      return Path + "/" + type->GetPacketType()->GetName() + "/"      return UnpackPath + "/" + type->GetPacketType()->GetName() + "/"
142        + Run + "." + type->GetPacketType()->GetName() + "."        + Run + "." + type->GetPacketType()->GetName() + "."
143        + name + ".root";        + name + ".root";
144     /*     /*
# Line 570  void PamelaRun::WriteHeader(Algorithm* a Line 571  void PamelaRun::WriteHeader(Algorithm* a
571          TTreeMap.insert(RootTreeMap::value_type(type, tree));          TTreeMap.insert(RootTreeMap::value_type(type, tree));
572    } else {    } else {
573          if (!Multiple && (SingleFile == NULL)){          if (!Multiple && (SingleFile == NULL)){
574                  std::string pathDir((char*)getenv("YODA_DATA"));                  //std::string pathDir((char*)getenv("YODA_DATA"));
575                  SingleFile = new TFile((pathDir + "/" + Run + ".root").c_str(), "update");                  SingleFile = new TFile((GetPath() + "/" + Run + ".root").c_str(), "update");
576                  SingleFile->SetCompressionLevel(compression);                  SingleFile->SetCompressionLevel(compression);
577          }          }
578          tree = new TTree(EventType.c_str(), algo->GetAlgorithmName().c_str());          tree = new TTree(EventType.c_str(), algo->GetAlgorithmName().c_str());

Legend:
Removed from v.6.1  
changed lines
  Added in v.6.2

  ViewVC Help
Powered by ViewVC 1.1.23