22 const auto get_name = [](
const auto* i ) {
return i->
name(); };
26 auto operator()( T&& t ) const -> decltype( auto ) {
27 return std::forward<T>( t );
31 template <
typename Iterator,
typename Sep,
typename Projection = Identity>
34 if ( first != last ) s += proj( *first++ );
35 for ( ; first != last; ++first ) {
41 template <
typename Container,
typename Sep,
typename Projection = Identity>
42 std::string join(
const Container&
c, Sep sep, Projection proj = {} ) {
60 auto joSvc = service<IJobOptionsSvc>(
"JobOptionsSvc" );
62 for (
const auto c : joSvc->getClients() ) {
64 const auto props = joSvc->getProperties( c );
66 for (
const auto prop : *props ) { m_metadata[c +
"." + prop->name()] = prop->toString(); }
71 for (
const auto*
name : {
"ApplicationMgr",
"MessageSvc",
"NTupleSvc"} ) {
72 auto svc = service<IProperty>(
name );
73 if ( !svc.isValid() )
continue;
75 for (
const auto* prop : svc->getProperties() ) { m_metadata[
prefix + prop->name()] = prop->toString(); }
87 m_metadata[
"ISvcLocator.Services"] = join( serviceLocator()->getServices(),
", ", get_name );
93 m_metadata[
"IAlgManager.Algorithms"] = join( algMan->
getAlgorithms(),
", ", get_name );
99 auto joSvc = service<IProperty>(
"JobOptionsSvc" );
101 for (
const auto* prop : joSvc->getProperties() ) {
102 m_metadata[
"JobOptionsSvc." + prop->name()] = prop->toString();
107 debug() <<
"Metadata collected:\n";
108 for (
const auto& item : m_metadata ) { debug() << item.first <<
':' << item.second <<
'\n'; }
const std::string & name() const override
Retrieve name of the service.
constexpr static const auto SUCCESS
#define DECLARE_COMPONENT(type)
This class is used for returning status codes from appropriate routines.
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.
constexpr static const auto FAILURE
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.