Commit 287b745e authored by Nils Krumnack's avatar Nils Krumnack
Browse files

fix AnalysisBase grid submission problems introduced with !42411

The changes introduced in !42411 required additional dictionaries to
serialize any of the component configuration objects, which were not
defined in that merge request.  This is (apparently) not caught in any
unit tests, but it leads to any sub-tools to be stripped off
algorithms during batch and grid submission.

This MR should fix that by defining one dictionary and changing the
type of one member variable to avoid the need for the second.  At some
point a new test should be defined to catch these problems in CI, or
at least in the nightly tests, but for now having a quick fix seemed
more important.
parent 47fa46e9
......@@ -279,7 +279,7 @@ namespace asg
/// \brief the map of (private) tool handle arrays to manage, and
/// the tools they contain
std::map<std::string,std::vector<decltype(m_privateTools.cbegin())>> m_toolArrays;
std::map<std::string,std::vector<std::string>> m_toolArrays;
/// \brief the map of property values
std::map<std::string,std::string> m_propertyValues;
......@@ -8,4 +8,6 @@
<class name="asg::AsgComponentConfig" />
<class name="asg::AsgToolConfig" />
<class name="std::map<std::string,std::tuple<asg::AsgToolConfig,std::string>>" />
......@@ -196,8 +196,8 @@ namespace asg
auto& arrayData = m_toolArrays[name];
auto myname = makeArrayName (name, arrayData.size());
toolConfig.setName (myname);
auto emplace_result = m_privateTools.emplace (myname, std::make_tuple (std::move (toolConfig), name));
arrayData.push_back (emplace_result.first);
m_privateTools.emplace (myname, std::make_tuple (std::move (toolConfig), name));
arrayData.push_back (myname);
return myname;
} else
......@@ -324,7 +324,7 @@ namespace asg
std::vector<std::string> valueArray;
for (const auto& tool : toolArray.second)
valueArray.emplace_back (component->name() + "." + tool->first);
valueArray.emplace_back (component->name() + "." + tool);
std::string valueString;
ANA_CHECK (asg::detail::GetCastStringHelper<std::vector<std::string>>::get (valueArray, valueString));
ANA_CHECK (component->setProperty (toolArray.first, valueString));
......@@ -370,7 +370,10 @@ namespace asg
std::vector<std::string> valueArray;
for (const auto& tool : toolArray.second)
valueArray.push_back (std::get<0>(tool->second).typeAndName());
auto toolConfig = m_privateTools.find (tool);
valueArray.push_back (std::get<0>(toolConfig->second).typeAndName());
std::string valueString = Gaudi::Utils::toString (valueArray);
std::string propertyPath = prefix + m_name + "." + toolArray.first;
joSvc->set (propertyPath, valueString);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment