Skip to content
Snippets Groups Projects
Commit 4912fc91 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Renamed MetaDataSvc to Gaudi::MetaDataSvc

MetaDataSvc is moved into the Gaudi namespace to avoid conflicts
with the existing MetaDataSvc in ATLAS.

This also includes a minor fix to MetaDataSvc.

Fixes GAUDI-1199

See merge request !138
parents 9ea0f970 59161c74
No related branches found
No related tags found
No related merge requests found
......@@ -4,9 +4,9 @@
<argument name="args"><set>
<text>$GAUDIEXAMPLESROOT/options/TupleEx.py</text>
<text>--option</text>
<text>ApplicationMgr(EvtMax=10).ExtSvc.append('MetaDataSvc')</text>
<text>ApplicationMgr(EvtMax=10).ExtSvc.append('Gaudi::MetaDataSvc')</text>
<text>--option</text>
<text>from Configurables import MetaDataSvc; MetaDataSvc(OutputLevel=DEBUG)</text>
<text>from Configurables import Gaudi__MetaDataSvc; Gaudi__MetaDataSvc(OutputLevel=DEBUG)</text>
</set></argument>
<argument name="use_temp_dir"><enumeral>true</enumeral></argument>
<argument name="reference"><text>refs/MetaDataSvc.ref</text></argument>
......
......@@ -4,22 +4,22 @@
ApplicationMgr SUCCESS
====================================================================================================================================
Welcome to ApplicationMgr (GaudiCoreSvc v4r0)
running on pclhcb117 on Wed Mar 9 18:10:21 2016
running on pclhcb117 on Fri Mar 11 09:58:09 2016
====================================================================================================================================
ApplicationMgr INFO Application Manager Configured successfully
RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine
RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3
RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine>
MetaDataSvc DEBUG Property update for OutputLevel : new value = 2
MetaDataSvc DEBUG Service base class initialized successfully
Gaudi::MetaDataSvc DEBUG Property update for OutputLevel : new value = 2
Gaudi::MetaDataSvc DEBUG Service base class initialized successfully
RootHistSvc INFO Writing ROOT histograms to: UndefinedROOTOutputFileName
HistogramPersis... INFO Added successfully Conversion service:RootHistSvc
NTupleSvc INFO Added stream file:TupleEx.root as MYLUN
EventLoopMgr WARNING Unable to locate service "EventSelector"
EventLoopMgr WARNING No events will be processed from external input.
ApplicationMgr INFO Application Manager Initialized successfully
MetaDataSvc DEBUG started
MetaDataSvc DEBUG Metadata collected:
Gaudi::MetaDataSvc DEBUG started
Gaudi::MetaDataSvc DEBUG Metadata collected:
ApplicationMgr.ActivateHistory:False
ApplicationMgr.AlgTypeAliases:{ }
ApplicationMgr.AppName:ApplicationMgr
......@@ -34,7 +34,7 @@ ApplicationMgr.EventLoop:EventLoopMgr
ApplicationMgr.EvtMax:10
ApplicationMgr.EvtSel:NONE
ApplicationMgr.Exit:0
ApplicationMgr.ExtSvc:[ 'RndmGenSvc' , 'MetaDataSvc' ]
ApplicationMgr.ExtSvc:[ 'RndmGenSvc' , 'Gaudi::MetaDataSvc' ]
ApplicationMgr.ExtSvcCreates:True
ApplicationMgr.Go:0
ApplicationMgr.HistogramPersistency:ROOT
......@@ -61,7 +61,7 @@ ApplicationMgr.SvcMapping:[ 'EvtDataSvc/EventDataSvc' , 'DetDataSvc/DetectorData
ApplicationMgr.SvcOptMapping:[ ]
ApplicationMgr.TopAlg:[ 'TupleAlg/Tuple' , 'TupleAlg2/Tuple2' , 'TupleAlg3/Tuple3' ]
IAlgManager.Algorithms:Tuple, Tuple2, Tuple3
ISvcLocator.Services:MessageSvc, JobOptionsSvc, RndmGenSvc.Engine, RndmGenSvc, MetaDataSvc, AppMgrRunable, IncidentSvc, AlgContextSvc, EventPersistencySvc, EventDataSvc, TimelineSvc, RootHistSvc, HistogramPersistencySvc, HistogramDataSvc, NTupleSvc, EventLoopMgr, ToolSvc
ISvcLocator.Services:MessageSvc, JobOptionsSvc, RndmGenSvc.Engine, RndmGenSvc, Gaudi::MetaDataSvc, AppMgrRunable, IncidentSvc, AlgContextSvc, EventPersistencySvc, EventDataSvc, TimelineSvc, RootHistSvc, HistogramPersistencySvc, HistogramDataSvc, NTupleSvc, EventLoopMgr, ToolSvc
JobOptionsSvc.AuditFinalize:False
JobOptionsSvc.AuditInitialize:False
JobOptionsSvc.AuditReInitialize:False
......@@ -103,6 +103,7 @@ MessageSvc.setWarning:[ ]
MessageSvc.showStats:False
MessageSvc.statLevel:0
MessageSvc.timeFormat:%Y-%m-%d %H:%M:%S,%f
MessageSvc.tracedInactiveSources:[ ]
MessageSvc.useColors:False
MessageSvc.verboseColorCode:[ ]
MessageSvc.verboseLimit:500
......
......@@ -5,11 +5,11 @@ These information include job options as well as application name and version.
They are named 'info' and saved inside the n-tuple.
## Usage
Metadata can be added to n-tuples adding MetaDataSvc to the list of extra
Metadata can be added to n-tuples adding Gaudi::MetaDataSvc to the list of extra
services in your options, for example with:
~~~{.py}
ApplicationMgr().ExtSvc += [ "MetaDataSvc" ]
ApplicationMgr().ExtSvc += [ "Gaudi::MetaDataSvc" ]
~~~
The content of the metadata info in a file can be dumped with the command line
......
def getMetaData(path):
'''
Extract job metadata recorded by MetaDataSvc from a file.
Extract job metadata recorded by Gaudi::MetaDataSvc from a file.
'''
from cppyy.gbl import TFile
f = TFile.Open(path)
......
......@@ -47,6 +47,8 @@
#include "MetaDataSvc.h"
using Gaudi::MetaDataSvc;
DECLARE_COMPONENT(MetaDataSvc)
// Standard Constructor.
......@@ -73,8 +75,7 @@ StatusCode MetaDataSvc::start(){
MetaDataSvc::~MetaDataSvc() {
}
MetaData* MetaDataSvc::getMetaData() {
md = new MetaData(m_metadata);
return md;
return new MetaData(m_metadata);
}
std::map <std::string, std::string> MetaDataSvc::getMetaDataMap() {
return m_metadata;
......
......@@ -10,6 +10,7 @@
#include "GaudiKernel/IMetaDataSvc.h"
#include "GaudiKernel/Service.h"
namespace Gaudi {
class MetaDataSvc : public extends<Service, IMetaDataSvc> {
public:
// Standard Constructor.
......@@ -31,8 +32,8 @@ public:
private:
bool m_isEnabled;
MetaData* md;
std::map <std::string, std::string> m_metadata;
};
}
#endif /* GAUDISVC_SRC_METADATASVC_METADATASVC_H_ */
......@@ -186,7 +186,7 @@ StatusCode RootHistCnv::RFileCnv::updateRep( IOpaqueAddress* pAddress,
* March 2015
* */
SmartIF <IMetaDataSvc> mds;
mds = serviceLocator()->service("MetaDataSvc", false);
mds = serviceLocator()->service("Gaudi::MetaDataSvc", false);
//auto mds = service<IMetaDataSvc>("MetaDataSvc", false);
if (mds) {
std::map <std::string, std::string> m_metadata = mds->getMetaDataMap();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment