The Gaudi Framework  v36r9p1 (5c15b2bb)
TagCollectionSvc Class Reference

Gaudi tag collection service definition. More...

#include </builds/gaudi/Gaudi/GaudiSvc/src/NTupleSvc/TagCollectionSvc.h>

Inheritance diagram for TagCollectionSvc:
Collaboration diagram for TagCollectionSvc:

Public Member Functions

 TagCollectionSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor. More...
 
StatusCode connect (const std::string &ident) override
 unhides some NTupleSvc methods More...
 
StatusCode connect (const std::string &ident, std::string &logname) override
 unhides some NTupleSvc methods More...
 
- Public Member Functions inherited from NTupleSvc
StatusCode initialize () override
 DataSvc overrides: Initialize the service. More...
 
StatusCode reinitialize () override
 DataSvc overrides: reinitialize service. More...
 
StatusCode finalize () override
 DataSvc overrides: stop the service. More...
 
IConversionSvcgetDataLoader (IRegistry *pReg) override
 DataSvc overrides: Retrieve data loader. More...
 
NTuple::DirectorycreateDirectory (DataObject *pParent, const std::string &title) override
 Create Ntuple directory and register it with the data store. More...
 
NTuple::DirectorycreateDirectory (DataObject *pParent, long id) override
 Create Ntuple directory and register it with the data store. More...
 
NTuple::DirectorycreateDirectory (const std::string &dirPath, long id) override
 Create Ntuple directory and register it with the data store. More...
 
NTuple::DirectorycreateDirectory (const std::string &dirPath, const std::string &title) override
 Create Ntuple directory and register it with the data store. More...
 
NTuple::DirectorycreateDirectory (const std::string &fullPath) override
 Create Ntuple directory and register it with the data store. More...
 
StatusCode create (const CLID &typ, const std::string &title, NTuple::Tuple *&refpTuple) override
 Create requested N tuple (Hide constructor) More...
 
NTuple::Tuplebook (const std::string &fullPath, const CLID &type, const std::string &title) override
 Book Ntuple and register it with the data store. More...
 
NTuple::Tuplebook (const std::string &dirPath, const std::string &relPath, const CLID &type, const std::string &title) override
 Book Ntuple and register it with the data store. More...
 
NTuple::Tuplebook (const std::string &dirPath, long id, const CLID &type, const std::string &title) override
 Book Ntuple and register it with the data store. More...
 
NTuple::Tuplebook (DataObject *pParent, const std::string &relPath, const CLID &type, const std::string &title) override
 Book Ntuple and register it with the data store. More...
 
NTuple::Tuplebook (DataObject *pParent, long id, const CLID &type, const std::string &title) override
 Book Ntuple and register it with the data store. More...
 
NTuple::Tupleaccess (const std::string &fullPath, const std::string &filename) override
 Access N tuple on disk. More...
 
StatusCode save (const std::string &fullPath) override
 Save N tuple to disk. Must be called in order to close the ntuple file properly. More...
 
StatusCode save (NTuple::Tuple *tuple) override
 Save N tuple to disk. Must be called in order to close the ntuple file properly. More...
 
StatusCode save (DataObject *pParent, const std::string &relPath) override
 Save N tuple to disk. Must be called in order to close the ntuple file properly. More...
 
StatusCode writeRecord (NTuple::Tuple *tuple) override
 Write single record to N tuple. More...
 
StatusCode writeRecord (const std::string &fullPath) override
 Write single record to N tuple. More...
 
StatusCode writeRecord (DataObject *pParent, const std::string &relPath) override
 Write single record to N tuple. More...
 
StatusCode readRecord (NTuple::Tuple *tuple) override
 Read single record from N tuple. More...
 
StatusCode readRecord (const std::string &fullPath) override
 Read single record from N tuple. More...
 
StatusCode readRecord (DataObject *pParent, const std::string &relPath) override
 Read single record from N tuple. More...
 
bool isConnected (const std::string &identifier) const override
 Check if a datasource is connected. More...
 
