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 |
*/ |
*/ |
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 |
|
|
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(); |
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 |
/* |
/* |
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()); |