Skip to content

AthenaMonitoringKernel: Fix string filling with generator

Frank Winklmeier requested to merge fwinkl/athena:fwinkl_20200325T150052 into master

Fix and unit testing for the following use-case:

Monitored::Scalar<std::string>( "DetID", [&](){return "SCT";} );

Filling from a generated string was not supported and instead of a compiler error it actually made the code crash because it tried to initialize a string from a double (e.g. std::string m_value(0)).

P.S.: Using a transformation, e.g.

Monitored::Scalar<std::string>( "DetID", "default", [&](std::string s){return s+"postfix";} );

is still broken. May address that in a separate MR.

cc @tbold

Merge request reports