1 |
/** @file |
/** @file |
2 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
3 |
* $Date: 2004/09/24 11:57:32 $ |
* $Date: 2005/03/06 04:33:01 $ |
4 |
* $Revision: 2.1 $ |
* $Revision: 4.0 $ |
5 |
* |
* |
6 |
* Implementation of the PamelaRun class. |
* Implementation of the PamelaRun class. |
7 |
*/ |
*/ |
8 |
#include <iostream> |
#include <iostream> |
9 |
#include <iomanip> |
#include <iomanip> |
|
#include <sstream> |
|
10 |
#include <list> |
#include <list> |
11 |
#include <exception> |
#include <exception> |
12 |
#include <string> |
//#include <string> |
13 |
#include <log4cxx/logger.h> |
#include <log4cxx/logger.h> |
14 |
|
|
15 |
#include <TFile.h> //Substituted by Maurizio 05 Feb 2004 |
#include <TFile.h> //Substituted by Maurizio 05 Feb 2004 |
34 |
using namespace pamela; |
using namespace pamela; |
35 |
|
|
36 |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.PamelaRun")); |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.PamelaRun")); |
|
static std::stringstream oss; |
|
37 |
|
|
38 |
/** |
/** |
39 |
* Get the run name according to a certain run number. |
* Get the run name according to a certain run number. |
41 |
* @return a string with the run name. |
* @return a string with the run name. |
42 |
*/ |
*/ |
43 |
std::string PamelaRun::GetRunName(int run) { |
std::string PamelaRun::GetRunName(int run) { |
44 |
std::ostringstream t_Stream; |
std::stringstream temp; |
45 |
t_Stream << std::setw( 4 ) << std::setfill( '0' ) << run; |
temp.str(""); |
46 |
return "Run" + t_Stream.str(); |
temp << std::setw( 4 ) << std::setfill( '0' ) << run; |
47 |
|
return "Run" + temp.str(); |
48 |
} |
} |
49 |
|
|
50 |
/** |
/** |
74 |
* @param int run - Number of the run to check |
* @param int run - Number of the run to check |
75 |
* @return int |
* @return int |
76 |
*/ |
*/ |
77 |
std::string PamelaRun::RunExists(std::string input) throw (std::exception){ |
void PamelaRun::RunExists(std::string input) throw (std::exception){ |
78 |
int res; |
int res; |
79 |
DIR *dirp; |
DIR *dirp; |
80 |
std::string fileName; |
std::string fileName; |
81 |
std::string pathDir((char*)getenv("YODA_DATA")); |
std::string pathDir((char*)getenv("YODA_DATA")); |
82 |
std::string tempName; |
std::string tempName; |
83 |
std::string::size_type pos; |
std::string::size_type pos; |
84 |
std::ostringstream t_Stream; |
|
|
|
|
85 |
pos = input.find_last_of("/"); |
pos = input.find_last_of("/"); |
86 |
//if ((pos == std::string::npos) && !input.empty()) ;//throw Exception("Directories not allowed...."); |
//if ((pos == std::string::npos) && !input.empty()) ;//throw Exception("Directories not allowed...."); |
87 |
fileName = input.substr(pos+1); |
fileName = input.substr(pos+1); |
88 |
pos = fileName.find_last_of("."); |
pos = fileName.find_last_of("."); |
89 |
fileName = fileName.substr(0,pos); |
fileName = fileName.substr(0,pos); |
90 |
pathDir = pathDir + "/"; |
pathDir = pathDir + "/"; |
91 |
tempName = pathDir + fileName; |
tempName = pathDir + fileName + "00"; |
92 |
|
//oss << pathDir << fileName << std::setw( 2 ) << std::setfill( '0' ); |
93 |
|
oss.str(tempName.c_str()); |
94 |
int i = 0; |
int i = 0; |
95 |
while (res){ |
while (res){ |
96 |
if ((dirp = opendir(tempName.c_str())) == NULL) { |
//if ((dirp = opendir(tempName.c_str())) == NULL) { |
97 |
|
if ((dirp = opendir(oss.str().c_str())) == NULL) { |
98 |
res = 0; |
res = 0; |
99 |
} else { |
} else { |
100 |
closedir(dirp); |
closedir(dirp); |
101 |
t_Stream.str(""); |
oss.str(""); |
102 |
t_Stream << std::setw( 2 ) << std::setfill( '0' ) << ++i; |
oss << pathDir << fileName << std::setw( 2 ) << std::setfill( '0' ) << ++i; |
|
tempName = pathDir + fileName + t_Stream.str() ; |
|
103 |
res = 1; |
res = 1; |
104 |
} |
} |
105 |
} |
} |
106 |
return (fileName + t_Stream.str()); |
oss.str(""); |
107 |
|
oss << Path << "/" << fileName << std::setw( 2 ) << std::setfill( '0' ) << i; |
108 |
|
Path = oss.str(); |
109 |
|
oss.str(""); |
110 |
|
oss << fileName << std::setw( 2 ) << std::setfill( '0' ) << i; |
111 |
|
Run = oss.str(); |
112 |
|
//return (oss.str()); |
113 |
} |
} |
114 |
|
|
115 |
/** |
/** |
118 |
* @param path Base path name to the data |
* @param path Base path name to the data |
119 |
*/ |
*/ |
120 |
PamelaRun::PamelaRun(std::string fileName, std::string path): |
PamelaRun::PamelaRun(std::string fileName, std::string path): |
121 |
Path(path), |
Path(path), |
122 |
|
Run(fileName), |
123 |
RunNumber(1){ //veirificare se è possibilie eliminare questa variabile |
RunNumber(1){ //veirificare se è possibilie eliminare questa variabile |
124 |
logger->debug(_T("Constructor")); |
logger->debug(_T("Constructor")); |
125 |
Run = RunExists(fileName); |
//Run = RunExists(fileName); |
126 |
|
RunExists(fileName); |
127 |
info = RunInfo(this); |
info = RunInfo(this); |
128 |
} |
} |
129 |
|
|
134 |
* @return the complete path for this event type. |
* @return the complete path for this event type. |
135 |
*/ |
*/ |
136 |
std::string PamelaRun::GetDirName(PacketType const * type) const { |
std::string PamelaRun::GetDirName(PacketType const * type) const { |
137 |
std::string EventType = type->GetName(); |
//std::stringstream oss; |
138 |
return Path + "/" + Run + "/" + EventType; |
//std::string name = type->GetName(); |
139 |
|
//oss.str(""); |
140 |
|
//oss << Path << "/" << Run << "/" << "pippo"; |
141 |
|
//return oss.str(); |
142 |
|
//return "pippo"; |
143 |
|
//std::string EventType = type->GetName(); |
144 |
|
return Path + "/" + Run + "/" + type->GetName(); |
145 |
} |
} |
146 |
|
|
147 |
/** |
/** |
150 |
* @param name subpacket name. |
* @param name subpacket name. |
151 |
* @return the complete path and file name. |
* @return the complete path and file name. |
152 |
*/ |
*/ |
153 |
std::string PamelaRun::GetFileName(const SubPacket* type, std::string name) const { |
std::string PamelaRun::GetFileName(const SubPacket* type, std::string name) { |
154 |
if (type->IsDetectorSpecific()) { |
if (type->IsDetectorSpecific()) { |
155 |
return GetDirName(type->GetPacketType()) + "/" |
return Path + "/" + type->GetPacketType()->GetName() + "/" |
156 |
+ type->GetSubDetector()->GetName() + "/" |
+ Run + "." + type->GetPacketType()->GetName() + "." |
|
+ Run + "." + type->GetPacketType()->GetName() + "." |
|
157 |
+ type->GetSubDetector()->GetName() + "." |
+ type->GetSubDetector()->GetName() + "." |
158 |
+ name + ".root"; |
+ name + ".root"; |
159 |
} else { |
} else { |
160 |
return GetDirName(type->GetPacketType()) + "/" |
return Path + "/" + type->GetPacketType()->GetName() + "/" |
161 |
+ Run + "." + type->GetPacketType()->GetName() + "." |
+ Run + "." + type->GetPacketType()->GetName() + "." |
162 |
+ name + ".root"; |
+ name + ".root"; |
163 |
|
/* |
164 |
|
return Path + "/" + type->GetPacketType()->GetName() + "/" |
165 |
|
+ Run + "." + type->GetPacketType()->GetName() + "." |
166 |
|
+ name + ".root"; */ |
167 |
} |
} |
168 |
} |
} |
169 |
|
|
172 |
* @param type subpacket type. |
* @param type subpacket type. |
173 |
* @return the complete path and file name. |
* @return the complete path and file name. |
174 |
*/ |
*/ |
175 |
std::string PamelaRun::GetFileName(const SubPacket* type) const { |
std::string PamelaRun::GetFileName(const SubPacket* type) { |
176 |
return GetFileName(type, type->GetSubPacketName()); |
//return GetFileName(type, type->GetSubPacketName()); |
177 |
|
return GetFileName(type, "pippo"); |
178 |
} |
} |
179 |
|
|
180 |
/** |
/** |
211 |
std::list<std::string> files; |
std::list<std::string> files; |
212 |
DIR *dir = opendir(path.c_str()); |
DIR *dir = opendir(path.c_str()); |
213 |
if (dir == 0) { |
if (dir == 0) { |
214 |
oss.flush(); |
logger->debug("Could not open " + path); |
215 |
oss << "Could not open " << path; |
//throw Exception("Could not open " + path); |
|
logger->debug(oss.str().c_str()); |
|
|
throw Exception("Could not open " + path); |
|
216 |
} |
} |
217 |
|
|
218 |
for (struct dirent *d = readdir(dir); d != NULL; d = readdir(dir)) { |
for (struct dirent *d = readdir(dir); d != NULL; d = readdir(dir)) { |
232 |
if (stat(nextfilename.c_str(), &buf) == 0) { |
if (stat(nextfilename.c_str(), &buf) == 0) { |
233 |
filename.insert(filename.size()-5, "*"); |
filename.insert(filename.size()-5, "*"); |
234 |
} |
} |
235 |
oss.flush(); |
logger->debug("Using " + filename); |
|
oss << "Using " << filename; |
|
|
logger->debug(oss.str().c_str()); |
|
236 |
files.push_back(filename); |
files.push_back(filename); |
237 |
} |
} |
238 |
} |
} |
270 |
} |
} |
271 |
TFile* File = new TFile(BaseFileName.c_str(), "read"); |
TFile* File = new TFile(BaseFileName.c_str(), "read"); |
272 |
if (!File->IsOpen()) { |
if (!File->IsOpen()) { |
273 |
oss.flush(); |
logger->error("Could not open file " + BaseFileName + " for reading."); |
|
oss << "Could not open file " << BaseFileName << " for reading."; |
|
|
logger->warn(oss.str().c_str()); |
|
274 |
return; |
return; |
275 |
} |
} |
276 |
TList* list = File->GetListOfKeys(); |
TList* list = File->GetListOfKeys(); |
281 |
TChain* FriendChain = new TChain(TreeName.c_str()); |
TChain* FriendChain = new TChain(TreeName.c_str()); |
282 |
FriendChain->Add(FileName.c_str()); |
FriendChain->Add(FileName.c_str()); |
283 |
tree->AddFriend(FriendChain, TreeName.c_str()); |
tree->AddFriend(FriendChain, TreeName.c_str()); |
284 |
oss.flush(); |
//logger->warn("Adding chain " + TreeName + " with " + FriendChain->GetEntries() + " entries as Friend"); |
|
oss << "Adding chain " << TreeName << " with " |
|
|
<< FriendChain->GetEntries() << " entries as Friend"; |
|
|
logger->warn(oss.str().c_str()); |
|
285 |
} |
} |
286 |
} |
} |
287 |
File->Close(); |
File->Close(); |
291 |
std::string TreeName = k->GetName(); |
std::string TreeName = k->GetName(); |
292 |
TTree* FriendTree = (TTree *)File->Get(TreeName.c_str()); |
TTree* FriendTree = (TTree *)File->Get(TreeName.c_str()); |
293 |
tree->AddFriend(FriendTree, TreeName.c_str()); |
tree->AddFriend(FriendTree, TreeName.c_str()); |
294 |
oss.flush(); |
//logger->debug("Adding tree " + TreeName + " with " + FriendTree->GetEntries() + " entries as Friend"); |
|
oss << "Adding tree " << TreeName << " with " |
|
|
<< FriendTree->GetEntries() << " entries as Friend"; |
|
|
logger->debug(oss.str().c_str()); |
|
295 |
} |
} |
296 |
} |
} |
297 |
} |
} |
304 |
* @return The root trees with the friends. |
* @return The root trees with the friends. |
305 |
*/ |
*/ |
306 |
TTree* PamelaRun::ReadTTree(const PacketType* type) { |
TTree* PamelaRun::ReadTTree(const PacketType* type) { |
307 |
oss.flush(); |
oss.str(""); |
308 |
oss << "Getting root files of " << type->GetName(); |
oss << "Getting root files of " << type->GetName(); |
309 |
logger->debug(oss.str().c_str()); |
logger->debug(oss.str().c_str()); |
310 |
RootTreeMap::iterator t = TTreeMap.find(type); |
RootTreeMap::iterator t = TTreeMap.find(type); |
311 |
if (t != TTreeMap.end()) { |
if (t != TTreeMap.end()) { |
312 |
return t->second; |
return t->second; |
313 |
} else { |
} else { |
314 |
oss.flush(); |
oss.str(""); |
315 |
oss << "Reading root files of " << type->GetName(); |
oss << "Reading root files of " << type->GetName(); |
316 |
logger->debug(oss.str().c_str()); |
logger->debug(oss.str().c_str()); |
317 |
EventHeader header(type); |
EventHeader header(type); |
351 |
branch->SetAddress(subpacket); |
branch->SetAddress(subpacket); |
352 |
SubPacketAddresses.insert(SubPacketMap::value_type(FullName, packet)); |
SubPacketAddresses.insert(SubPacketMap::value_type(FullName, packet)); |
353 |
} else { |
} else { |
354 |
oss.flush(); |
oss.str(""); |
355 |
oss << "Could not find data for " << packet->GetPacketType()->GetName() << "/" << name ; |
oss << "Could not find data for " << packet->GetPacketType()->GetName() << "/" << name ; |
356 |
logger->error(oss.str().c_str()); |
logger->error(oss.str().c_str()); |
357 |
} |
} |
410 |
TFile* File = new TFile(FileName.c_str(), "create"); |
TFile* File = new TFile(FileName.c_str(), "create"); |
411 |
File->SetCompressionLevel(5); |
File->SetCompressionLevel(5); |
412 |
if (!File->IsOpen()) { |
if (!File->IsOpen()) { |
413 |
oss.flush(); |
logger->error("Could not open file " + FileName); |
414 |
oss << "Could not open file " << FileName ; |
//throw Exception("Could not open file " + FileName); |
|
logger->error(oss.str().c_str()); |
|
|
throw Exception("Could not open file " + FileName); |
|
415 |
} |
} |
416 |
std::string TreeName = GetTreeName(packet); |
std::string TreeName = GetTreeName(packet); |
417 |
TTree *tree = new TTree(TreeName.c_str(), algo->GetAlgorithmName().c_str()); |
TTree *tree = new TTree(TreeName.c_str(), algo->GetAlgorithmName().c_str()); |
420 |
AlgorithmInfo ai(algo); |
AlgorithmInfo ai(algo); |
421 |
ai.Write(); |
ai.Write(); |
422 |
info.Write(); |
info.Write(); |
423 |
oss.flush(); |
logger->debug("Creating file " + FileName + " with Tree " + TreeName); |
|
oss << "Creating file " << FileName << " with Tree " << TreeName; |
|
|
logger->info(oss.str().c_str()); |
|
424 |
return tree; |
return tree; |
425 |
} |
} |
426 |
|
|
438 |
void PamelaRun::WriteSubPacket(Algorithm *algo, void* subpacket, |
void PamelaRun::WriteSubPacket(Algorithm *algo, void* subpacket, |
439 |
const TClass *c, std::string name) { |
const TClass *c, std::string name) { |
440 |
SubPacket *packet = *(SubPacket **)subpacket; |
SubPacket *packet = *(SubPacket **)subpacket; |
441 |
oss.flush(); |
oss.str(""); |
442 |
oss << "Register: " << name << " for " << algo->GetAlgorithmName() << " (writing)"; |
oss << "Register: " << name << " for " << algo->GetAlgorithmName() << " (writing)"; |
443 |
logger->debug(oss.str().c_str()); |
logger->debug(oss.str().c_str()); |
444 |
TTree* HeaderTree = ReadTTree(packet->GetPacketType()); |
TTree* HeaderTree = ReadTTree(packet->GetPacketType()); |
445 |
TTree* tree = CreateTTree(algo, packet, name); |
TTree* tree = CreateTTree(algo, packet, name); |
446 |
oss.flush(); |
oss.str(""); |
447 |
oss << "Branch: " << name << " Class: " << c->GetName(); |
oss << "Branch: " << name << " Class: " << c->GetName(); |
448 |
logger->debug(oss.str().c_str()); |
logger->debug(oss.str().c_str()); |
449 |
tree->Branch(name.c_str(), c->GetName(), subpacket); |
tree->Branch(name.c_str(), c->GetName(), subpacket); |
477 |
*/ |
*/ |
478 |
void PamelaRun::WriteHeader(Algorithm* algo, EventHeader** subpacket, |
void PamelaRun::WriteHeader(Algorithm* algo, EventHeader** subpacket, |
479 |
const PacketType* type) { |
const PacketType* type) { |
|
oss.flush(); |
|
|
oss << "Creating header tree for " << type->GetName(); |
|
|
logger->debug(oss.str().c_str()); |
|
480 |
EventHeader header(type); |
EventHeader header(type); |
481 |
std::string FileName = GetFileName(&header, GetDefaultBranchName(&header)); |
std::string FileName = GetFileName(&header, GetDefaultBranchName(&header)); |
482 |
std::string EventType = (&header)->GetPacketType()->GetName(); |
std::string EventType = (&header)->GetPacketType()->GetName(); |
483 |
CreateDirectoryStructure(FileName.c_str()); |
CreateDirectoryStructure(FileName.c_str()); |
484 |
TFile* File = new TFile(FileName.c_str(), "create"); |
TFile* File = new TFile(FileName.c_str(), "create"); |
485 |
if (!File->IsOpen()) { |
if (!File->IsOpen()) { |
486 |
oss.flush(); |
logger->error("Could not open file " + FileName); |
487 |
oss << "Could not open file " << FileName ; |
//throw Exception("Could not open file " + FileName); |
|
logger->error(oss.str().c_str()); |
|
|
throw Exception("Could not open file " + FileName); |
|
488 |
} |
} |
489 |
//std::string TreeName = GetTreeName(packet); |
//std::string TreeName = GetTreeName(packet); |
490 |
TTree *tree = new TTree("Pscu", algo->GetAlgorithmName().c_str()); |
TTree *tree = new TTree("Pscu", algo->GetAlgorithmName().c_str()); |
493 |
AlgorithmInfo ai(algo); |
AlgorithmInfo ai(algo); |
494 |
ai.Write(); |
ai.Write(); |
495 |
info.Write(); |
info.Write(); |
496 |
oss.flush(); |
std::stringstream temp; |
497 |
oss << "Creating file " << FileName << " with Tree Pscu"; |
//temp.str(""); |
498 |
logger->info(oss.str().c_str()); |
//temp << "Created file" << FileName.c_str() << " with Tree Pscu" ; |
499 |
|
//logger->debug(temp.str()); |
500 |
tree->Branch(GetDefaultBranchName(&header).c_str(), |
tree->Branch(GetDefaultBranchName(&header).c_str(), |
501 |
(*subpacket)->Class()->GetName(), subpacket); |
(*subpacket)->Class()->GetName(), subpacket); |
502 |
TTreeMap.insert(RootTreeMap::value_type(type, tree)); |
TTreeMap.insert(RootTreeMap::value_type(type, tree)); |
515 |
WriteHeader(algo, subpacket, PacketType::CalibCalPulse1); |
WriteHeader(algo, subpacket, PacketType::CalibCalPulse1); |
516 |
WriteHeader(algo, subpacket, PacketType::CalibCalPulse2); |
WriteHeader(algo, subpacket, PacketType::CalibCalPulse2); |
517 |
WriteHeader(algo, subpacket, PacketType::Physics); |
WriteHeader(algo, subpacket, PacketType::Physics); |
|
WriteHeader(algo, subpacket, PacketType::CalibTrkBoth); |
|
518 |
WriteHeader(algo, subpacket, PacketType::CalibTrk1); |
WriteHeader(algo, subpacket, PacketType::CalibTrk1); |
519 |
WriteHeader(algo, subpacket, PacketType::CalibTrk2); |
WriteHeader(algo, subpacket, PacketType::CalibTrk2); |
|
WriteHeader(algo, subpacket, PacketType::CalibTrd); |
|
520 |
WriteHeader(algo, subpacket, PacketType::CalibTof); |
WriteHeader(algo, subpacket, PacketType::CalibTof); |
521 |
WriteHeader(algo, subpacket, PacketType::CalibS4); |
WriteHeader(algo, subpacket, PacketType::CalibS4); |
522 |
WriteHeader(algo, subpacket, PacketType::CalibCalPed); |
WriteHeader(algo, subpacket, PacketType::CalibCalPed); |
523 |
WriteHeader(algo, subpacket, PacketType::CalibAc); |
WriteHeader(algo, subpacket, PacketType::Calib1_Ac1); |
524 |
|
WriteHeader(algo, subpacket, PacketType::Calib1_Ac2); |
525 |
|
WriteHeader(algo, subpacket, PacketType::Calib2_Ac1); |
526 |
|
WriteHeader(algo, subpacket, PacketType::Calib2_Ac2); |
527 |
WriteHeader(algo, subpacket, PacketType::RunHeader); |
WriteHeader(algo, subpacket, PacketType::RunHeader); |
528 |
WriteHeader(algo, subpacket, PacketType::RunTrailer); |
WriteHeader(algo, subpacket, PacketType::RunTrailer); |
529 |
WriteHeader(algo, subpacket, PacketType::CalibHeader); |
WriteHeader(algo, subpacket, PacketType::CalibHeader); |
540 |
WriteHeader(algo, subpacket, PacketType::Tmtc); |
WriteHeader(algo, subpacket, PacketType::Tmtc); |
541 |
WriteHeader(algo, subpacket, PacketType::Mcmd); |
WriteHeader(algo, subpacket, PacketType::Mcmd); |
542 |
WriteHeader(algo, subpacket, PacketType::ForcedFECmd); |
WriteHeader(algo, subpacket, PacketType::ForcedFECmd); |
543 |
WriteHeader(algo, subpacket, PacketType::AcInit); |
WriteHeader(algo, subpacket, PacketType::Ac1Init); |
544 |
WriteHeader(algo, subpacket, PacketType::CalInit); |
WriteHeader(algo, subpacket, PacketType::CalInit); |
545 |
WriteHeader(algo, subpacket, PacketType::TrkInit); |
WriteHeader(algo, subpacket, PacketType::TrkInit); |
546 |
WriteHeader(algo, subpacket, PacketType::TofInit); |
WriteHeader(algo, subpacket, PacketType::TofInit); |
547 |
WriteHeader(algo, subpacket, PacketType::TrgInit); |
WriteHeader(algo, subpacket, PacketType::TrgInit); |
548 |
WriteHeader(algo, subpacket, PacketType::NdInit); |
WriteHeader(algo, subpacket, PacketType::NdInit); |
549 |
|
WriteHeader(algo, subpacket, PacketType::S4Init); |
550 |
|
WriteHeader(algo, subpacket, PacketType::Ac2Init); |
551 |
WriteHeader(algo, subpacket, PacketType::CalAlarm); |
WriteHeader(algo, subpacket, PacketType::CalAlarm); |
552 |
WriteHeader(algo, subpacket, PacketType::AcAlarm); |
WriteHeader(algo, subpacket, PacketType::AcAlarm); |
553 |
WriteHeader(algo, subpacket, PacketType::TrkAlarm); |
WriteHeader(algo, subpacket, PacketType::TrkAlarm); |
554 |
WriteHeader(algo, subpacket, PacketType::TrgAlarm); |
WriteHeader(algo, subpacket, PacketType::TrgAlarm); |
555 |
WriteHeader(algo, subpacket, PacketType::TofAlarm); |
WriteHeader(algo, subpacket, PacketType::TofAlarm); |
556 |
|
WriteHeader(algo, subpacket, PacketType::S4Alarm); |
557 |
|
WriteHeader(algo, subpacket, PacketType::TsbT); |
558 |
|
WriteHeader(algo, subpacket, PacketType::TsbB); |
559 |
} |
} |
560 |
|
|
561 |
/** |
/** |
584 |
* @param type the package type of the trees to fill. |
* @param type the package type of the trees to fill. |
585 |
*/ |
*/ |
586 |
void PamelaRun::FillTrees(const PacketType* type) { |
void PamelaRun::FillTrees(const PacketType* type) { |
587 |
for (TTreeList::iterator j = WritingRootTrees[type].begin(); |
try{ |
588 |
j != WritingRootTrees[type].end(); j++) { |
for (TTreeList::iterator j = WritingRootTrees[type].begin(); |
589 |
(*j)->Fill(); |
j != WritingRootTrees[type].end(); j++) { |
590 |
; |
(*j)->Fill(); |
591 |
|
} |
592 |
|
} catch(Exception exc){ |
593 |
|
logger->fatal("ORRORE!!!"); |
594 |
} |
} |
595 |
} |
} |
596 |
|
|
597 |
|
|
598 |
|
|