StatusCode connect (const std::string &ident) override
 Add file to list I/O list. More...
 
StatusCode connect (const std::string &ident, std::string &logname) override
 Add file to list I/O list. More...
 
StatusCode disconnect (const std::string &nam) override
 Close open connection. More...
 
StatusCode disconnectAll () override
 Close all open connections. More...
 
 NTupleSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor. More...
 
- Public Member Functions inherited from extends< DataSvc, INTupleSvc, IDataSourceMgr >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from DataSvc
CLID rootCLID () const override
 IDataManagerSvc: Accessor for root event CLID. More...
 
const std::stringrootName () const override
 IDataManagerSvc: Accessor for root event name. More...
 
StatusCode registerAddress (std::string_view fullPath, IOpaqueAddress *pAddress) override
 IDataManagerSvc: Register object address with the data store. More...
 
StatusCode registerAddress (IRegistry *parentObj, std::string_view objectPath, IOpaqueAddress *pAddress) override
 IDataManagerSvc: Register object address with the data store. More...
 
StatusCode unregisterAddress (std::string_view fullPath) override
 IDataManagerSvc: Unregister object address from the data store. More...
 
StatusCode unregisterAddress (IRegistry *pParent, std::string_view objPath) override
 IDataManagerSvc: Unregister object address from the data store. More...
 
StatusCode objectLeaves (const DataObject *pObject, std::vector< IRegistry * > &refLeaves) override
 IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object. More...
 
StatusCode objectLeaves (const IRegistry *pRegistry, std::vector< IRegistry * > &refLeaves) override
 IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object. More...
 
StatusCode objectParent (const DataObject *pObject, IRegistry *&refpParent) override
 IDataManagerSvc: Explore the object store: retrieve the object's parent. More...
 
StatusCode objectParent (const IRegistry *pRegistry, IRegistry *&refpParent) override
 IDataManagerSvc: Explore the object store: retrieve the object's parent. More...
 
StatusCode clearSubTree (std::string_view sub_tree_path) override
 IDataManagerSvc: Remove all data objects below the sub tree identified by its full path name. More...
 
StatusCode clearSubTree (DataObject *pObject) override
 IDataManagerSvc: Remove all data objects below the sub tree identified by the object. More...
 
StatusCode clearStore () override
 IDataManagerSvc: Remove all data objects in the data store. More...
 
StatusCode traverseSubTree (std::string_view sub_tree_path, IDataStoreAgent *pAgent) override
 IDataManagerSvc: Analyze by traversing all data objects below the sub tree identified by its full path name. More...
 
StatusCode traverseSubTree (DataObject *pObject, IDataStoreAgent *pAgent) override
 IDataManagerSvc: Analyze by traversing all data objects below the sub tree. More...
 
StatusCode traverseTree (IDataStoreAgent *pAgent) override
 IDataManagerSvc: Analyze by traversing all data objects in the data store. More...
 
StatusCode setRoot (std::string root_name, DataObject *pRootObj) override
 Initialize data store for new event by giving new event path and root object. More...
 
virtual StatusCode i_setRoot (std::string root_name, DataObject *pRootObj)
 Initialize data store for new event by giving new event path and root object. More...
 
StatusCode setRoot (std::string root_path, IOpaqueAddress *pRootAddr) override
 Initialize data store for new event by giving new event path and address of root object. More...
 
virtual StatusCode i_setRoot (std::string root_path, IOpaqueAddress *pRootAddr)
 Initialize data store for new event by giving new event path and address of root object. More...
 
StatusCode setDataLoader (IConversionSvc *svc, IDataProviderSvc *dpsvc=nullptr) override
 IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service and optionally a data provider. More...
 
StatusCode addPreLoadItem (const DataStoreItem &item) override
 Add an item to the preload list. More...
 
StatusCode removePreLoadItem (const DataStoreItem &item) override
 Remove an item from the preload list. More...
 
StatusCode resetPreLoad () override
 Clear the preload list. More...
 
