The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
MetaDataSvc.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11/*
12 * MetaDataSvc.cpp
13 *
14 * Created on: Mar 24, 2015
15 * Author: Ana Trisovic
16 */
17
18// Framework include files
26
27#include "MetaDataSvc.h"
28
30
32
34 if ( msgLevel( MSG::DEBUG ) ) debug() << "started" << endmsg;
35 return collectData();
36}
37
38std::map<std::string, std::string> MetaDataSvc::getMetaDataMap() const { return m_metadata; }
39
41
42 // save options for all clients
43 for ( const auto& p : serviceLocator()->getOptsSvc().items() ) { m_metadata[std::get<0>( p )] = std::get<1>( p ); }
44
45 if ( msgLevel( MSG::DEBUG ) ) {
46 debug() << "Metadata collected:\n";
47 for ( const auto& item : m_metadata ) { debug() << item.first << ':' << item.second << '\n'; }
48 debug() << endmsg;
49 }
50
52}
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
#define DECLARE_COMPONENT(type)
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
std::map< std::string, std::string > m_metadata
Definition MetaDataSvc.h:39
StatusCode start() override
StatusCode collectData()
std::map< std::string, std::string > getMetaDataMap() const override
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition Service.cpp:336
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
constexpr static const auto SUCCESS
Definition StatusCode.h:99
@ DEBUG
Definition IMessageSvc.h:22