181 DQParSet_t::const_iterator regexEnd =
m_regexlist.end();
184 TSeqCollection* resultList = (*m_outputMap)[*
regex];
187 std::cerr <<
"Can't find original list for regex???" << std::endl;
191 tmpRegex.insert(DQOutputMap_t::value_type(*
regex, resultList));
192 (*m_outputMap).erase(*
regex);
200 dynamic_cast<TSeqCollection*
>((*m_outputMap)[
parentName])->Remove(resultList);
206 DQResultMap_t::const_iterator rEnd =
m_dqResults.end();
207 for (DQResultMap_t::const_iterator
r =
m_dqResults.begin();
r != rEnd; ++
r)
209 const std::string
name(
r->first);
222 TSeqCollection* resultList = (*m_outputMap)[
name];
224 std::string storename(
name);
226 if (resultList == NULL)
229 bool isRegex =
false;
233 std::string::size_type regexlen =
regex->length();
234 if (*
regex +
"_" ==
name.substr(0, regexlen + 1))
238 std::string::size_type atsign =
regex->rfind(
'@');
239 if (atsign != std::string::npos)
241 extra =
regex->substr(atsign, std::string::npos);
243 storename =
name.substr(regexlen + 1, std::string::npos);
251 std::cerr <<
"WARNING: setInput() has not been set; cannot publish regex results" << std::endl;
254 resultList =
dynamic_cast<TSeqCollection*
>(tmpRegex[
parname]->Clone());
255 (*m_outputMap)[storename +
extra] = resultList;
258 bool use_full_name =
false;
264 std::string store_using_path;
265 const HanConfigParMap* hcpm =
a->GetAnnotation(
"store_using_path");
268 store_using_path.assign(hcpm->GetValue());
270 boost::algorithm::to_lower(store_using_path);
271 if (store_using_path ==
"1" || store_using_path ==
"yes" || store_using_path ==
"true")
273 use_full_name =
true;
279 resultList->SetName((boost::algorithm::replace_all_copy(storename,
"/",
"_") +
extra +
"_").c_str());
283 resultList->SetName((storename +
extra +
"_").c_str());
285 dynamic_cast<TSeqCollection*
>((*m_outputMap)[
parentName])->Add(resultList);
291 (strncmp(
className,
"TProfile", 8) == 0) || (strncmp(
className,
"TEfficiency", 11) == 0))
293 TNamed* transobj =
dynamic_cast<TNamed*
>(
key->ReadObj());
294 if (transobj != NULL)
296 HanHistogramLink* hhl =
new HanHistogramLink(
m_input, storename);
299 hhl->SetName((boost::algorithm::replace_all_copy(storename,
"/",
"_") +
extra).c_str());
303 hhl->SetName((std::string(transobj->GetName()) +
extra).c_str());
307 resultList->Add(hhl);
311 std::cerr <<
"TNamed* cast failed for " << storename << std::endl;
317 std::cout <<
"key is NULL" << std::endl;
322 std::cerr <<
"WARNING: Unable to find mapping for " <<
name << std::endl;
330 resultList =
dynamic_cast<TSeqCollection*
>(resultList->FindObject(
"Results"));
333 if (resultList ==
nullptr)
335 std::cerr <<
"Warning: no result list found associated with '" <<
name <<
"'\n";
340 resultList->Add(
newTObjArray(
"Status",
new TObjString(StatusToStr(
result.status_).c_str()), 1));
343 std::map<std::string, double>::const_iterator iter =
result.tags_.begin();
344 for (; iter !=
result.tags_.end(); ++iter)
346 std::ostringstream tagval;
347 tagval << std::setprecision(4) << iter->second;
348 resultList->Add(
newTObjArray(iter->first.c_str(),
new TObjString(tagval.str().c_str()), 1));
352 TObject* resultobj =
result.getObject();
355 TObject* resultobjclone = resultobj->Clone();
358 resultList->Add(resultobjclone);
362 std::cerr <<
"Discarding result object " <<
result.getObject()->GetName() << std::endl;
363 delete resultobjclone;
374 resultList->Add(
ref);
378 std::cerr <<
"Discarding reference object " <<
ref->GetName() << std::endl;