virtual StatusCode preLoad (int depth, int load_depth, DataObject *pObject)
 Execute one level of preloading and recursively load until the final level is reached. More...
 
StatusCode preLoad () override
 load all preload items of the list More...
 
StatusCode registerObject (std::string_view parentPath, std::string_view objPath, DataObject *pObject) override
 Register object with the data store. More...
 
StatusCode registerObject (DataObject *parentObj, std::string_view objPath, DataObject *pObject) override
 Register object with the data store. More...
 
StatusCode unregisterObject (std::string_view fullPath) override
 Unregister object from the data store. More...
 
StatusCode unregisterObject (DataObject *pObject) override
 Unregister object from the data store. More...
 
StatusCode unregisterObject (DataObject *pObject, std::string_view objectPath) override
 Unregister object from the data store. More...
 
StatusCode retrieveObject (IRegistry *pDirectory, std::string_view path, DataObject *&pObject) override
 Retrieve object from data store. More...
 
StatusCode findObject (std::string_view fullPath, DataObject *&pObject) override
 Find object identified by its full path in the data store. More...
 
StatusCode findObject (IRegistry *pDirectory, std::string_view path, DataObject *&pObject) override
 Find object identified by its full path in the data store. More...
 
StatusCode linkObject (IRegistry *from, std::string_view objPath, DataObject *to) override
 Add a link to another object. More...
 
StatusCode linkObject (std::string_view fullPath, DataObject *to) override
 Add a link to another object. More...
 
StatusCode unlinkObject (IRegistry *from, std::string_view objPath) override
 Remove a link to another object. More...
 
StatusCode unlinkObject (DataObject *fromObj, std::string_view objPath) override
 Remove a link to another object. More...
 
StatusCode unlinkObject (std::string_view fullPath) override
 Remove a link to another object. More...
 
StatusCode updateObject (IRegistry *pDirectory) override
 Update object identified by its directory entry. More...
 
StatusCode updateObject (DataObject *toUpdate) override
 Update object. More...
 
StatusCode initialize () override
 Service initialization. More...
 
StatusCode reinitialize () override
 Service initialization. More...
 
StatusCode finalize () override
 Service initialization. More...
 
 DataSvc (const DataSvc &)=delete
 copy constructor disabled More...
 
DataSvcoperator= (const DataSvc &)=delete
 Fake assignment operator (never implemented). More...
 
virtual StatusCode registerAddress (std::string_view fullPath, IOpaqueAddress *pAddress)=0
 Register object address with the data store. More...
 
StatusCode registerAddress (DataObject *parentObj, std::string_view objectPath, IOpaqueAddress *pAddress)
 Register object address with the data store. More...
 
virtual StatusCode registerAddress (IRegistry *parentObj, std::string_view objectPath, IOpaqueAddress *pAddress)=0
 Register object address with the data store. More...
 
virtual StatusCode unregisterAddress (std::string_view fullPath)=0
 Unregister object address from the data store. More...
 
StatusCode unregisterAddress (DataObject *pParent, std::string_view objPath)
 Unregister object address from the data store. More...
 
virtual StatusCode unregisterAddress (IRegistry *pParent, std::string_view objPath)=0
 Unregister object address from the data store. More...
 
StatusCode registerObject (std::string_view fullPath, DataObject *pObject)
 Register object with the data store. More...
 
virtual StatusCode registerObject (std::string_view parentPath, std::string_view objectPath, DataObject *pObject)=0
 Register object with the data store. More...
 
StatusCode registerObject (std::string_view parentPath, int item, DataObject *pObject)
 Register object with the data store. More...
 
virtual StatusCode registerObject (DataObject *parentObj, std::string_view objectPath, DataObject *pObject)=0
 Register object with the data store. More...
 
StatusCode registerObject (DataObject *parentObj, int item, DataObject *pObject)
 Register object with the data store. More...
 
