39 const std::string&
name) :
40 TFile(inFilename.c_str(),
"UPDATE"),
47 std::cerr <<
"ERROR " <<
m_name <<
" Could not open MonitoringFile: " << inFilename << std::endl;
57 std::cerr <<
"ERROR " << m_name <<
" Chose Not To Write " << this->GetName() << std::endl;
60 for (std::set<TObject*>::const_iterator git = m_garbage.begin(); git != m_garbage.end(); ++git) {
102 h->SetDirectory(
dir);
118 m_garbage.insert(
h1);
121 m_garbage.insert(h2);
125 m_garbage.insert(h3);
132 TTree* metadata_overview_tr = 0;
134 if (!targetDir || !
h1)
return;
136 targetDir->GetObject(
"metadata", metadata_overview_tr);
139 std::string intervalData_ =
"run";
140 std::string chainData_ =
"<none>";
141 std::string mergeData_ =
"<default>";
142 if (metadata_overview_tr) {
145 char intervalData[99];
149 TBranch* b_intervalData;
150 TBranch* b_chainData;
151 TBranch* b_mergeData;
152 TTree* tClone = (TTree*) metadata_overview_tr->Clone();
153 metadata_overview_tr->SetDirectory(0);
154 tClone->SetBranchAddress(
"Name",
name, &b_name);
155 tClone->SetBranchAddress(
"Interval", intervalData, &b_intervalData);
156 tClone->SetBranchAddress(
"TriggerChain", chainData, &b_chainData);
157 tClone->SetBranchAddress(
"MergeMethod", mergeData, &b_mergeData);
160 for (
int i = 0;
i != tClone->GetEntries(); ++
i) {
162 intervalData_ = intervalData;
163 chainData_ = chainData;
164 mergeData_ = mergeData;
166 if (name_ == (std::string)
h1->GetName()) isMeta =
true;
171 metadata_overview_tr->SetDirectory(0);
172 delete metadata_overview_tr;
175 metadata_overview.
fill(
h1->GetName(), intervalData_, chainData_, mergeData_);
176 if (h2) metadata_overview.
fill(h2->GetName(), intervalData_, chainData_, mergeData_);
177 if (h3) metadata_overview.
fill(h3->GetName(), intervalData_, chainData_, mergeData_);
181 metadata_overview_tr->Write(
"", TObject::kOverwrite);
184 TTree* metadata_overview_tr =
new TTree(
"metadata",
"Monitoring Metadata");
186 if (
h1) metadata_overview.
fill(
h1->GetName(), intervalData_, chainData_, mergeData_);
190 metadata_overview_tr->Write(
"", TObject::kOverwrite);
191 metadata_overview_tr->SetDirectory(0);
192 delete metadata_overview_tr;