| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
MultiStoreSvc Class Reference

Data service base class. More...

Inheritance diagram for MultiStoreSvc:
[legend]
Collaboration diagram for MultiStoreSvc:
[legend]

## Classes
struct | tagROOT
| Root type (address or object) More...

## Public Member Functions
CLID | rootCLID () const override
| IDataManagerSvc: Accessor for root event CLID. More...
const std::string & | rootName () const override
| Name for root Event. More...
STATUS | registerAddress (boost::string_ref path, ADDRESS *pAddr) override
| IDataManagerSvc: Register object address with the data store. More...
STATUS | registerAddress (OBJECT *parent, boost::string_ref path, ADDRESS *pAddr) override
| IDataManagerSvc: Register object address with the data store. More...
STATUS | registerAddress (IRegistry *parent, boost::string_ref path, ADDRESS *pAddr) override
| IDataManagerSvc: Register object address with the data store. More...
STATUS | unregisterAddress (boost::string_ref path) override
| IDataManagerSvc: Unregister object address from the data store. More...
STATUS | unregisterAddress (OBJECT *pParent, boost::string_ref path) override
| IDataManagerSvc: Unregister object address from the data store. More...
STATUS | unregisterAddress (IRegistry *pParent, boost::string_ref path) override
| IDataManagerSvc: Unregister object address from the data store. More...
STATUS | objectLeaves (const OBJECT *pObject, std::vector< IRegistry * > &leaves) override
| Explore the object store: retrieve all leaves attached to the object. More...
STATUS | objectLeaves (const IRegistry *pObject, std::vector< IRegistry * > &leaves) override
| Explore the object store: retrieve all leaves attached to the object. More...
STATUS | objectParent (const OBJECT *pObject, IRegistry *&refpParent) override
| IDataManagerSvc: Explore the object store: retrieve the object's parent. More...
STATUS | objectParent (const IRegistry *pObject, IRegistry *&refpParent) override
| IDataManagerSvc: Explore the object store: retrieve the object's parent. More...
STATUS | clearSubTree (boost::string_ref path) override
| Remove all data objects below the sub tree identified. More...
STATUS | clearSubTree (OBJECT *pObject) override
| Remove all data objects below the sub tree identified. More...
STATUS | clearStore () override
| IDataManagerSvc: Remove all data objects in the data store. More...
STATUS | traverseSubTree (boost::string_ref path, AGENT *pAgent) override
| Analyze by traversing all data objects below the sub tree. More...
STATUS | traverseSubTree (OBJECT *pObject, AGENT *pAgent) override
| IDataManagerSvc: Analyze by traversing all data objects below the sub tree. More...
STATUS | traverseTree (AGENT *pAgent) override
| IDataManagerSvc: Analyze by traversing all data objects in the data store. More...
STATUS | setRoot (std::string path, OBJECT *pObj) override
| Initialize data store for new event by giving new event path and root object. More...
STATUS | setRoot (std::string path, ADDRESS *pAddr) override
| Initialize data store for new event by giving new event path and address of root object. More...
STATUS | setDataLoader (IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc=nullptr) override
| IDataManagerSvc: Pass a default data loader to the service. More...
STATUS | addPreLoadItem (const DataStoreItem &item) override
| Add an item to the preload list. More...
STATUS | addPreLoadItem (std::string item) override
| Add an item to the preload list. More...
STATUS | removePreLoadItem (const DataStoreItem &item) override
| Remove an item from the preload list. More...
STATUS | removePreLoadItem (std::string item) override
| Add an item to the preload list. More...
STATUS | resetPreLoad () override
| Clear the preload list. More...
STATUS | preLoad () override
| load all preload items of the list More...
STATUS | registerObject (boost::string_ref path, OBJECT *pObj) override
| Register object with the data store. More...
STATUS | registerObject (boost::string_ref parent, boost::string_ref obj, OBJECT *pObj) override
| Register object with the data store. More...
STATUS | registerObject (boost::string_ref parent, int item, OBJECT *pObj) override
| Register object with the data store. More...
STATUS | registerObject (OBJECT *parent, boost::string_ref obj, OBJECT *pObj) override
| Register object with the data store. More...
STATUS | registerObject (OBJECT *parent, int obj, OBJECT *pObj) override
| Register object with the data store. More...
STATUS | unregisterObject (boost::string_ref path) override
| Unregister object from the data store. More...
STATUS | unregisterObject (boost::string_ref parent, boost::string_ref obj) override
| Unregister object from the data store. More...
STATUS | unregisterObject (boost::string_ref parent, int obj) override
| Unregister object from the data store. More...
STATUS | unregisterObject (OBJECT *pObj) override
| Unregister object from the data store. More...
STATUS | unregisterObject (OBJECT *pObj, boost::string_ref path) override
| Unregister object from the data store. More...
STATUS | unregisterObject (OBJECT *pObj, int item) override
| Unregister object from the data store. More...
STATUS | retrieveObject (IRegistry *parent, boost::string_ref path, OBJECT *&pObj) override
| Retrieve object from data store. More...
STATUS | retrieveObject (boost::string_ref path, OBJECT *&pObj) override
| Retrieve object identified by its full path from the data store. More...
STATUS | retrieveObject (boost::string_ref parent, boost::string_ref path, OBJECT *&pObj) override
| Retrieve object from data store. More...
STATUS | retrieveObject (boost::string_ref parent, int item, OBJECT *&pObj) override
| Retrieve object from data store. More...
STATUS | retrieveObject (OBJECT *parent, boost::string_ref path, OBJECT *&pObj) override
| Retrieve object from data store. More...
STATUS | retrieveObject (OBJECT *parent, int item, OBJECT *&pObj) override
| Retrieve object from data store. More...
STATUS | findObject (boost::string_ref path, OBJECT *&pObj) override
| Find object identified by its full path in the data store. More...
STATUS | findObject (IRegistry *parent, boost::string_ref path, OBJECT *&pObj) override
| Find object identified by its full path in the data store. More...
STATUS | findObject (boost::string_ref parent, boost::string_ref path, OBJECT *&pObj) override
| Find object in the data store. More...
STATUS | findObject (boost::string_ref parent, int item, OBJECT *&pObject) override
| Find object in the data store. More...
STATUS | findObject (OBJECT *parent, boost::string_ref path, OBJECT *&pObject) override
| Find object in the data store. More...
STATUS | findObject (OBJECT *parent, int item, OBJECT *&pObject) override
| Find object in the data store. More...
STATUS | linkObject (IRegistry *from, boost::string_ref objPath, OBJECT *to) override
| Add a link to another object. More...
STATUS | linkObject (boost::string_ref from, boost::string_ref objPath, OBJECT *to) override
| Add a link to another object. More...
STATUS | linkObject (OBJECT *from, boost::string_ref objPath, OBJECT *to) override
| Add a link to another object. More...
STATUS | linkObject (boost::string_ref fullPath, OBJECT *to) override
| Add a link to another object. More...
STATUS | unlinkObject (IRegistry *from, boost::string_ref objPath) override
| Remove a link to another object. More...
STATUS | unlinkObject (boost::string_ref from, boost::string_ref objPath) override
| Remove a link to another object. More...
STATUS | unlinkObject (OBJECT *from, boost::string_ref objPath) override
| Remove a link to another object. More...
STATUS | unlinkObject (boost::string_ref path) override
| Remove a link to another object. More...
STATUS | updateObject (IRegistry *pDirectory) override
| Update object identified by its directory entry. More...
STATUS | updateObject (boost::string_ref path) override
| Update object. More...
STATUS | updateObject (OBJECT *pObj) override
| Update object. More...
STATUS | updateObject (boost::string_ref parent, boost::string_ref updatePath) override
| Update object. More...
STATUS | updateObject (OBJECT *parent, boost::string_ref updatePath) override
| Update object. More...
STATUS | create (CSTR &nam, CSTR &typ) override
| Create a partition object. The name identifies the partition uniquely. More...
STATUS | create (CSTR &nam, CSTR &typ, IInterface *&pPartition) override
| Create a partition object. The name identifies the partition uniquely. More...
STATUS | drop (CSTR &nam) override
| Drop a partition object. The name identifies the partition uniquely. More...
STATUS | drop (IInterface *pPartition) override
| Drop a partition object. The name identifies the partition uniquely. More...
STATUS | activate (CSTR &nam) override
| Activate a partition object. The name identifies the partition uniquely. More...
STATUS | activate (IInterface *pPartition) override
| Activate a partition object. More...
STATUS | get (CSTR &nam, IInterface *&pPartition) const override
| Access a partition object. The name identifies the partition uniquely. More...
StatusCode | activePartition (std::string &nam, IInterface *&pPartition) const override
| Access the active partition object. More...
STATUS | attachServices ()
STATUS | detachServices ()
STATUS | initialize () override
| Service initialisation. More...
STATUS | reinitialize () override
| Service initialisation. More...
STATUS | finalize () override
| Service initialisation. More...
| ~MultiStoreSvc () override
| Standard Destructor. More...
STATUS | preparePartitions ()
| Prepare partition for usage. More...
STATUS | clearPartitions ()
| Clear all partitions. More...
STATUS | makePartitions ()
| Create all partitions according to job options. More...
Public Member Functions inherited from extends< Service, IDataProviderSvc, IDataManagerSvc, IPartitionControl >
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::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from Service
const std::string & | name () 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
| ~PropertyHolder () override=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (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::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none") const
Gaudi::Details::PropertyBase * | declareProperty (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::PropertyBase * | declareRemoteProperty (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::PropertyBase & | getProperty (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
PropertyHolder & | operator= (const PropertyHolder &)=delete
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none")
| Specializations for various GaudiHandles. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none")
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, DataObjectHandleBase &ref, const std::string &doc="none")
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...
MSG::Level | msgLevel () const
| get the cached level (originally extracted from the embedded MsgStream) More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Protected Types
typedef std::vector< std::string > | PartitionDefs
typedef std::map< std::string, Partition > | Partitions

## Protected Member Functions
template<typename Fun >
STATUS | fwd (Fun f)
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::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | setUpMessaging ()
| 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...

## Protected Attributes
Gaudi::Property< CLID > | m_rootCLID {this, "RootCLID", 110, "CLID of root entry"}
Gaudi::Property< std::string > | m_rootName {this, "RootName", "/Event", "name of root entry"}
Gaudi::Property< PartitionDefs > | m_partitionDefs {this, "Partitions", {}, "datastore partition definitions"}
Gaudi::Property< std::string > | m_loader {this, "DataLoader", "EventPersistencySvc", "data loader name"}
Gaudi::Property< std::string > | m_defaultPartition {this, "DefaultPartition", "Default", "default partition name"}
SmartIF< IConversionSvc > | m_dataLoader
| Pointer to data loader service. More...
SmartIF< IAddressCreator > | m_addrCreator
| Reference to address creator. More...
struct MultiStoreSvc::tagROOT | m_root
Partition | m_current
| Current partition. More...
Partitions | m_partitions
| Datastore partitions. 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, "[[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()"}
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...

## Additional Inherited Members
Public Types inherited from extends< Service, IDataProviderSvc, IDataManagerSvc, IPartitionControl >
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
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > | Factory
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...

## Detailed Description

Data service base class.

A data service manages the transient data stores and implements the IDataProviderSvc, the IDataManagerSvc and the IPartitionControl interfaces.

Author
  Markus Frank
  Sebastien Ponce

Version
  1.0

Definition at line 102 of file MultiStoreSvc.cpp.

## Member Typedef Documentation

typedef std::vector<std::string> MultiStoreSvc::PartitionDefs
| protected

Definition at line 105 of file MultiStoreSvc.cpp.

typedef std::map<std::string, Partition> MultiStoreSvc::Partitions
| protected

Definition at line 106 of file MultiStoreSvc.cpp.

## Constructor & Destructor Documentation

MultiStoreSvc::~MultiStoreSvc | ( |  | ) |
| inline override

Standard Destructor.

Definition at line 665 of file MultiStoreSvc.cpp.

666 {
667 setDataLoader( nullptr ).ignore();
668 resetPreLoad().ignore();
669 clearStore().ignore();
670 clearPartitions().ignore();
671 }
MultiStoreSvc::setDataLoader
STATUS setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
Definition: MultiStoreSvc.cpp:264
MultiStoreSvc::clearPartitions
STATUS clearPartitions()
Clear all partitions.
Definition: MultiStoreSvc.cpp:700
MultiStoreSvc::resetPreLoad
STATUS resetPreLoad() override
Clear the preload list.
Definition: MultiStoreSvc.cpp:294
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:84
MultiStoreSvc::clearStore
STATUS clearStore() override
IDataManagerSvc: Remove all data objects in the data store.
Definition: MultiStoreSvc.cpp:203

## Member Function Documentation

STATUS MultiStoreSvc::activate | ( | CSTR & | nam | ) |
| inline override

Activate a partition object. The name identifies the partition uniquely.

Definition at line 531 of file MultiStoreSvc.cpp.

532 {
533 auto i = m_partitions.find( nam );
534 if ( i != m_partitions.end() ) {
535 m_current = i->second;
536 return STATUS::SUCCESS;
537 }
538 m_current = {};
539 return PARTITION_NOT_PRESENT;
540 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:126
std::map::end
T end(T...args)
MultiStoreSvc::m_current
Partition m_current
Current partition.
Definition: MultiStoreSvc.cpp:124
std::map::find
T find(T...args)

STATUS MultiStoreSvc::activate | ( | IInterface * | pPartition | ) |
| inline override

Activate a partition object.

Definition at line 543 of file MultiStoreSvc.cpp.

544 {
545 auto provider = SmartIF<IDataProviderSvc>( pPartition );
546 m_current = Partition();
547 if ( !provider ) return NO_INTERFACE;
548 auto i = std::find_if( std::begin( m_partitions ), std::end( m_partitions ),
549 [&]( Partitions::const_reference p ) { return p.second.dataProvider == provider; } );
550 if ( i == std::end( m_partitions ) ) return PARTITION_NOT_PRESENT;
551 m_current = i->second;
552 return STATUS::SUCCESS;
553 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
SmartIF< IDataProviderSvc >
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:126
std::end
T end(T...args)
MultiStoreSvc::m_current
Partition m_current
Current partition.
Definition: MultiStoreSvc.cpp:124
std::find_if
T find_if(T...args)
std::begin
T begin(T...args)

StatusCode MultiStoreSvc::activePartition | ( | std::string & | nam,
|  | IInterface *& | pPartition
| ) |  | const
| inline override

Access the active partition object.

Definition at line 568 of file MultiStoreSvc.cpp.

569 {
570 if ( m_current.dataProvider ) {
571 nam = m_current.name;
572 pPartition = m_current.dataProvider;
573 return STATUS::SUCCESS;
574 }
575 nam.clear();
576 pPartition = nullptr;
577 return NO_ACTIVE_PARTITION;
578 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
std::string::clear
T clear(T...args)
MultiStoreSvc::m_current
Partition m_current
Current partition.
Definition: MultiStoreSvc.cpp:124

STATUS MultiStoreSvc::addPreLoadItem | ( | const DataStoreItem & | item | ) |
| inline override

Add an item to the preload list.

Definition at line 274 of file MultiStoreSvc.cpp.

275 {
276 return fwd( [&]( IDataProviderSvc& svc ) { return svc.addPreLoadItem( item ); } );
277 }
IDataProviderSvc::addPreLoadItem
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46

STATUS MultiStoreSvc::addPreLoadItem | ( | std::string | item | ) |
| inline override

Add an item to the preload list.

Definition at line 279 of file MultiStoreSvc.cpp.

280 {
281 return fwd( [&]( IDataProviderSvc& svc ) { return svc.addPreLoadItem( std::move( item ) ); } );
282 }
IDataProviderSvc::addPreLoadItem
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
std::move
T move(T...args)

STATUS MultiStoreSvc::attachServices | ( |  | ) |
| inline

Definition at line 580 of file MultiStoreSvc.cpp.

581 {
582 // Attach address creator facility
583 m_addrCreator = service( m_loader, true );
584 if ( !m_addrCreator ) {
585 error() << "Failed to retrieve data loader "
586 << "\"" << m_loader << "\"" << endmsg;
587 return StatusCode::FAILURE;
588 }
589 // Attach data loader facility
590 auto dataLoader = service<IConversionSvc>( m_loader, true );
591 if ( !dataLoader ) {
592 error() << "Failed to retrieve data loader "
593 << "\"" << m_loader << "\"" << endmsg;
594 return StatusCode::FAILURE;
595 }
596 auto sc = setDataLoader( dataLoader.get() );
597 if ( !sc.isSuccess() ) {
598 error() << "Failed to set data loader "
599 << "\"" << m_loader << "\"" << endmsg;
600 }
601 return sc;
602 }
MultiStoreSvc::setDataLoader
STATUS setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
Definition: MultiStoreSvc.cpp:264
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
MultiStoreSvc::m_loader
Gaudi::Property< std::string > m_loader
Definition: MultiStoreSvc.cpp:111
MultiStoreSvc::m_addrCreator
SmartIF< IAddressCreator > m_addrCreator
Reference to address creator.
Definition: MultiStoreSvc.cpp:117
Service::service
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn&#39;t already exist.
Definition: Service.h:85
StatusCode::FAILURE
Definition: StatusCode.h:29
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

STATUS MultiStoreSvc::clearPartitions | ( |  | ) |
| inline

Clear all partitions.

Definition at line 700 of file MultiStoreSvc.cpp.

701 {
702 for ( auto& i : m_partitions ) i.second.dataManager->clearStore().ignore();
703 m_partitions.clear();
704 return STATUS::SUCCESS;
705 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:126

STATUS MultiStoreSvc::clearStore | ( |  | ) |
| inline override

IDataManagerSvc: Remove all data objects in the data store.

Definition at line 203 of file MultiStoreSvc.cpp.

204 {
205 for ( auto& i : m_partitions ) {
206 i.second.dataManager->clearStore().ignore();
207 }
208 dispatch_variant( m_root.root,
209 []( auto* p ) {
210 if ( p ) p->release();
211 },
212 []( boost::blank ) {} );
213 m_root.root = {};
214 m_root.path.clear();
215 return STATUS::SUCCESS;
216 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:126
MultiStoreSvc::m_root
struct MultiStoreSvc::tagROOT m_root
detail::dispatch_variant
auto dispatch_variant
Definition: FunAdapters.h:77
MultiStoreSvc::tagROOT::root
boost::variant< boost::blank, ADDRESS *, OBJECT * > root
Definition: MultiStoreSvc.cpp:121
std::string::clear
T clear(T...args)
MultiStoreSvc::tagROOT::path
std::string path
Definition: MultiStoreSvc.cpp:120

STATUS MultiStoreSvc::clearSubTree | ( | boost::string_ref | path | ) |
| inline override

Remove all data objects below the sub tree identified.

Definition at line 193 of file MultiStoreSvc.cpp.

194 {
195 return fwd( [&]( IDataManagerSvc& svc ) { return svc.clearSubTree( path ); } );
196 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::clearSubTree
virtual StatusCode clearSubTree(boost::string_ref sub_path)=0
Remove all data objects below the sub tree identified by its full path name.

STATUS MultiStoreSvc::clearSubTree | ( | OBJECT * | pObject | ) |
| inline override

Remove all data objects below the sub tree identified.

Definition at line 198 of file MultiStoreSvc.cpp.

199 {
200 return fwd( [&]( IDataManagerSvc& svc ) { return svc.clearSubTree( pObject ); } );
201 }
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::clearSubTree
virtual StatusCode clearSubTree(boost::string_ref sub_path)=0
Remove all data objects below the sub tree identified by its full path name.

STATUS MultiStoreSvc::create | ( | CSTR & | nam,
|  | CSTR & | typ
| ) |  |
| inline override

Create a partition object. The name identifies the partition uniquely.

Definition at line 485 of file MultiStoreSvc.cpp.

486 {
487 IInterface* pPartition = nullptr;
488 return create( nam, typ, pPartition );
489 }
MultiStoreSvc::create
STATUS create(CSTR &nam, CSTR &typ) override
Create a partition object. The name identifies the partition uniquely.
Definition: MultiStoreSvc.cpp:485
IInterface
Definition of the basic interface.
Definition: IInterface.h:277

STATUS MultiStoreSvc::create | ( | CSTR & | nam,
|  | CSTR & | typ,
|  | IInterface *& | pPartition
| ) |  |
| inline override

Create a partition object. The name identifies the partition uniquely.

Fix-Me:
  : In the old implementation the services were "unmanaged" (non-active)

Definition at line 491 of file MultiStoreSvc.cpp.

492 {
493 if ( get( nam, pPartition ).isSuccess() ) return PARTITION_EXISTS;
495 auto isvc = serviceLocator()->service<IService>( typ );
496 if ( !isvc ) return NO_INTERFACE;
497 auto dataMgr = isvc.as<IDataManagerSvc>();
498 auto dataProv = isvc.as<IDataProviderSvc>();
499 if ( !dataMgr || !dataProv ) return NO_INTERFACE;
500 m_partitions.emplace( nam, Partition{dataProv, dataMgr, nam} );
501 return STATUS::SUCCESS;
502 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:126
IDataManagerSvc
Definition: IDataManagerSvc.h:46
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:79
IService
General service interface definition.
Definition: IService.h:18
std::map::emplace
T emplace(T...args)
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:292

STATUS MultiStoreSvc::detachServices | ( |  | ) |
| inline

Definition at line 604 of file MultiStoreSvc.cpp.

605 {
606 m_addrCreator.reset();
607 m_dataLoader.reset();
608 return STATUS::SUCCESS;
609 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
MultiStoreSvc::m_dataLoader
SmartIF< IConversionSvc > m_dataLoader
Pointer to data loader service.
Definition: MultiStoreSvc.cpp:115
MultiStoreSvc::m_addrCreator
SmartIF< IAddressCreator > m_addrCreator
Reference to address creator.
Definition: MultiStoreSvc.cpp:117
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:92

STATUS MultiStoreSvc::drop | ( | CSTR & | nam | ) |
| inline override

Drop a partition object. The name identifies the partition uniquely.

Definition at line 505 of file MultiStoreSvc.cpp.

506 {
507 auto i = m_partitions.find( nam );
508 if ( i == m_partitions.end() ) return PARTITION_NOT_PRESENT;
509 if ( i->second.dataManager == m_current.dataManager ) {
510 m_current = Partition();
511 }
512 i->second.dataManager->clearStore().ignore();
513 m_partitions.erase( i );
514 return STATUS::SUCCESS;
515 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:126
std::map::end
T end(T...args)
std::map::erase
T erase(T...args)
MultiStoreSvc::m_current
Partition m_current
Current partition.
Definition: MultiStoreSvc.cpp:124
std::map::find
T find(T...args)

STATUS MultiStoreSvc::drop | ( | IInterface * | pPartition | ) |
| inline override

Drop a partition object. The name identifies the partition uniquely.

Definition at line 518 of file MultiStoreSvc.cpp.

519 {
520 auto provider = SmartIF<IDataProviderSvc>( pPartition );
521 if ( !provider ) return NO_INTERFACE;
522 auto i = std::find_if( std::begin( m_partitions ), std::end( m_partitions ),
523 [&]( Partitions::const_reference p ) { return p.second.dataProvider == provider; } );
524 if ( i == std::end( m_partitions ) ) return PARTITION_NOT_PRESENT;
525 i->second.dataManager->clearStore().ignore();
526 m_partitions.erase( i );
527 return STATUS::SUCCESS;
528 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
SmartIF< IDataProviderSvc >
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:126
std::end
T end(T...args)
std::map::erase
T erase(T...args)
std::find_if
T find_if(T...args)
std::begin
T begin(T...args)

STATUS MultiStoreSvc::finalize | ( |  | ) |
| inline override

Service initialisation.

Definition at line 649 of file MultiStoreSvc.cpp.

650 {
651 setDataLoader( nullptr ).ignore();
652 clearStore().ignore();
653 clearPartitions().ignore();
654 m_current = Partition();
655 detachServices();
656 return Service::finalize();
657 }
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:174
MultiStoreSvc::detachServices
STATUS detachServices()
Definition: MultiStoreSvc.cpp:604
MultiStoreSvc::setDataLoader
STATUS setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
Definition: MultiStoreSvc.cpp:264
MultiStoreSvc::clearPartitions
STATUS clearPartitions()
Clear all partitions.
Definition: MultiStoreSvc.cpp:700
MultiStoreSvc::m_current
Partition m_current
Current partition.
Definition: MultiStoreSvc.cpp:124
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:84
MultiStoreSvc::clearStore
STATUS clearStore() override
IDataManagerSvc: Remove all data objects in the data store.
Definition: MultiStoreSvc.cpp:203

STATUS MultiStoreSvc::findObject | ( | boost::string_ref | path,
|  | OBJECT *& | pObj
| ) |  |
| inline override

Find object identified by its full path in the data store.

Definition at line 389 of file MultiStoreSvc.cpp.

390 {
391 return fwd( [&]( IDataProviderSvc& svc ) { return svc.retrieveObject( path, pObj ); } );
392 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

STATUS MultiStoreSvc::findObject | ( | IRegistry * | parent,
|  | boost::string_ref | path,
|  | OBJECT *& | pObj
| ) |  |
| inline override

Find object identified by its full path in the data store.

Definition at line 394 of file MultiStoreSvc.cpp.

395 {
396 return fwd( [&]( IDataProviderSvc& svc ) { return svc.findObject( parent, path, pObj ); } );
397 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46

STATUS MultiStoreSvc::findObject | ( | boost::string_ref | parent,
|  | boost::string_ref | path,
|  | OBJECT *& | pObj
| ) |  |
| inline override

Find object in the data store.

Definition at line 399 of file MultiStoreSvc.cpp.

400 {
401 return fwd( [&]( IDataProviderSvc& svc ) { return svc.retrieveObject( parent, path, pObj ); } );
402 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

STATUS MultiStoreSvc::findObject | ( | boost::string_ref | parent,
|  | int | item,
|  | OBJECT *& | pObject
| ) |  |
| inline override

Find object in the data store.

Definition at line 404 of file MultiStoreSvc.cpp.

405 {
406 return fwd( [&]( IDataProviderSvc& svc ) { return svc.findObject( parent, item, pObject ); } );
407 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46

STATUS MultiStoreSvc::findObject | ( | OBJECT * | parent,
|  | boost::string_ref | path,
|  | OBJECT *& | pObject
| ) |  |
| inline override

Find object in the data store.

Definition at line 409 of file MultiStoreSvc.cpp.

410 {
411 return fwd( [&]( IDataProviderSvc& svc ) { return svc.findObject( parent, path, pObject ); } );
412 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46

STATUS MultiStoreSvc::findObject | ( | OBJECT * | parent,
|  | int | item,
|  | OBJECT *& | pObject
| ) |  |
| inline override

Find object in the data store.

Definition at line 414 of file MultiStoreSvc.cpp.

415 {
416 return fwd( [&]( IDataProviderSvc& svc ) { return svc.findObject( parent, item, pObject ); } );
417 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
template<typename Fun >

STATUS MultiStoreSvc::fwd | ( | Fun | f | ) |
| inline protected

Definition at line 130 of file MultiStoreSvc.cpp.

131 {
132 auto* svc = m_current.get<std::decay_t<detail::argument_t<Fun>>>();
133 return svc ? f( *svc ) : static_cast<StatusCode>( IDataProviderSvc::INVALID_ROOT );
134 }
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
MultiStoreSvc::m_current
Partition m_current
Current partition.
Definition: MultiStoreSvc.cpp:124

STATUS MultiStoreSvc::get | ( | CSTR & | nam,
|  | IInterface *& | pPartition
| ) |  | const
| inline override

Access a partition object. The name identifies the partition uniquely.

Definition at line 556 of file MultiStoreSvc.cpp.

557 {
558 auto i = m_partitions.find( nam );
559 if ( i != m_partitions.end() ) {
560 pPartition = i->second.dataProvider;
561 return STATUS::SUCCESS;
562 }
563 pPartition = nullptr;
564 return PARTITION_NOT_PRESENT;
565 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:126
std::map::end
T end(T...args)
std::map::find
T find(T...args)

STATUS MultiStoreSvc::initialize | ( |  | ) |
| inline override

Service initialisation.

Definition at line 612 of file MultiStoreSvc.cpp.

613 {
614 // Nothing to do: just call base class initialisation
615 STATUS sc = Service::initialize();
616 if ( !sc.isSuccess() ) return sc;
617 sc = makePartitions();
618 if ( !sc.isSuccess() ) {
619 error() << "Failed to connect to all store partitions." << endmsg;
620 return sc;
621 }
622 return attachServices();
623 }
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:64
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:50
MultiStoreSvc::makePartitions
STATUS makePartitions()
Create all partitions according to job options.
Definition: MultiStoreSvc.cpp:708
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
MultiStoreSvc::attachServices
STATUS attachServices()
Definition: MultiStoreSvc.cpp:580

STATUS MultiStoreSvc::linkObject | ( | IRegistry * | from,
|  | boost::string_ref | objPath,
|  | OBJECT * | to
| ) |  |
| inline override

Add a link to another object.

Definition at line 419 of file MultiStoreSvc.cpp.

420 {
421 return fwd( [&]( IDataProviderSvc& svc ) { return svc.linkObject( from, objPath, to ); } );
422 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::linkObject
virtual StatusCode linkObject(IRegistry *from, boost::string_ref objPath, DataObject *toObj)=0
Add a link to another object.

STATUS MultiStoreSvc::linkObject | ( | boost::string_ref | from,
|  | boost::string_ref | objPath,
|  | OBJECT * | to
| ) |  |
| inline override

Add a link to another object.

Definition at line 424 of file MultiStoreSvc.cpp.

425 {
426 return fwd( [&]( IDataProviderSvc& svc ) { return svc.linkObject( from, objPath, to ); } );
427 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::linkObject
virtual StatusCode linkObject(IRegistry *from, boost::string_ref objPath, DataObject *toObj)=0
Add a link to another object.

STATUS MultiStoreSvc::linkObject | ( | OBJECT * | from,
|  | boost::string_ref | objPath,
|  | OBJECT * | to
| ) |  |
| inline override

Add a link to another object.

Definition at line 429 of file MultiStoreSvc.cpp.

430 {
431 return fwd( [&]( IDataProviderSvc& svc ) { return svc.linkObject( from, objPath, to ); } );
432 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::linkObject
virtual StatusCode linkObject(IRegistry *from, boost::string_ref objPath, DataObject *toObj)=0
Add a link to another object.

STATUS MultiStoreSvc::linkObject | ( | boost::string_ref | fullPath,
|  | OBJECT * | to
| ) |  |
| inline override

Add a link to another object.

Definition at line 434 of file MultiStoreSvc.cpp.

435 {
436 return fwd( [&]( IDataProviderSvc& svc ) { return svc.linkObject( fullPath, to ); } );
437 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::linkObject
virtual StatusCode linkObject(IRegistry *from, boost::string_ref objPath, DataObject *toObj)=0
Add a link to another object.

STATUS MultiStoreSvc::makePartitions | ( |  | ) |
| inline

Create all partitions according to job options.

Definition at line 708 of file MultiStoreSvc.cpp.

709 {
710 using Parser = Gaudi::Utils::AttribStringParser;
711 std::string typ, nam;
712 clearPartitions().ignore();
713 for ( auto part : m_partitionDefs ) {
714 for ( auto attrib : Parser( std::move( part ) ) ) {
715 switch (::toupper( attrib.tag[0] ) ) {
716 case 'N':
717 nam = std::move( attrib.value );
718 break;
719 case 'T':
720 typ = std::move( attrib.value );
721 break;
722 }
723 }
724 STATUS sc = create( nam, typ );
725 if ( !sc.isSuccess() ) return sc;
726 if ( m_defaultPartition.empty() ) m_defaultPartition = nam;
727 }
728 return STATUS::SUCCESS;
729 }
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:32
StatusCode::SUCCESS
Definition: StatusCode.h:29
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:50
MultiStoreSvc::create
STATUS create(CSTR &nam, CSTR &typ) override
Create a partition object. The name identifies the partition uniquely.
Definition: MultiStoreSvc.cpp:485
std::string
STL class.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
MultiStoreSvc::m_defaultPartition
Gaudi::Property< std::string > m_defaultPartition
Definition: MultiStoreSvc.cpp:112
MultiStoreSvc::clearPartitions
STATUS clearPartitions()
Clear all partitions.
Definition: MultiStoreSvc.cpp:700
std::move
T move(T...args)
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:84
MultiStoreSvc::m_partitionDefs
Gaudi::Property< PartitionDefs > m_partitionDefs
Definition: MultiStoreSvc.cpp:110
toupper
void toupper(std::string &s)
Definition: StatusCodeSvc.cpp:10

STATUS MultiStoreSvc::objectLeaves | ( | const OBJECT * | pObject,
|  | std::vector< IRegistry * > & | leaves
| ) |  |
| inline override

Explore the object store: retrieve all leaves attached to the object.

Definition at line 173 of file MultiStoreSvc.cpp.

174 {
175 return fwd( [&]( IDataManagerSvc& svc ) { return svc.objectLeaves( pObject, leaves ); } );
176 }
IDataManagerSvc::objectLeaves
virtual StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &refLeaves)=0
Explore the object store: retrieve all leaves attached to the object The object is identified by its ...
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130

STATUS MultiStoreSvc::objectLeaves | ( | const IRegistry * | pObject,
|  | std::vector< IRegistry * > & | leaves
| ) |  |
| inline override

Explore the object store: retrieve all leaves attached to the object.

Definition at line 178 of file MultiStoreSvc.cpp.

179 {
180 return fwd( [&]( IDataManagerSvc& svc ) { return svc.objectLeaves( pObject, leaves ); } );
181 }
IDataManagerSvc::objectLeaves
virtual StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &refLeaves)=0
Explore the object store: retrieve all leaves attached to the object The object is identified by its ...
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130

STATUS MultiStoreSvc::objectParent | ( | const OBJECT * | pObject,
|  | IRegistry *& | refpParent
| ) |  |
| inline override

IDataManagerSvc: Explore the object store: retrieve the object's parent.

Definition at line 183 of file MultiStoreSvc.cpp.

184 {
185 return fwd( [&]( IDataManagerSvc& svc ) { return svc.objectParent( pObject, refpParent ); } );
186 }
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::objectParent
virtual StatusCode objectParent(const DataObject *pObject, IRegistry *&refpParent)=0
IDataManagerSvc: Explore the object store: retrieve the object&#39;s parent.

STATUS MultiStoreSvc::objectParent | ( | const IRegistry * | pObject,
|  | IRegistry *& | refpParent
| ) |  |
| inline override

IDataManagerSvc: Explore the object store: retrieve the object's parent.

Definition at line 188 of file MultiStoreSvc.cpp.

189 {
190 return fwd( [&]( IDataManagerSvc& svc ) { return svc.objectParent( pObject, refpParent ); } );
191 }
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::objectParent
virtual StatusCode objectParent(const DataObject *pObject, IRegistry *&refpParent)=0
IDataManagerSvc: Explore the object store: retrieve the object&#39;s parent.

STATUS MultiStoreSvc::preLoad | ( |  | ) |
| inline override

load all preload items of the list

Definition at line 299 of file MultiStoreSvc.cpp.

300 {
301 return fwd( [&]( IDataProviderSvc& svc ) { return svc.preLoad(); } );
302 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc::preLoad
virtual StatusCode preLoad()=0
Load all preload items of the list.
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46

STATUS MultiStoreSvc::preparePartitions | ( |  | ) |
| inline

Prepare partition for usage.

Definition at line 674 of file MultiStoreSvc.cpp.

675 {
676 STATUS iret = STATUS::SUCCESS;
677 for ( auto& i : m_partitions ) {
678 STATUS sc = dispatch_variant( m_root.root,
679 [&]( ADDRESS* address ) -> STATUS {
680 if ( !address ) return STATUS::FAILURE;
681 ADDRESS* pAdd = nullptr;
682 ADDRESS* p = address;
683 auto sc = m_addrCreator->createAddress( p->svcType(), p->clID(), p->par(),
684 p->ipar(), pAdd );
685 return sc.isSuccess() ? i.second.dataManager->setRoot( m_root.path, pAdd ) : sc;
686 },
687 [&]( OBJECT* object ) -> STATUS {
688 if ( object && object->clID() == CLID_DataObject ) {
689 return i.second.dataManager->setRoot( m_root.path, new DataObject() );
690 }
691 return STATUS::FAILURE;
692 },
693 []( boost::blank ) -> STATUS { return STATUS::FAILURE; } );
694 if ( !sc.isSuccess() ) iret = sc;
695 }
696 return iret;
697 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:126
MultiStoreSvc::m_root
struct MultiStoreSvc::tagROOT m_root
detail::dispatch_variant
auto dispatch_variant
Definition: FunAdapters.h:77
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:50
MultiStoreSvc::tagROOT::root
boost::variant< boost::blank, ADDRESS *, OBJECT * > root
Definition: MultiStoreSvc.cpp:121
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
StatusCode::FAILURE
Definition: StatusCode.h:29
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

STATUS MultiStoreSvc::registerAddress | ( | boost::string_ref | path,
|  | ADDRESS * | pAddr
| ) |  |
| inline override

IDataManagerSvc: Register object address with the data store.

Definition at line 143 of file MultiStoreSvc.cpp.

144 {
145 return fwd( [&]( IDataManagerSvc& svc ) { return svc.registerAddress( path, pAddr ); } );
146 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::registerAddress
virtual StatusCode registerAddress(boost::string_ref fullPath, IOpaqueAddress *pAddress)=0
Register object address with the data store.

STATUS MultiStoreSvc::registerAddress | ( | OBJECT * | parent,
|  | boost::string_ref | path,
|  | ADDRESS * | pAddr
| ) |  |
| inline override

IDataManagerSvc: Register object address with the data store.

Definition at line 148 of file MultiStoreSvc.cpp.

149 {
150 return fwd( [&]( IDataManagerSvc& svc ) { return svc.registerAddress( parent, path, pAddr ); } );
151 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::registerAddress
virtual StatusCode registerAddress(boost::string_ref fullPath, IOpaqueAddress *pAddress)=0
Register object address with the data store.

STATUS MultiStoreSvc::registerAddress | ( | IRegistry * | parent,
|  | boost::string_ref | path,
|  | ADDRESS * | pAddr
| ) |  |
| inline override

IDataManagerSvc: Register object address with the data store.

Definition at line 153 of file MultiStoreSvc.cpp.

154 {
155 return fwd( [&]( IDataManagerSvc& svc ) { return svc.registerAddress( parent, path, pAddr ); } );
156 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::registerAddress
virtual StatusCode registerAddress(boost::string_ref fullPath, IOpaqueAddress *pAddress)=0
Register object address with the data store.

STATUS MultiStoreSvc::registerObject | ( | boost::string_ref | path,
|  | OBJECT * | pObj
| ) |  |
| inline override

Register object with the data store.

Definition at line 304 of file MultiStoreSvc.cpp.

305 {
306 return registerObject( nullptr, path, pObj );
307 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::registerObject
STATUS registerObject(boost::string_ref path, OBJECT *pObj) override
Register object with the data store.
Definition: MultiStoreSvc.cpp:304

STATUS MultiStoreSvc::registerObject | ( | boost::string_ref | parent,
|  | boost::string_ref | obj,
|  | OBJECT * | pObj
| ) |  |
| inline override

Register object with the data store.

Definition at line 309 of file MultiStoreSvc.cpp.

310 {
311 return fwd( [&]( IDataProviderSvc& svc ) { return svc.registerObject( parent, obj, pObj ); } );
312 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::registerObject
virtual StatusCode registerObject(boost::string_ref fullPath, DataObject *pObject)=0
Register object with the data store.

STATUS MultiStoreSvc::registerObject | ( | boost::string_ref | parent,
|  | int | item,
|  | OBJECT * | pObj
| ) |  |
| inline override

Register object with the data store.

Definition at line 314 of file MultiStoreSvc.cpp.

315 {
316 return fwd( [&]( IDataProviderSvc& svc ) { return svc.registerObject( parent, item, pObj ); } );
317 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::registerObject
virtual StatusCode registerObject(boost::string_ref fullPath, DataObject *pObject)=0
Register object with the data store.

STATUS MultiStoreSvc::registerObject | ( | OBJECT * | parent,
|  | boost::string_ref | obj,
|  | OBJECT * | pObj
| ) |  |
| inline override

Register object with the data store.

Definition at line 319 of file MultiStoreSvc.cpp.

320 {
321 return fwd( [&]( IDataProviderSvc& svc ) { return svc.registerObject( parent, obj, pObj ); } );
322 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::registerObject
virtual StatusCode registerObject(boost::string_ref fullPath, DataObject *pObject)=0
Register object with the data store.

STATUS MultiStoreSvc::registerObject | ( | OBJECT * | parent,
|  | int | obj,
|  | OBJECT * | pObj
| ) |  |
| inline override

Register object with the data store.

Definition at line 324 of file MultiStoreSvc.cpp.

325 {
326 return fwd( [&]( IDataProviderSvc& svc ) { return svc.registerObject( parent, obj, pObj ); } );
327 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::registerObject
virtual StatusCode registerObject(boost::string_ref fullPath, DataObject *pObject)=0
Register object with the data store.

STATUS MultiStoreSvc::reinitialize | ( |  | ) |
| inline override

Service initialisation.

Definition at line 626 of file MultiStoreSvc.cpp.

627 {
628 STATUS sc = Service::reinitialize();
629 if ( !sc.isSuccess() ) {
630 error() << "Enable to reinitialize base class" << endmsg;
631 return sc;
632 }
633 detachServices();
634 sc = attachServices();
635 if ( !sc.isSuccess() ) {
636 error() << "Failed to attach necessary services." << endmsg;
637 return sc;
638 }
639 sc = makePartitions();
640 if ( !sc.isSuccess() ) {
641 error() << "Failed to connect to store partitions." << endmsg;
642 return sc;
643 }
644 // return
645 return STATUS::SUCCESS;
646 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:50
MultiStoreSvc::detachServices
STATUS detachServices()
Definition: MultiStoreSvc.cpp:604
MultiStoreSvc::makePartitions
STATUS makePartitions()
Create all partitions according to job options.
Definition: MultiStoreSvc.cpp:708
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Service::reinitialize
StatusCode reinitialize() override
Definition: Service.cpp:250
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
MultiStoreSvc::attachServices
STATUS attachServices()
Definition: MultiStoreSvc.cpp:580

STATUS MultiStoreSvc::removePreLoadItem | ( | const DataStoreItem & | item | ) |
| inline override

Remove an item from the preload list.

Definition at line 284 of file MultiStoreSvc.cpp.

285 {
286 return fwd( [&]( IDataProviderSvc& svc ) { return svc.removePreLoadItem( item ); } );
287 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::removePreLoadItem
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.

STATUS MultiStoreSvc::removePreLoadItem | ( | std::string | item | ) |
| inline override

Add an item to the preload list.

Definition at line 289 of file MultiStoreSvc.cpp.

290 {
291 return fwd( [&]( IDataProviderSvc& svc ) { return svc.removePreLoadItem( std::move( item ) ); } );
292 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::removePreLoadItem
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.
std::move
T move(T...args)

STATUS MultiStoreSvc::resetPreLoad | ( |  | ) |
| inline override

Clear the preload list.

Definition at line 294 of file MultiStoreSvc.cpp.

295 {
296 return fwd( [&]( IDataProviderSvc& svc ) { return svc.resetPreLoad(); } );
297 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc::resetPreLoad
virtual StatusCode resetPreLoad()=0
Clear the preload list.
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46

STATUS MultiStoreSvc::retrieveObject | ( | IRegistry * | parent,
|  | boost::string_ref | path,
|  | OBJECT *& | pObj
| ) |  |
| inline override

Retrieve object from data store.

Definition at line 359 of file MultiStoreSvc.cpp.

360 {
361 return fwd( [&]( IDataProviderSvc& svc ) { return svc.retrieveObject( parent, path, pObj ); } );
362 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

STATUS MultiStoreSvc::retrieveObject | ( | boost::string_ref | path,
|  | OBJECT *& | pObj
| ) |  |
| inline override

Retrieve object identified by its full path from the data store.

Definition at line 364 of file MultiStoreSvc.cpp.

365 {
366 return fwd( [&]( IDataProviderSvc& svc ) { return svc.retrieveObject( path, pObj ); } );
367 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

STATUS MultiStoreSvc::retrieveObject | ( | boost::string_ref | parent,
|  | boost::string_ref | path,
|  | OBJECT *& | pObj
| ) |  |
| inline override

Retrieve object from data store.

Definition at line 369 of file MultiStoreSvc.cpp.

370 {
371 return fwd( [&]( IDataProviderSvc& svc ) { return svc.retrieveObject( parent, path, pObj ); } );
372 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

STATUS MultiStoreSvc::retrieveObject | ( | boost::string_ref | parent,
|  | int | item,
|  | OBJECT *& | pObj
| ) |  |
| inline override

Retrieve object from data store.

Definition at line 374 of file MultiStoreSvc.cpp.

375 {
376 return fwd( [&]( IDataProviderSvc& svc ) { return svc.retrieveObject( parent, item, pObj ); } );
377 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

STATUS MultiStoreSvc::retrieveObject | ( | OBJECT * | parent,
|  | boost::string_ref | path,
|  | OBJECT *& | pObj
| ) |  |
| inline override

Retrieve object from data store.

Definition at line 379 of file MultiStoreSvc.cpp.

380 {
381 return fwd( [&]( IDataProviderSvc& svc ) { return svc.retrieveObject( parent, path, pObj ); } );
382 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

STATUS MultiStoreSvc::retrieveObject | ( | OBJECT * | parent,
|  | int | item,
|  | OBJECT *& | pObj
| ) |  |
| inline override

Retrieve object from data store.

Definition at line 384 of file MultiStoreSvc.cpp.

385 {
386 return fwd( [&]( IDataProviderSvc& svc ) { return svc.retrieveObject( parent, item, pObj ); } );
387 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

CLID MultiStoreSvc::rootCLID | ( |  | ) | const
| inline override

IDataManagerSvc: Accessor for root event CLID.

Definition at line 138 of file MultiStoreSvc.cpp.

138 { return m_rootCLID; }
MultiStoreSvc::m_rootCLID
Gaudi::Property< CLID > m_rootCLID
Definition: MultiStoreSvc.cpp:108

const std::string& MultiStoreSvc::rootName | ( |  | ) | const
| inline override

Name for root Event.

Definition at line 140 of file MultiStoreSvc.cpp.

140 { return m_rootName; }
MultiStoreSvc::m_rootName
Gaudi::Property< std::string > m_rootName
Definition: MultiStoreSvc.cpp:109

STATUS MultiStoreSvc::setDataLoader | ( | IConversionSvc * | pDataLoader,
|  | IDataProviderSvc * | dpsvc = `nullptr`
| ) |  |
| inline override

IDataManagerSvc: Pass a default data loader to the service.

Definition at line 264 of file MultiStoreSvc.cpp.

265 {
266 m_dataLoader = pDataLoader;
267 if ( m_dataLoader ) m_dataLoader->setDataProvider( dpsvc ? dpsvc : this );
268 for ( auto& i : m_partitions ) {
269 i.second.dataManager->setDataLoader( m_dataLoader.get() ).ignore();
270 }
271 return SUCCESS;
272 }
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:126
GaudiPython.Bindings.SUCCESS
SUCCESS
Definition: Bindings.py:56
IConverter::setDataProvider
virtual StatusCode setDataProvider(IDataProviderSvc *pService)=0
Set Data provider service.
MultiStoreSvc::m_dataLoader
SmartIF< IConversionSvc > m_dataLoader
Pointer to data loader service.
Definition: MultiStoreSvc.cpp:115
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:82

STATUS MultiStoreSvc::setRoot | ( | std::string | path,
|  | OBJECT * | pObj
| ) |  |
| inline override

Initialize data store for new event by giving new event path and root object.

Takes care to clear the store before reinitializing it

Definition at line 234 of file MultiStoreSvc.cpp.

235 {
236 dispatch_variant( m_root.root,
237 []( auto* p ) {
238 if ( p ) p->release();
239 },
240 []( boost::blank ) {} );
241 m_root.path = std::move( path );
242 m_root.root = pObj;
243 preparePartitions();
244 return activate( m_defaultPartition );
245 }
MultiStoreSvc::m_root
struct MultiStoreSvc::tagROOT m_root
detail::dispatch_variant
auto dispatch_variant
Definition: FunAdapters.h:77
MultiStoreSvc::tagROOT::root
boost::variant< boost::blank, ADDRESS *, OBJECT * > root
Definition: MultiStoreSvc.cpp:121
MultiStoreSvc::activate
STATUS activate(CSTR &nam) override
Activate a partition object. The name identifies the partition uniquely.
Definition: MultiStoreSvc.cpp:531
MultiStoreSvc::m_defaultPartition
Gaudi::Property< std::string > m_defaultPartition
Definition: MultiStoreSvc.cpp:112
std::move
T move(T...args)
MultiStoreSvc::preparePartitions
STATUS preparePartitions()
Prepare partition for usage.
Definition: MultiStoreSvc.cpp:674
MultiStoreSvc::tagROOT::path
std::string path
Definition: MultiStoreSvc.cpp:120

STATUS MultiStoreSvc::setRoot | ( | std::string | path,
|  | ADDRESS * | pAddr
| ) |  |
| inline override

Initialize data store for new event by giving new event path and address of root object.

Takes care to clear the store before reinitializing it

Definition at line 249 of file MultiStoreSvc.cpp.

250 {
251 dispatch_variant( m_root.root,
252 []( auto* p ) {
253 if ( p ) p->release();
254 },
255 []( boost::blank ) {} );
256 m_root.path = std::move( path );
257 m_root.root = pAddr;
258 if ( !pAddr ) return STATUS::FAILURE;
259 pAddr->addRef();
260 preparePartitions();
261 return activate( m_defaultPartition );
262 }
MultiStoreSvc::m_root
struct MultiStoreSvc::tagROOT m_root
detail::dispatch_variant
auto dispatch_variant
Definition: FunAdapters.h:77
MultiStoreSvc::tagROOT::root
boost::variant< boost::blank, ADDRESS *, OBJECT * > root
Definition: MultiStoreSvc.cpp:121
MultiStoreSvc::activate
STATUS activate(CSTR &nam) override
Activate a partition object. The name identifies the partition uniquely.
Definition: MultiStoreSvc.cpp:531
MultiStoreSvc::m_defaultPartition
Gaudi::Property< std::string > m_defaultPartition
Definition: MultiStoreSvc.cpp:112
std::move
T move(T...args)
MultiStoreSvc::preparePartitions
STATUS preparePartitions()
Prepare partition for usage.
Definition: MultiStoreSvc.cpp:674
StatusCode::FAILURE
Definition: StatusCode.h:29
MultiStoreSvc::tagROOT::path
std::string path
Definition: MultiStoreSvc.cpp:120
IOpaqueAddress::addRef
virtual unsigned long addRef()=0
Add reference to object.

STATUS MultiStoreSvc::traverseSubTree | ( | boost::string_ref | path,
|  | AGENT * | pAgent
| ) |  |
| inline override

Analyze by traversing all data objects below the sub tree.

Definition at line 218 of file MultiStoreSvc.cpp.

219 {
220 return fwd( [&]( IDataManagerSvc& svc ) { return svc.traverseSubTree( path, pAgent ); } );
221 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::traverseSubTree
virtual StatusCode traverseSubTree(boost::string_ref sub_path, IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects below the sub tree identified by its full path name...

STATUS MultiStoreSvc::traverseSubTree | ( | OBJECT * | pObject,
|  | AGENT * | pAgent
| ) |  |
| inline override

IDataManagerSvc: Analyze by traversing all data objects below the sub tree.

Definition at line 223 of file MultiStoreSvc.cpp.

224 {
225 return fwd( [&]( IDataManagerSvc& svc ) { return svc.traverseSubTree( pObject, pAgent ); } );
226 }
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::traverseSubTree
virtual StatusCode traverseSubTree(boost::string_ref sub_path, IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects below the sub tree identified by its full path name...

STATUS MultiStoreSvc::traverseTree | ( | AGENT * | pAgent | ) |
| inline override

IDataManagerSvc: Analyze by traversing all data objects in the data store.

Definition at line 228 of file MultiStoreSvc.cpp.

229 {
230 return fwd( [&]( IDataManagerSvc& svc ) { return svc.traverseTree( pAgent ); } );
231 }
IDataManagerSvc::traverseTree
virtual StatusCode traverseTree(IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects in the data store.
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130

STATUS MultiStoreSvc::unlinkObject | ( | IRegistry * | from,
|  | boost::string_ref | objPath
| ) |  |
| inline override

Remove a link to another object.

Definition at line 439 of file MultiStoreSvc.cpp.

440 {
441 return fwd( [&]( IDataProviderSvc& svc ) { return svc.unlinkObject( from, objPath ); } );
442 }
IDataProviderSvc::unlinkObject
virtual StatusCode unlinkObject(IRegistry *from, boost::string_ref objPath)=0
Remove a link to another object.
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46

STATUS MultiStoreSvc::unlinkObject | ( | boost::string_ref | from,
|  | boost::string_ref | objPath
| ) |  |
| inline override

Remove a link to another object.

Definition at line 444 of file MultiStoreSvc.cpp.

445 {
446 return fwd( [&]( IDataProviderSvc& svc ) { return svc.unlinkObject( from, objPath ); } );
447 }
IDataProviderSvc::unlinkObject
virtual StatusCode unlinkObject(IRegistry *from, boost::string_ref objPath)=0
Remove a link to another object.
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46

STATUS MultiStoreSvc::unlinkObject | ( | OBJECT * | from,
|  | boost::string_ref | objPath
| ) |  |
| inline override

Remove a link to another object.

Definition at line 449 of file MultiStoreSvc.cpp.

450 {
451 return fwd( [&]( IDataProviderSvc& svc ) { return svc.unlinkObject( from, objPath ); } );
452 }
IDataProviderSvc::unlinkObject
virtual StatusCode unlinkObject(IRegistry *from, boost::string_ref objPath)=0
Remove a link to another object.
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46

STATUS MultiStoreSvc::unlinkObject | ( | boost::string_ref | path | ) |
| inline override

Remove a link to another object.

Definition at line 454 of file MultiStoreSvc.cpp.

455 {
456 return fwd( [&]( IDataProviderSvc& svc ) { return svc.unlinkObject( path ); } );
457 }
IDataProviderSvc::unlinkObject
virtual StatusCode unlinkObject(IRegistry *from, boost::string_ref objPath)=0
Remove a link to another object.
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46

STATUS MultiStoreSvc::unregisterAddress | ( | boost::string_ref | path | ) |
| inline override

IDataManagerSvc: Unregister object address from the data store.

Definition at line 158 of file MultiStoreSvc.cpp.

159 {
160 return fwd( [&]( IDataManagerSvc& svc ) { return svc.unregisterAddress( path ); } );
161 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::unregisterAddress
virtual StatusCode unregisterAddress(boost::string_ref fullPath)=0
Unregister object address from the data store.

STATUS MultiStoreSvc::unregisterAddress | ( | OBJECT * | pParent,
|  | boost::string_ref | path
| ) |  |
| inline override

IDataManagerSvc: Unregister object address from the data store.

Definition at line 163 of file MultiStoreSvc.cpp.

164 {
165 return fwd( [&]( IDataManagerSvc& svc ) { return svc.unregisterAddress( pParent, path ); } );
166 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::unregisterAddress
virtual StatusCode unregisterAddress(boost::string_ref fullPath)=0
Unregister object address from the data store.

STATUS MultiStoreSvc::unregisterAddress | ( | IRegistry * | pParent,
|  | boost::string_ref | path
| ) |  |
| inline override

IDataManagerSvc: Unregister object address from the data store.

Definition at line 168 of file MultiStoreSvc.cpp.

169 {
170 return fwd( [&]( IDataManagerSvc& svc ) { return svc.unregisterAddress( pParent, path ); } );
171 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
IDataManagerSvc
Definition: IDataManagerSvc.h:46
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataManagerSvc::unregisterAddress
virtual StatusCode unregisterAddress(boost::string_ref fullPath)=0
Unregister object address from the data store.

STATUS MultiStoreSvc::unregisterObject | ( | boost::string_ref | path | ) |
| inline override

Unregister object from the data store.

Definition at line 329 of file MultiStoreSvc.cpp.

330 {
331 return fwd( [&]( IDataProviderSvc& svc ) { return svc.unregisterObject( path ); } );
332 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::unregisterObject
virtual StatusCode unregisterObject(boost::string_ref fullPath)=0
Unregister object from the data store.

STATUS MultiStoreSvc::unregisterObject | ( | boost::string_ref | parent,
|  | boost::string_ref | obj
| ) |  |
| inline override

Unregister object from the data store.

Definition at line 334 of file MultiStoreSvc.cpp.

335 {
336 return fwd( [&]( IDataProviderSvc& svc ) { return svc.unregisterObject( parent, obj ); } );
337 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::unregisterObject
virtual StatusCode unregisterObject(boost::string_ref fullPath)=0
Unregister object from the data store.

STATUS MultiStoreSvc::unregisterObject | ( | boost::string_ref | parent,
|  | int | obj
| ) |  |
| inline override

Unregister object from the data store.

Definition at line 339 of file MultiStoreSvc.cpp.

340 {
341 return fwd( [&]( IDataProviderSvc& svc ) { return svc.unregisterObject( parent, obj ); } );
342 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::unregisterObject
virtual StatusCode unregisterObject(boost::string_ref fullPath)=0
Unregister object from the data store.

STATUS MultiStoreSvc::unregisterObject | ( | OBJECT * | pObj | ) |
| inline override

Unregister object from the data store.

Definition at line 344 of file MultiStoreSvc.cpp.

345 {
346 return fwd( [&]( IDataProviderSvc& svc ) { return svc.unregisterObject( pObj ); } );
347 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::unregisterObject
virtual StatusCode unregisterObject(boost::string_ref fullPath)=0
Unregister object from the data store.

STATUS MultiStoreSvc::unregisterObject | ( | OBJECT * | pObj,
|  | boost::string_ref | path
| ) |  |
| inline override

Unregister object from the data store.

Definition at line 349 of file MultiStoreSvc.cpp.

350 {
351 return fwd( [&]( IDataProviderSvc& svc ) { return svc.unregisterObject( pObj, path ); } );
352 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::unregisterObject
virtual StatusCode unregisterObject(boost::string_ref fullPath)=0
Unregister object from the data store.

STATUS MultiStoreSvc::unregisterObject | ( | OBJECT * | pObj,
|  | int | item
| ) |  |
| inline override

Unregister object from the data store.

Definition at line 354 of file MultiStoreSvc.cpp.

355 {
356 return fwd( [&]( IDataProviderSvc& svc ) { return svc.unregisterObject( pObj, item ); } );
357 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::unregisterObject
virtual StatusCode unregisterObject(boost::string_ref fullPath)=0
Unregister object from the data store.

STATUS MultiStoreSvc::updateObject | ( | IRegistry * | pDirectory | ) |
| inline override

Update object identified by its directory entry.

Definition at line 459 of file MultiStoreSvc.cpp.

460 {
461 return fwd( [&]( IDataProviderSvc& svc ) { return svc.updateObject( pDirectory ); } );
462 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::updateObject
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.

STATUS MultiStoreSvc::updateObject | ( | boost::string_ref | path | ) |
| inline override

Update object.

Definition at line 464 of file MultiStoreSvc.cpp.

465 {
466 return fwd( [&]( IDataProviderSvc& svc ) { return svc.updateObject( path ); } );
467 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::updateObject
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.

STATUS MultiStoreSvc::updateObject | ( | OBJECT * | pObj | ) |
| inline override

Update object.

Definition at line 469 of file MultiStoreSvc.cpp.

470 {
471 return fwd( [&]( IDataProviderSvc& svc ) { return svc.updateObject( pObj ); } );
472 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::updateObject
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.

STATUS MultiStoreSvc::updateObject | ( | boost::string_ref | parent,
|  | boost::string_ref | updatePath
| ) |  |
| inline override

Update object.

Definition at line 474 of file MultiStoreSvc.cpp.

475 {
476 return fwd( [&]( IDataProviderSvc& svc ) { return svc.updateObject( parent, updatePath ); } );
477 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::updateObject
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.

STATUS MultiStoreSvc::updateObject | ( | OBJECT * | parent,
|  | boost::string_ref | updatePath
| ) |  |
| inline override

Update object.

Definition at line 479 of file MultiStoreSvc.cpp.

480 {
481 return fwd( [&]( IDataProviderSvc& svc ) { return svc.updateObject( parent, updatePath ); } );
482 }
MultiStoreSvc::fwd
STATUS fwd(Fun f)
Definition: MultiStoreSvc.cpp:130
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:46
IDataProviderSvc::updateObject
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.

## Member Data Documentation

SmartIF<IAddressCreator> MultiStoreSvc::m_addrCreator
| protected

Reference to address creator.

Definition at line 117 of file MultiStoreSvc.cpp.

Partition MultiStoreSvc::m_current
| protected

Current partition.

Definition at line 124 of file MultiStoreSvc.cpp.

SmartIF<IConversionSvc> MultiStoreSvc::m_dataLoader
| protected

Pointer to data loader service.

Definition at line 115 of file MultiStoreSvc.cpp.

Gaudi::Property<std::string> MultiStoreSvc::m_defaultPartition {this, "DefaultPartition", "Default", "default partition name"}
| protected

Definition at line 112 of file MultiStoreSvc.cpp.

Gaudi::Property<std::string> MultiStoreSvc::m_loader {this, "DataLoader", "EventPersistencySvc", "data loader name"}
| protected

Definition at line 111 of file MultiStoreSvc.cpp.

Gaudi::Property<PartitionDefs> MultiStoreSvc::m_partitionDefs {this, "Partitions", {}, "datastore partition definitions"}
| protected

Definition at line 110 of file MultiStoreSvc.cpp.

Partitions MultiStoreSvc::m_partitions
| protected

Datastore partitions.

Definition at line 126 of file MultiStoreSvc.cpp.

struct MultiStoreSvc::tagROOT MultiStoreSvc::m_root
| protected

Gaudi::Property<CLID> MultiStoreSvc::m_rootCLID {this, "RootCLID", 110, "CLID of root entry"}
| protected

Definition at line 108 of file MultiStoreSvc.cpp.

Gaudi::Property<std::string> MultiStoreSvc::m_rootName {this, "RootName", "/Event", "name of root entry"}
| protected

Definition at line 109 of file MultiStoreSvc.cpp.

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

- GaudiCommonSvc/src/DataSvc/MultiStoreSvc.cpp