virtual StatusCode retrieveObject (IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
 Retrieve object identified by its directory entry. More...
 
StatusCode retrieveObject (std::string_view fullPath, DataObject *&pObject)
 Retrieve object identified by its full path from the data store. More...
 
StatusCode retrieveObject (std::string_view parentPath, std::string_view objectPath, DataObject *&pObject)
 Retrieve object from data store. More...
 
StatusCode retrieveObject (std::string_view parentPath, int item, DataObject *&pObject)
 Retrieve object from data store. More...
 
StatusCode retrieveObject (DataObject *parentObj, std::string_view objectPath, DataObject *&pObject)
 Retrieve object from data store. More...
 
StatusCode retrieveObject (DataObject *parentObj, int item, DataObject *&pObject)
 Retrieve object from data store. More...
 
virtual StatusCode findObject (IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
 Find object identified by its directory entry. More...
 
virtual StatusCode findObject (std::string_view fullPath, DataObject *&pObject)=0
 Find object identified by its full path in the data store. More...
 
StatusCode findObject (std::string_view parentPath, std::string_view objectPath, DataObject *&pObject)
 Find object identified by its parent object and the path to the object relative to the parent. More...
 
StatusCode findObject (std::string_view parentPath, int item, DataObject *&pObject)
 Find object identified by its parent object and an integer identifier in the data store. More...
 
StatusCode findObject (DataObject *parentObj, std::string_view objectPath, DataObject *&pObject)
 Find object identified by its parent object and the path to the object relative to the parent. More...
 
StatusCode findObject (DataObject *parentObj, int item, DataObject *&pObject)
 Find object identified by its parent object and an integer identifier in the data store. More...
 
virtual StatusCode linkObject (IRegistry *from, std::string_view objPath, DataObject *toObj)=0
 Add a link to another object. More...
 
StatusCode linkObject (std::string_view fromPath, std::string_view objPath, DataObject *toObj)
 Add a link to another object. More...
 
StatusCode linkObject (DataObject *fromObj, std::string_view objPath, DataObject *toObj)
 Add a link to another object. More...
 
virtual StatusCode linkObject (std::string_view fullPath, DataObject *toObj)=0
 Add a link to another object. More...
 
virtual StatusCode unlinkObject (IRegistry *from, std::string_view objPath)=0
 Remove a link to another object. More...
 
StatusCode unlinkObject (std::string_view fromPath, std::string_view objPath)
 Remove a link to another object. More...
 
virtual StatusCode unlinkObject (DataObject *fromObj, std::string_view objPath)=0
 Remove a link to another object. More...
 
virtual StatusCode unlinkObject (std::string_view fullPath)=0
 Remove a link to another object. More...
 
- Public Member Functions inherited from extends< Service, IDataProviderSvc, IDataManagerSvc >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from Service
const std::stringname () const override
 Retrieve name of the service
More...
 
StatusCode configure () override
 
StatusCode initialize () override
 
StatusCode start () override
 
StatusCode stop () override
 
StatusCode finalize () override
 
StatusCode terminate () override
 
Gaudi::StateMachine::State FSMState () const override
 
Gaudi::StateMachine::State targetFSMState () const override
 
StatusCode reinitialize () override
 
StatusCode restart () override
 
StatusCode sysInitialize () override
 Initialize Service
More...
 
StatusCode sysStart () override
 Initialize Service
More...
 
StatusCode sysStop () override
 Initialize Service
More...
 
StatusCode sysFinalize () override
 Finalize Service
More...
 
StatusCode sysReinitialize () override
 Re-initialize the Service. More...
 
StatusCode sysRestart () override
 Re-initialize the Service. More...
 
 Service (std::string name, ISvcLocator *svcloc)
 Standard Constructor
More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator
More...
 
template<class T >
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. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<typename IFace = IService>
SmartIF< IFace > service (const std::string &name, bool createIf=true) const
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, bool createIf=true)
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
 Declare used tool. More...
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
 
template<class T >
void addToolsArray (ToolHandleArray< T > &hndlArr)
 
const std::vector< IAlgTool * > & tools () const
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p) override
 set the property from another property with a different name More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property. More...
 
virtual StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p)=0
 Set the property from a property with a different name. More...
 
virtual StatusCode setProperty (const std::string &s)=0
 Set the property by string. More...
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals. More...
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string. More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode setPropertyRepr (const std::string &n, const std::string &r) override
 set the property from name and value string representation More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (std::string_view name) const override
 get the property by name More...
 
StatusCode getProperty (std::string_view n, std::string &v) const override
 convert the property to the string More...
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties More...
 
bool hasProperty (std::string_view name) const override
 Return true if we have a property with the given name. More...
 
Gaudi::Details::PropertyBaseproperty (std::string_view name) const
 \fixme property and bindPropertiesTo should be protected More...
 
void bindPropertiesTo (Gaudi::Interfaces::IOptionsSvc &optsSvc)
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 

Protected Member Functions

StatusCode connect (const std::string &ident, std::string &logname) override
 Add file to list I/O list. More...
 
virtual StatusCode createService (const std::string &nam, const std::string &typ, const std::vector< Prop > &props, IConversionSvc *&pSvc)
 Create conversion service. More...
 
- Protected Member Functions inherited from NTupleSvc
StatusCode createService (const std::string &nam, const std::string &typ, const std::vector< Prop > &props, IConversionSvc *&pSvc)
 Create conversion service. More...
 
void releaseConnection (Connection &c)
 Finalize single service. More...
 
StatusCode attachTuple (const std::string &filename, const std::string &logname, const char typ, const long t)
 Attach output/input file. More...
 
StatusCode updateDirectories ()
 Update directory data. More...
 
- Protected Member Functions inherited from DataSvc
bool checkRoot ()
 Check if root path is valid. More...
 
virtual DataObjectcreateDefaultObject () const
 Create default objects in case forced creation of leaves is requested. More...
 
virtual StatusCode loadObject (IRegistry *pNode)
 Invoke Persistency service to create transient object from its persistent representation. More...
 
virtual StatusCode loadObject (IConversionSvc *pLoader, IRegistry *pNode)
 Invoke Persistency service to create transient object from its persistent representation. More...
 
StatusCode retrieveEntry (DataSvcHelpers::RegistryEntry *pNode, std::string_view path, DataSvcHelpers::RegistryEntry *&pEntry)
 Retrieve registry entry from store. More...
 
DataObjecthandleDataFault (IRegistry *pReg, std::string_view path="")
 Invoke data fault handling if enabled. More...
 
- Protected Member Functions inherited from Service
std::vector< IAlgTool * > & tools ()
 
 ~Service () override
 Standard Destructor
More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Additional Inherited Members

- Public Types inherited from extends< DataSvc, INTupleSvc, IDataSourceMgr >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces... >
 Typedef to the base of this class. More...
 
- Public Types inherited from extends< Service, IDataProviderSvc, IDataManagerSvc >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces... >
 Typedef to the base of this class. More...
 
- Public Types inherited from Service
using Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
 
- Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 Typedef used to refer to this class from derived classes, as in. More...
 
- Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using base_class = CommonMessaging
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
 take union of the ext_iids of all Interfaces... More...
 
- Protected Types inherited from NTupleSvc
typedef std::vector< std::stringDBaseEntries
 
typedef std::pair< std::string, std::stringProp
 
- Protected Attributes inherited from NTupleSvc
Gaudi::Property< DBaseEntriesm_input { this, "Input", {}, "input streams" }
 
Gaudi::Property< DBaseEntriesm_output { this, "Output", {}, "output streams" }
 
std::map< std::string, Connectionm_connections
 Container of connection points. More...
 
- Protected Attributes inherited from DataSvc
SmartIF< IIncidentSvcm_incidentSvc = nullptr
 Pointer to incident service. More...
 
Gaudi::Property< CLIDm_rootCLID { this, "RootCLID", 110 , "CLID of root entry" }
 
Gaudi::Property< std::stringm_rootName { this, "RootName", "/Event", "name of root entry" }
 
std::unique_ptr< DataSvcHelpers::RegistryEntrym_root
 Pointer to root entry. More...
 
- Protected Attributes inherited from Service
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE
 Service state
More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE
 Service state
More...
 
Gaudi::Property< int > m_outputLevel { this, "OutputLevel", MSG::NIL, "output level" }
 flag indicating whether ToolHandle tools have been added to m_tools More...
 
Gaudi::Property< bool > m_auditInit { this, "AuditServices", false, "[[deprecated]] unused" }
 
Gaudi::Property< bool > m_auditorInitialize { this, "AuditInitialize", false, "trigger auditor on initialize()" }
 
Gaudi::Property< bool > m_auditorStart { this, "AuditStart", false, "trigger auditor on start()" }
 
Gaudi::Property< bool > m_auditorStop { this, "AuditStop", false, "trigger auditor on stop()" }
 
Gaudi::Property< bool > m_auditorFinalize { this, "AuditFinalize", false, "trigger auditor on finalize()" }
 
Gaudi::Property< bool > m_auditorReinitialize { this, "AuditReinitialize", false, "trigger auditor on reinitialize()" }
 
Gaudi::Property< bool > m_auditorRestart { this, "AuditRestart", false, "trigger auditor on restart()" }
 
Gaudi::Property< bool > m_autoRetrieveTools
 
Gaudi::Property< bool > m_checkToolDeps
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service
More...
 

Detailed Description

Gaudi tag collection service definition.

Description: See the base class definition files for more detailed documentation of the implementing class. The basic functionality of the implementation is enhanced to allow for more general N-tuples, which can be used also as event tag collections.

@Author M.Frank @Version 1.0

Definition at line 36 of file TagCollectionSvc.h.

Constructor & Destructor Documentation

◆ TagCollectionSvc()

TagCollectionSvc::TagCollectionSvc ( const std::string name,
ISvcLocator svc 
)

Standard Constructor.

Definition at line 56 of file TagCollectionSvc.cpp.

56 : NTupleSvc( name, svc ) {}

Member Function Documentation

◆ connect() [1/3]

StatusCode NTupleSvc::connect
override

unhides some NTupleSvc methods

Definition at line 102 of file NTupleSvc.cpp.

187  {
188  std::string logName;
189  return connect( ident, logName );
190 }

◆ connect() [2/3]

StatusCode NTupleSvc::connect
override

unhides some NTupleSvc methods

Definition at line 104 of file NTupleSvc.cpp.

192  {
193  DataObject* pO = nullptr;
194  StatusCode status = findObject( m_rootName.value(), pO );
195  if ( status.isSuccess() ) {
196  char typ = 0;
198  long loc = ident.find( " " );
199  std::string filename, auth, svc = "", db_typ = "";
200  logname = ident.substr( 0, loc );
201  using Parser = Gaudi::Utils::AttribStringParser;
202  // we assume that there is always a " "
203  // (but if it is not there, we probably will not match the pattern)
204  for ( auto attrib : Parser( ident.substr( loc + 1 ) ) ) {
205  switch ( ::toupper( attrib.tag[0] ) ) {
206  case 'A':
207  break;
208  case 'F': // FILE='<file name>'
209  case 'D': // DATAFILE='<file name>'
210  filename = std::move( attrib.value );
211  break;
212  case 'O': // OPT='<NEW<CREATE,WRITE>, UPDATE, READ>'
213  switch ( ::toupper( attrib.value[0] ) ) {
214  case 'C':
215  case 'N':
216  case 'W':
217  typ = 'N';
218  break;
219  case 'U':
220  typ = 'U';
221  break;
222  case 'O':
223  case 'R':
224  typ = 'O';
225  break;
226  default:
227  typ = 0;
228  break;
229  }
230  break;
231  case 'T': // TYP='<HBOOK,ROOT,OBJY,...>'
232  db_typ = std::move( attrib.value );
233  break;
234  default:
235  props.emplace_back( attrib.tag, attrib.value );
236  break;
237  }
238  }
239  if ( 0 != typ ) {
240  IConversionSvc* pSvc = nullptr;
241  status = createService( name() + '.' + logname, db_typ, props, pSvc );
242  if ( status.isSuccess() ) {
243  status = attachTuple( filename, logname, typ, pSvc->repSvcType() );
244  if ( status.isSuccess() ) {
245  m_connections.insert( { m_rootName + '/' + logname, Connection( pSvc ) } );
246  return StatusCode::SUCCESS;
247  }
248  }
249  }
250  }
251  error() << "Cannot add " << ident << " invalid filename!" << endmsg;
252  return StatusCode::FAILURE;
253 }

◆ connect() [3/3]

StatusCode TagCollectionSvc::connect ( const std::string ident,
std::string logname 
)
overrideprotected

Add file to list I/O list.

Definition at line 59 of file TagCollectionSvc.cpp.

59  {
60  DataObject* pO = nullptr;
61  StatusCode status = findObject( m_rootName.value(), pO );
62  if ( status.isSuccess() ) {
63  status = Status::INVALID_ROOT;
64  if ( pO->registry() ) {
65  char typ = 0;
67  long loc = ident.find( " " );
68  std::string filename, svc = "DbCnvSvc";
69  logname = ident.substr( 0, loc );
70  using Parser = Gaudi::Utils::AttribStringParser;
71  // we assume that there is always a " "
72  // (but if it is not there, we probably will not match the pattern)
73  for ( auto attrib : Parser( ident.substr( loc + 1 ) ) ) {
74  switch ( ::toupper( attrib.tag[0] ) ) {
75  case 'A':
76  props.emplace_back( "Server", attrib.value );
77  break;
78  case 'F': /* FILE='<file name>' */
79  case 'D': /* DATAFILE='<file name>' */
80  filename = std::move( attrib.value );
81  break;
82  case 'O': /* OPT='<NEW<CREATE,WRITE>, UPDATE, READ>' */
83  switch ( ::toupper( attrib.value[0] ) ) {
84  case 'C':
85  case 'N':
86  case 'W':
87  typ = 'N';
88  break;
89  case 'U':
90  typ = 'U';
91  break;
92  case 'O':
93  case 'R':
94  switch ( ::toupper( attrib.value[2] ) ) {
95  case 'C': /* RECREATE */
96  typ = 'R';
97  break;
98  case 'A': /* READ */
99  default:
100  typ = 'O';
101  break;
102  }
103  break;
104  default:
105  typ = 0;
106  break;
107  }
108  break;
109  case 'S': // SVC='<service type>'
110  switch ( ::toupper( attrib.tag[1] ) ) {
111  case 'V':
112  svc = std::move( attrib.value );
113  break;
114  case 'H':
115  switch ( ::toupper( attrib.value[0] ) ) {
116  case 'Y':
117  props.emplace_back( "ShareFiles", attrib.value );
118  break;
119  }
120  break;
121  }
122  break;
123  case 'T': // TYP='<HBOOK,ROOT,OBJY,...>'
124  switch ( ::toupper( attrib.value[0] ) ) {
125  case 'H':
126  svc = "HbookCnv::ConvSvc";
127  break;
128  case 'P':
129  props.emplace_back( "DbType", attrib.value );
130  svc = "PoolDbCnvSvc";
131  break;
132  default:
133  props.emplace_back( "DbType", attrib.value );
134  svc = "DbCnvSvc";
135  break;
136  }
137  break;
138  default:
139  props.emplace_back( attrib.tag, attrib.value );
140  break;
141  }
142  }
143  if ( 0 != typ ) {
144  IConversionSvc* pSvc = nullptr;
145  status = createService( name() + '.' + logname, svc, props, pSvc );
146  if ( status.isSuccess() ) {
147  status = attachTuple( filename, logname, typ, pSvc->repSvcType() );
148  if ( status.isSuccess() ) {
149  m_connections.emplace( m_rootName + '/' + logname, Connection( pSvc ) );
150  return StatusCode::SUCCESS;
151  }
152  }
153  }
154  }
155  }
156  error() << "Cannot add " << ident << " invalid filename!" << endmsg;
157  return StatusCode::FAILURE;
158 }

◆ createService()

StatusCode TagCollectionSvc::createService ( const std::string nam,
const std::string typ,
const std::vector< Prop > &  props,
IConversionSvc *&  pSvc 
)
protectedvirtual

Create conversion service.

Parameters
namName of the service to be created
svcService type if sepecified in the options
props

Definition at line 161 of file TagCollectionSvc.cpp.

162  {
163  pSvc = nullptr;
165  auto mgr = serviceLocator()->as<ISvcManager>();
166 
167  // TagCollectionSvc has to directly create a ConversionSvc to manage it directly.
169  if ( mgr ) {
170  SmartIF<IService> isvc = mgr->createService( TypeNameString( nam, typ ) );
171  if ( isvc ) {
172  auto icsvc = isvc.as<IConversionSvc>();
173  if ( icsvc ) {
174  auto iprop = isvc.as<IProperty>();
175  if ( iprop ) {
176  for ( const auto& p : props ) { iprop->setProperty( p.first, p.second ).ignore(); }
177  // NTupleSvc has to directly create a ConversionSvc to manage it directly.
178  status = isvc->sysInitialize();
179  if ( status.isSuccess() ) {
180  status = icsvc->setDataProvider( this );
181  if ( status.isSuccess() ) {
182  pSvc = icsvc.get();
183  pSvc->addRef();
184  }
185  }
186  }
187  }
188  }
189  }
190  return status;
191 }

The documentation for this class was generated from the following files:
NTupleSvc::m_connections
std::map< std::string, Connection > m_connections
Container of connection points.
Definition: NTupleSvc.h:128
toupper
void toupper(std::string &s)
Definition: ExceptionSvc.cpp:36
NTupleSvc::attachTuple
StatusCode attachTuple(const std::string &filename, const std::string &logname, const char typ, const long t)
Attach output/input file.
Definition: NTupleSvc.cpp:433
std::string
STL class.
std::move
T move(T... args)
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
std::vector
STL class.
std::string::find
T find(T... args)
IInterface::Status::NO_INTERFACE
@ NO_INTERFACE
Requested interface is not available.
DataSvc::findObject
StatusCode findObject(std::string_view fullPath, DataObject *&pObject) override
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:649
ISvcManager
Definition: ISvcManager.h:38
graphanalysis.filename
string filename
Definition: graphanalysis.py:131
IProperty
Definition: IProperty.h:33
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:20
Service::name
const std::string & name() const override
Retrieve name of the service
Definition: Service.cpp:332
StatusCode
Definition: StatusCode.h:65
DataSvc::m_rootName
Gaudi::Property< std::string > m_rootName
Definition: DataSvc.h:62
Gaudi::Property::value
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:240
TagCollectionSvc::connect
StatusCode connect(const std::string &ident, std::string &logname) override
Add file to list I/O list.
Definition: TagCollectionSvc.cpp:59
SmartIF< IService >
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
IConverter::repSvcType
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.
StatusCode::ignore
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition: StatusCode.h:139
SmartIF::as
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition: SmartIF.h:117
std::string::substr
T substr(T... args)
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
TagCollectionSvc::createService
virtual StatusCode createService(const std::string &nam, const std::string &typ, const std::vector< Prop > &props, IConversionSvc *&pSvc)
Create conversion service.
Definition: TagCollectionSvc.cpp:161
ProduceConsume.props
props
Definition: ProduceConsume.py:84
DataObject
Definition: DataObject.h:40
NTupleSvc::NTupleSvc
NTupleSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: NTupleSvc.cpp:61
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:40
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:82
IInterface::addRef
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator
Definition: Service.cpp:335
IProperty::setProperty
StatusCode setProperty(const Gaudi::Details::PropertyBase &p)
Set the property from a property.
Definition: IProperty.h:39
IConversionSvc
Definition: IConversionSvc.h:47