22 const auto get_name = [](
const auto* i ) {
return i->
name(); };
26 auto operator()( T&& t ) const -> decltype( auto )
28 return std::forward<T>( t );
32 template <
typename Iterator,
typename Sep,
typename Projection = Identity>
36 if ( first != last ) s += proj( *first++ );
37 for ( ; first != last; ++first ) {
43 template <
typename Container,
typename Sep,
typename Projection = Identity>
44 std::string join(
const Container&
c, Sep sep, Projection proj = {} )
62 for (
const auto*
name : {
"ApplicationMgr",
"MessageSvc",
"NTupleSvc"} ) {
63 auto svc = service<IProperty>(
name );
64 if ( !svc.isValid() )
continue;
66 for (
const auto* prop : svc->getProperties() ) {
67 m_metadata[
prefix + prop->name()] = prop->toString();
76 m_metadata[
"ToolSvc"] = join( tSvc->
getInstances(
"" ),
", " );
82 m_metadata[
"ISvcLocator.Services"] = join( serviceLocator()->getServices(),
", ", get_name );
88 m_metadata[
"IAlgManager.Algorithms"] = join( algMan->
getAlgorithms(),
", ", get_name );
93 auto joSvc = service<IProperty>(
"JobOptionsSvc" );
95 for (
const auto* prop : joSvc->getProperties() ) {
96 m_metadata[
"JobOptionsSvc." + prop->name()] = prop->toString();
100 debug() <<
"Metadata collected:\n";
101 for (
const auto& item : m_metadata ) {
102 debug() << item.first <<
':' << item.second <<
'\n';
constexpr static const auto FAILURE
const std::string & name() const override
Retrieve name of the service.
#define DECLARE_COMPONENT(type)
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
virtual Out operator()(const vector_of_const_< In > &inputs) const =0
boost::spirit::classic::position_iterator2< ForwardIterator > Iterator
bool isValid() const
Allow for check if smart pointer is valid.
virtual const std::vector< IAlgorithm * > & getAlgorithms() const =0
Return the list of Algorithms.
AttribStringParser::Iterator begin(const AttribStringParser &parser)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.