The Gaudi Framework  v33r2 (a6f0ec87)
TagCollectionSvc Class Reference

Gaudi tag collection service definition. More...

#include <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...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. 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 >
StatusCode declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
 Declare used tool. More...
 
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 Gaudi::Details::PropertyBase &p) override
 set the property form another property More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 set the property from name and the value More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (const std::string &name) const override
 get the property by name More...
 
StatusCode getProperty (const std::string &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 (const std::string &name) const override
 Return true if we have a property with the given name. More...
 
 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...
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
const SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) 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
 ~Service () override
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBaseproperty (const std::string &name) const
 
- 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"}
 
Gaudi::Property< bool > m_auditInit {this, "AuditServices", false, " 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()"}
 
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 ) {}
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:284
NTupleSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: NTupleSvc.cpp:61

Member Function Documentation

◆ connect() [1/3]

StatusCode NTupleSvc::connect
override

unhides some NTupleSvc methods

Definition at line 190 of file NTupleSvc.cpp.

190  {
191  std::string logName;
192  return connect( ident, logName );
193 }
STL class.
StatusCode connect(const std::string &ident, std::string &logname) override
Add file to list I/O list.

◆ connect() [2/3]

StatusCode NTupleSvc::connect
override

unhides some NTupleSvc methods

Definition at line 195 of file NTupleSvc.cpp.

195  {
196  DataObject* pO = nullptr;
197  StatusCode status = findObject( m_rootName.value(), pO );
198  if ( status.isSuccess() ) {
199  char typ = 0;
200  std::vector<Prop> props;
201  long loc = ident.find( " " );
202  std::string filename, auth, svc = "", db_typ = "";
203  logname = ident.substr( 0, loc );
204  using Parser = Gaudi::Utils::AttribStringParser;
205  // we assume that there is always a " "
206  // (but if it is not there, we probably will not match the pattern)
207  for ( auto attrib : Parser( ident.substr( loc + 1 ) ) ) {
208  switch ( ::toupper( attrib.tag[0] ) ) {
209  case 'A':
210  break;
211  case 'F': // FILE='<file name>'
212  case 'D': // DATAFILE='<file name>'
213  filename = std::move( attrib.value );
214  break;
215  case 'O': // OPT='<NEW<CREATE,WRITE>, UPDATE, READ>'
216  switch ( ::toupper( attrib.value[0] ) ) {
217  case 'C':
218  case 'N':
219  case 'W':
220  typ = 'N';
221  break;
222  case 'U':
223  typ = 'U';
224  break;
225  case 'O':
226  case 'R':
227  typ = 'O';
228  break;
229  default:
230  typ = 0;
231  break;
232  }
233  break;
234  case 'T': // TYP='<HBOOK,ROOT,OBJY,...>'
235  db_typ = std::move( attrib.value );
236  break;
237  default:
238  props.emplace_back( attrib.tag, attrib.value );
239  break;
240  }
241  }
242  if ( 0 != typ ) {
243  IConversionSvc* pSvc = nullptr;
244  status = createService( name() + '.' + logname, db_typ, props, pSvc );
245  if ( status.isSuccess() ) {
246  status = attachTuple( filename, logname, typ, pSvc->repSvcType() );
247  if ( status.isSuccess() ) {
248  m_connections.insert( {m_rootName + '/' + logname, Connection( pSvc )} );
249  return StatusCode::SUCCESS;
250  }
251  }
252  }
253  }
254  error() << "Cannot add " << ident << " invalid filename!" << endmsg;
255  return StatusCode::FAILURE;
256 }
Parse attribute strings allowing iteration over the various attributes.
Gaudi::Property< std::string > m_rootName
Definition: DataSvc.h:62
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
std::map< std::string, Connection > m_connections
Container of connection points.
Definition: NTupleSvc.h:128
STL class.
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:284
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
bool isSuccess() const
Definition: StatusCode.h:366
T move(T... args)
STL class.
constexpr static const auto FAILURE
Definition: StatusCode.h:101
StatusCode findObject(std::string_view fullPath, DataObject *&pObject) override
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:649
StatusCode attachTuple(const std::string &filename, const std::string &logname, const char typ, const long t)
Attach output/input file.
Definition: NTupleSvc.cpp:436
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:40
void toupper(std::string &s)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
virtual StatusCode createService(const std::string &nam, const std::string &typ, const std::vector< Prop > &props, IConversionSvc *&pSvc)
Create conversion service.
T emplace_back(T... args)

◆ 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;
66  std::vector<Prop> props;
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 }
Parse attribute strings allowing iteration over the various attributes.
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:82
Gaudi::Property< std::string > m_rootName
Definition: DataSvc.h:62
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
std::map< std::string, Connection > m_connections
Container of connection points.
Definition: NTupleSvc.h:128
STL class.
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:284
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
bool isSuccess() const
Definition: StatusCode.h:366
T move(T... args)
T find(T... args)
STL class.
constexpr static const auto FAILURE
Definition: StatusCode.h:101
T substr(T... args)
StatusCode findObject(std::string_view fullPath, DataObject *&pObject) override
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:649
StatusCode attachTuple(const std::string &filename, const std::string &logname, const char typ, const long t)
Attach output/input file.
Definition: NTupleSvc.cpp:436
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:40
void toupper(std::string &s)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
virtual StatusCode createService(const std::string &nam, const std::string &typ, const std::vector< Prop > &props, IConversionSvc *&pSvc)
Create conversion service.
T emplace_back(T... args)

◆ 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 }
Requested interface is not available.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:287
The ISvcManager is the interface implemented by the Service Factory in the Application Manager to sup...
Definition: ISvcManager.h:38
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition: SmartIF.h:117
SmartIF< IFace > as()
Definition: ISvcLocator.h:113
virtual StatusCode sysInitialize()=0
Initialize Service.
virtual StatusCode setProperty(const Gaudi::Details::PropertyBase &p)=0
Set the property by property.
Helper class to parse a string of format "type/name".
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:168
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
The IProperty is the basic interface for all components which have properties that can be set or get.
Definition: IProperty.h:30

The documentation for this class was generated from the following files: