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(); }
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'; }
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
bool isValid() const
Allow for check if smart pointer is valid.
constexpr static const auto SUCCESS
virtual const std::vector< IAlgorithm * > & getAlgorithms() const =0
Return the list of Algorithms.
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
#define DECLARE_COMPONENT(type)
const std::string & name() const override
Retrieve name of the service.
This class is used for returning status codes from appropriate routines.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
boost::spirit::classic::position_iterator2< ForwardIterator > Iterator
constexpr static const auto FAILURE
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
AttribStringParser::Iterator begin(const AttribStringParser &parser)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.