13 auto titlegurad =
msg->StartTitleWithGuard(
"ResultGroup::AddResult");
14 if (result ==
nullptr)
16 msg->MSG_ERROR(
"Input result is NULL");
20 auto name = result->GetResultName();
21 auto findresult = this->
ResultMap.find(name);
23 msg->MSG_WARNING(
"Result ", name,
" already exists, this book will be ignored");
30 auto titlegurad =
msg->StartTitleWithGuard(
"ResultGroup::Merge");
31 if (subGroup ==
nullptr)
33 msg->MSG_ERROR(
"Input sub ResultGroup is NULL");
44 for (
auto &t : subGroup->ResultMap)
46 auto findresult = this->
ResultMap.find(t.first);
49 findresult->second->Combine(t.second);
53 this->
ResultMap.emplace(std::pair<TString, std::shared_ptr<Result>>(t.first, t.second));
61 t.second->WriteToFile();
void Merge(std::shared_ptr< ResultGroup > subGroup)
Merge two ResultGroup into one.
std::map< TString, std::shared_ptr< Result > > ResultMap
void Write()
Write all the results inside, i.e. call Result::WriteToFile() for each result.
std::shared_ptr< MSGTool > msg
void AddResult(std::shared_ptr< Result > result)
Add a result to the group.