MultiStoreSvc Class Reference

Data service base class. More...

Inheritance diagram for MultiStoreSvc:
Collaboration diagram for MultiStoreSvc:

Classes

struct  tagROOT
 

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 (CSTR &path, ADDRESS *pAddr) override
 IDataManagerSvc: Register object address with the data store. More...
 
STATUS registerAddress (OBJECT *parent, CSTR &path, ADDRESS *pAddr) override
 IDataManagerSvc: Register object address with the data store. More...
 
STATUS registerAddress (IRegistry *parent, CSTR &path, ADDRESS *pAdd) override
 IDataManagerSvc: Register object address with the data store. More...
 
STATUS unregisterAddress (CSTR &path) override
 IDataManagerSvc: Unregister object address from the data store. More...
 
STATUS unregisterAddress (OBJECT *pParent, CSTR &path) override
 IDataManagerSvc: Unregister object address from the data store. More...
 
STATUS unregisterAddress (IRegistry *pParent, CSTR &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 (CSTR &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 (CSTR &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 (CSTR &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 (CSTR &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 (CSTR &path, OBJECT *pObj) override
 Register object with the data store. More...
 
STATUS registerObject (CSTR &parent, CSTR &obj, OBJECT *pObj) override
 Register object with the data store. More...
 
STATUS registerObject (CSTR &parent, int item, OBJECT *pObj) override
 Register object with the data store. More...
 
STATUS registerObject (OBJECT *parent, CSTR &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 (CSTR &path) override
 Unregister object from the data store. More...
 
STATUS unregisterObject (CSTR &parent, CSTR &obj) override
 Unregister object from the data store. More...
 
STATUS unregisterObject (CSTR &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, CSTR &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, CSTR &path, OBJECT *&pObj) override
 Retrieve object from data store. More...
 
STATUS retrieveObject (CSTR &path, OBJECT *&pObj) override
 Retrieve object identified by its full path from the data store. More...
 
STATUS retrieveObject (CSTR &parent, CSTR &path, OBJECT *&pObj) override
 Retrieve object from data store. More...
 
STATUS retrieveObject (CSTR &parent, int item, OBJECT *&pObj) override
 Retrieve object from data store. More...
 
STATUS retrieveObject (OBJECT *parent, CSTR &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 (CSTR &path, OBJECT *&pObj) override
 Find object identified by its full path in the data store. More...
 
STATUS findObject (IRegistry *parent, CSTR &path, OBJECT *&pObj) override
 Find object identified by its full path in the data store. More...
 
STATUS findObject (CSTR &parent, CSTR &path, OBJECT *&pObj) override
 Find object in the data store. More...
 
STATUS findObject (CSTR &parent, int item, OBJECT *&pObject) override
 Find object in the data store. More...
 
STATUS findObject (OBJECT *parent, CSTR &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, CSTR &objPath, OBJECT *to) override
 Add a link to another object. More...
 
STATUS linkObject (CSTR &from, CSTR &objPath, OBJECT *to) override
 Add a link to another object. More...
 
STATUS linkObject (OBJECT *from, CSTR &objPath, OBJECT *to) override
 Add a link to another object. More...
 
STATUS linkObject (CSTR &fullPath, OBJECT *to) override
 Add a link to another object. More...
 
STATUS unlinkObject (IRegistry *from, CSTR &objPath) override
 Remove a link to another object. More...
 
STATUS unlinkObject (CSTR &from, CSTR &objPath) override
 Remove a link to another object. More...
 
STATUS unlinkObject (OBJECT *from, CSTR &objPath) override
 Remove a link to another object. More...
 
STATUS unlinkObject (CSTR &path) override
 Remove a link to another object. More...
 
STATUS updateObject (IRegistry *pDirectory) override
 Update object identified by its directory entry. More...
 
STATUS updateObject (CSTR &path) override
 Update object. More...
 
STATUS updateObject (OBJECT *pObj) override
 Update object. More...
 
STATUS updateObject (CSTR &parent, CSTR &updatePath) override
 Update object. More...
 
STATUS updateObject (OBJECT *parent, CSTR &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 (CSTR &name, ISvcLocator *svc)
 Standard Constructor. 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< BASE, Interfaces >
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...
 
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 extend_interfaces< Interfaces...>
 ~extend_interfaces () override=default
 Virtual destructor. More...
 
 ~extend_interfaces () override=default
 Virtual destructor. More...
 

Protected Types

enum  { no_type = 0, address_type = 1, object_type = 2 }
 Root type (address or object) More...
 
typedef std::vector< std::string > PartitionDefs
 
typedef std::map< std::string, Partition > Partitions
 

Protected Member Functions

template<typename... Args, typename... UArgs>
STATUS call_ (STATUS(IDataProviderSvc::*pmf)(Args...), UArgs &&...args)
 
template<typename... Args, typename... UArgs>
STATUS call_ (STATUS(IDataManagerSvc::*pmf)(Args...), UArgs &&...args)
 

Protected Attributes

CLID m_rootCLID
 Integer Property corresponding to CLID of root entry. More...
 
std::string m_rootName
 Name of root event. More...
 
std::string m_loader
 Data loader name. More...
 
SmartIF< IConversionSvcm_dataLoader
 Pointer to data loader service. More...
 
SmartIF< IAddressCreatorm_addrCreator
 Reference to address creator. More...
 
struct MultiStoreSvc::tagROOT m_root
 
Partition m_current
 Current partition. More...
 
Partitions m_partitions
 Datastore partitions. More...
 
PartitionDefs m_partitionDefs
 Datastore partition definitions. More...
 
std::string m_defaultPartition
 Default partition. More...
 

Additional Inherited Members

- Public Types inherited from extends< BASE, Interfaces >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces...>
 Typedef to the base of this class. More...
 
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 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...
 
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 67 of file MultiStoreSvc.cpp.

Member Typedef Documentation

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

Definition at line 73 of file MultiStoreSvc.cpp.

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

Definition at line 74 of file MultiStoreSvc.cpp.

Member Enumeration Documentation

anonymous enum
protected

Root type (address or object)

Enumerator
no_type 
address_type 
object_type 

Definition at line 86 of file MultiStoreSvc.cpp.

Constructor & Destructor Documentation

MultiStoreSvc::MultiStoreSvc ( CSTR name,
ISvcLocator svc 
)
inline

Standard Constructor.

Definition at line 605 of file MultiStoreSvc.cpp.

606  : base_class(name,svc)
607  {
608  declareProperty("RootCLID", m_rootCLID = 110);
609  declareProperty("RootName", m_rootName = "/Event");
610  declareProperty("Partitions", m_partitionDefs);
611  declareProperty("DataLoader", m_loader="EventPersistencySvc");
612  declareProperty("DefaultPartition", m_defaultPartition="Default");
613  }
PartitionDefs m_partitionDefs
Datastore partition definitions.
extends base_class
Typedef to this class.
Definition: extends.h:14
std::string m_rootName
Name of root event.
std::string m_loader
Data loader name.
CLID m_rootCLID
Integer Property corresponding to CLID of root entry.
std::string m_defaultPartition
Default partition.
MultiStoreSvc::~MultiStoreSvc ( )
inlineoverride

Standard Destructor.

Definition at line 616 of file MultiStoreSvc.cpp.

616  {
617  setDataLoader(nullptr).ignore();
618  resetPreLoad().ignore();
619  clearStore().ignore();
621  }
STATUS setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
STATUS clearPartitions()
Clear all partitions.
STATUS resetPreLoad() override
Clear the preload list.
void ignore() const
Definition: StatusCode.h:108
STATUS clearStore() override
IDataManagerSvc: Remove all data objects in the data store.

Member Function Documentation

STATUS MultiStoreSvc::activate ( CSTR nam)
inlineoverride

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

Definition at line 475 of file MultiStoreSvc.cpp.

475  {
476  auto i = m_partitions.find(nam);
477  if ( i != m_partitions.end() ) {
478  m_current = i->second;
479  return STATUS::SUCCESS;
480  }
481  m_current = Partition();
482  return PARTITION_NOT_PRESENT;
483  }
Partitions m_partitions
Datastore partitions.
Partition m_current
Current partition.
list i
Definition: ana.py:128
STATUS MultiStoreSvc::activate ( IInterface pPartition)
inlineoverride

Activate a partition object.

Definition at line 486 of file MultiStoreSvc.cpp.

486  {
487  auto provider = SmartIF<IDataProviderSvc>(pPartition);
488  m_current = Partition();
489  if ( !provider ) return NO_INTERFACE;
490  auto i = std::find_if(std::begin(m_partitions), std::end(m_partitions),
491  [&](Partitions::const_reference p) {
492  return p.second.dataProvider == provider;
493  } );
494  if (i == std::end(m_partitions)) return PARTITION_NOT_PRESENT;
495  m_current = i->second;
496  return STATUS::SUCCESS;
497  }
Partitions m_partitions
Datastore partitions.
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:45
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:47
Partition m_current
Current partition.
list i
Definition: ana.py:128
StatusCode MultiStoreSvc::activePartition ( std::string &  nam,
IInterface *&  pPartition 
) const
inlineoverride

Access the active partition object.

Definition at line 511 of file MultiStoreSvc.cpp.

511  {
512  if ( m_current.dataProvider ) {
513  nam = m_current.name;
514  pPartition = m_current.dataProvider;
515  return STATUS::SUCCESS;
516  }
517  nam.clear();
518  pPartition = nullptr;
519  return NO_ACTIVE_PARTITION;
520  }
Partition m_current
Current partition.
STATUS MultiStoreSvc::addPreLoadItem ( const DataStoreItem item)
inlineoverride

Add an item to the preload list.

Definition at line 262 of file MultiStoreSvc.cpp.

262  {
263  return call_<const DataStoreItem&>( &IDataProviderSvc::addPreLoadItem, item);
264  }
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
tuple item
print s1,s2
Definition: ana.py:146
STATUS MultiStoreSvc::addPreLoadItem ( CSTR item)
inlineoverride

Add an item to the preload list.

Definition at line 266 of file MultiStoreSvc.cpp.

266  {
267  return call_<CSTR&>( &IDataProviderSvc::addPreLoadItem, item);
268  }
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
tuple item
print s1,s2
Definition: ana.py:146
STATUS MultiStoreSvc::attachServices ( )
inline

Definition at line 522 of file MultiStoreSvc.cpp.

522  {
523  MsgStream log(msgSvc(), name());
524  // Attach address creator facility
525  m_addrCreator = service(m_loader, true);
526  if (!m_addrCreator) {
527  log << MSG::ERROR
528  << "Failed to retrieve data loader "
529  << "\"" << m_loader << "\"" << endmsg;
530  return StatusCode::FAILURE;
531  }
532  // Attach data loader facility
533  auto dataLoader = service<IConversionSvc>(m_loader, true);
534  if (!dataLoader) {
535  log << MSG::ERROR << "Failed to retrieve data loader "
536  << "\"" << m_loader << "\"" << endmsg;
537  return StatusCode::FAILURE;
538  }
539  auto sc = setDataLoader(dataLoader.get());
540  if (!sc.isSuccess()) {
541  log << MSG::ERROR << "Failed to set data loader "
542  << "\"" << m_loader << "\"" << endmsg;
543  }
544  return sc;
545  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
STATUS setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
std::string m_loader
Data loader name.
SmartIF< IAddressCreator > m_addrCreator
Reference to address creator.
template<typename... Args, typename... UArgs>
STATUS MultiStoreSvc::call_ ( STATUS(IDataProviderSvc::*)(Args...)  pmf,
UArgs &&...  args 
)
inlineprotected

Definition at line 107 of file MultiStoreSvc.cpp.

108  {
109  return m_current.dataProvider ? (m_current.dataProvider->*pmf)(std::forward<UArgs>(args)...)
111  }
Invalid root path object cannot be retrieved or stored.
Partition m_current
Current partition.
list args
Definition: gaudirun.py:290
template<typename... Args, typename... UArgs>
STATUS MultiStoreSvc::call_ ( STATUS(IDataManagerSvc::*)(Args...)  pmf,
UArgs &&...  args 
)
inlineprotected

Definition at line 113 of file MultiStoreSvc.cpp.

114  {
115  return m_current.dataManager ? (m_current.dataManager->*pmf)(std::forward<UArgs>(args)...)
117  }
Invalid root path object cannot be retrieved or stored.
Partition m_current
Current partition.
list args
Definition: gaudirun.py:290
STATUS MultiStoreSvc::clearPartitions ( )
inline

Clear all partitions.

Definition at line 660 of file MultiStoreSvc.cpp.

660  {
661  for(auto &i : m_partitions) i.second.dataManager->clearStore().ignore();
662  m_partitions.clear();
663  return STATUS::SUCCESS;
664  }
Partitions m_partitions
Datastore partitions.
list i
Definition: ana.py:128
STATUS MultiStoreSvc::clearStore ( )
inlineoverride

IDataManagerSvc: Remove all data objects in the data store.

Definition at line 178 of file MultiStoreSvc.cpp.

178  {
179  for(auto &i : m_partitions) {
180  i.second.dataManager->clearStore().ignore();
181  }
182  if ( m_root.root.object ) {
183  switch ( m_root.type ) {
184  case address_type:
186  break;
187  case object_type:
189  break;
190  }
191  m_root.root.object = nullptr;
192  }
193  m_root.path.clear();
194  m_root.type = no_type;
195  return STATUS::SUCCESS;
196  }
Partitions m_partitions
Datastore partitions.
virtual unsigned long release()=0
release reference to object
struct MultiStoreSvc::tagROOT m_root
union MultiStoreSvc::tagROOT::@1 root
virtual unsigned long release()
release reference to object
Definition: DataObject.cpp:56
list i
Definition: ana.py:128
STATUS MultiStoreSvc::clearSubTree ( CSTR path)
inlineoverride

Remove all data objects below the sub tree identified.

Definition at line 170 of file MultiStoreSvc.cpp.

170  {
171  return call_<CSTR&>( &IDataManagerSvc::clearSubTree, path);
172  }
virtual StatusCode clearSubTree(const std::string &sub_path)=0
Remove all data objects below the sub tree identified by its full path name.
list path
Definition: __init__.py:15
STATUS MultiStoreSvc::clearSubTree ( OBJECT pObject)
inlineoverride

Remove all data objects below the sub tree identified.

Definition at line 174 of file MultiStoreSvc.cpp.

174  {
175  return call_<OBJECT*>( &IDataManagerSvc::clearSubTree, pObject);
176  }
virtual StatusCode clearSubTree(const std::string &sub_path)=0
Remove all data objects below the sub tree identified by its full path name.
STATUS MultiStoreSvc::create ( CSTR nam,
CSTR typ 
)
inlineoverride

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

Definition at line 431 of file MultiStoreSvc.cpp.

431  {
432  IInterface* pPartition = nullptr;
433  return create(nam, typ, pPartition);
434  }
STATUS create(CSTR &nam, CSTR &typ) override
Create a partition object. The name identifies the partition uniquely.
Definition of the basic interface.
Definition: IInterface.h:234
STATUS MultiStoreSvc::create ( CSTR nam,
CSTR typ,
IInterface *&  pPartition 
)
inlineoverride

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 436 of file MultiStoreSvc.cpp.

436  {
437  if ( get(nam, pPartition).isSuccess() ) return PARTITION_EXISTS;
439  auto isvc = serviceLocator()->service<IService>(typ);
440  if (!isvc) return NO_INTERFACE;
441  auto dataMgr = isvc.as<IDataManagerSvc>();
442  auto dataProv = isvc.as<IDataProviderSvc>();
443  if ( !dataMgr || !dataProv ) return NO_INTERFACE;
444  m_partitions.emplace( nam, Partition{ dataProv, dataMgr, nam } );
445  return STATUS::SUCCESS;
446  }
Partitions m_partitions
Datastore partitions.
Data provider interface definition.
General service interface definition.
Definition: IService.h:18
STATUS MultiStoreSvc::detachServices ( )
inline

Definition at line 547 of file MultiStoreSvc.cpp.

547  {
550  return STATUS::SUCCESS;
551  }
SmartIF< IConversionSvc > m_dataLoader
Pointer to data loader service.
SmartIF< IAddressCreator > m_addrCreator
Reference to address creator.
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
STATUS MultiStoreSvc::drop ( CSTR nam)
inlineoverride

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

Definition at line 449 of file MultiStoreSvc.cpp.

449  {
450  auto i = m_partitions.find(nam);
451  if ( i == m_partitions.end() ) return PARTITION_NOT_PRESENT;
452  if ( i->second.dataManager == m_current.dataManager ) {
453  m_current = Partition();
454  }
455  i->second.dataManager->clearStore().ignore();
456  m_partitions.erase(i);
457  return STATUS::SUCCESS;
458  }
Partitions m_partitions
Datastore partitions.
Partition m_current
Current partition.
list i
Definition: ana.py:128
STATUS MultiStoreSvc::drop ( IInterface pPartition)
inlineoverride

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

Definition at line 461 of file MultiStoreSvc.cpp.

461  {
462  auto provider = SmartIF<IDataProviderSvc>(pPartition);
463  if ( !provider ) return NO_INTERFACE;
464  auto i = std::find_if( std::begin(m_partitions), std::end(m_partitions),
465  [&](Partitions::const_reference p) {
466  return p.second.dataProvider == provider;
467  } );
468  if (i==std::end(m_partitions)) return PARTITION_NOT_PRESENT;
469  i->second.dataManager->clearStore().ignore();
470  m_partitions.erase(i);
471  return STATUS::SUCCESS;
472  }
Partitions m_partitions
Datastore partitions.
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:45
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:47
list i
Definition: ana.py:128
STATUS MultiStoreSvc::finalize ( )
inlineoverride

Service initialisation.

Definition at line 592 of file MultiStoreSvc.cpp.

592  {
593  setDataLoader(nullptr).ignore();
594  clearStore().ignore();
596  m_current = Partition();
597  detachServices();
598  return Service::finalize();
599  }
StatusCode finalize() override
Definition: Service.cpp:188
STATUS detachServices()
STATUS setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
STATUS clearPartitions()
Clear all partitions.
Partition m_current
Current partition.
void ignore() const
Definition: StatusCode.h:108
STATUS clearStore() override
IDataManagerSvc: Remove all data objects in the data store.
STATUS MultiStoreSvc::findObject ( CSTR path,
OBJECT *&  pObj 
)
inlineoverride

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

Definition at line 354 of file MultiStoreSvc.cpp.

354  {
355  return call_<CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, path, pObj);
356  }
list path
Definition: __init__.py:15
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
STATUS MultiStoreSvc::findObject ( IRegistry parent,
CSTR path,
OBJECT *&  pObj 
)
inlineoverride

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

Definition at line 358 of file MultiStoreSvc.cpp.

358  {
359  return call_<IRegistry*,CSTR&,OBJECT*&>( &IDataProviderSvc::findObject, parent, path, pObj);
360  }
list path
Definition: __init__.py:15
virtual StatusCode findObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Find object identified by its directory entry.
STATUS MultiStoreSvc::findObject ( CSTR parent,
CSTR path,
OBJECT *&  pObj 
)
inlineoverride

Find object in the data store.

Definition at line 362 of file MultiStoreSvc.cpp.

362  {
363  return call_<CSTR&,CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, path, pObj);
364  }
list path
Definition: __init__.py:15
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
STATUS MultiStoreSvc::findObject ( CSTR parent,
int  item,
OBJECT *&  pObject 
)
inlineoverride

Find object in the data store.

Definition at line 366 of file MultiStoreSvc.cpp.

366  {
367  return call_<CSTR&,int,OBJECT*&>( &IDataProviderSvc::findObject, parent, item, pObject);
368  }
virtual StatusCode findObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Find object identified by its directory entry.
tuple item
print s1,s2
Definition: ana.py:146
STATUS MultiStoreSvc::findObject ( OBJECT parent,
CSTR path,
OBJECT *&  pObject 
)
inlineoverride

Find object in the data store.

Definition at line 370 of file MultiStoreSvc.cpp.

370  {
371  return call_<OBJECT*,CSTR&,OBJECT*&>( &IDataProviderSvc::findObject, parent, path, pObject);
372  }
list path
Definition: __init__.py:15
virtual StatusCode findObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Find object identified by its directory entry.
STATUS MultiStoreSvc::findObject ( OBJECT parent,
int  item,
OBJECT *&  pObject 
)
inlineoverride

Find object in the data store.

Definition at line 374 of file MultiStoreSvc.cpp.

374  {
375  return call_<OBJECT*,int,OBJECT*&>( &IDataProviderSvc::findObject, parent, item, pObject);
376  }
virtual StatusCode findObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Find object identified by its directory entry.
tuple item
print s1,s2
Definition: ana.py:146
STATUS MultiStoreSvc::get ( CSTR nam,
IInterface *&  pPartition 
) const
inlineoverride

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

Definition at line 500 of file MultiStoreSvc.cpp.

500  {
501  auto i = m_partitions.find(nam);
502  if ( i != m_partitions.end() ) {
503  pPartition = i->second.dataProvider;
504  return STATUS::SUCCESS;
505  }
506  pPartition = nullptr;
507  return PARTITION_NOT_PRESENT;
508  }
Partitions m_partitions
Datastore partitions.
list i
Definition: ana.py:128
STATUS MultiStoreSvc::initialize ( )
inlineoverride

Service initialisation.

Definition at line 554 of file MultiStoreSvc.cpp.

554  {
555  // Nothing to do: just call base class initialisation
557  if ( !sc.isSuccess() ) return sc;
558  sc = makePartitions();
559  if (!sc.isSuccess()) {
560  MsgStream log(msgSvc(), name());
561  log << MSG::ERROR << "Failed to connect to all store partitions." << endmsg;
562  return sc;
563  }
564  return attachServices();
565  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
StatusCode initialize() override
Definition: Service.cpp:63
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
STATUS makePartitions()
Create all partitions according to job options.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
STATUS attachServices()
STATUS MultiStoreSvc::linkObject ( IRegistry from,
CSTR objPath,
OBJECT to 
)
inlineoverride

Add a link to another object.

Definition at line 378 of file MultiStoreSvc.cpp.

378  {
379  return call_<IRegistry*,CSTR&,OBJECT*>( &IDataProviderSvc::linkObject, from, objPath, to);
380  }
virtual StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *toObj)=0
Add a link to another object.
STATUS MultiStoreSvc::linkObject ( CSTR from,
CSTR objPath,
OBJECT to 
)
inlineoverride

Add a link to another object.

Definition at line 382 of file MultiStoreSvc.cpp.

382  {
383  return call_<CSTR&,CSTR&,OBJECT*>( &IDataProviderSvc::linkObject, from, objPath, to);
384  }
virtual StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *toObj)=0
Add a link to another object.
STATUS MultiStoreSvc::linkObject ( OBJECT from,
CSTR objPath,
OBJECT to 
)
inlineoverride

Add a link to another object.

Definition at line 386 of file MultiStoreSvc.cpp.

386  {
387  return call_<OBJECT*,CSTR&,OBJECT*>( &IDataProviderSvc::linkObject, from, objPath, to);
388  }
virtual StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *toObj)=0
Add a link to another object.
STATUS MultiStoreSvc::linkObject ( CSTR fullPath,
OBJECT to 
)
inlineoverride

Add a link to another object.

Definition at line 390 of file MultiStoreSvc.cpp.

390  {
391  return call_<CSTR&,OBJECT*>( &IDataProviderSvc::linkObject, fullPath, to);
392  }
virtual StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *toObj)=0
Add a link to another object.
STATUS MultiStoreSvc::makePartitions ( )
inline

Create all partitions according to job options.

Definition at line 667 of file MultiStoreSvc.cpp.

667  {
668  using Parser = Gaudi::Utils::AttribStringParser;
669  std::string typ, nam;
671  for(auto part: m_partitionDefs) {
672  for(auto attrib: Parser(std::move(part))) {
673  switch( ::toupper(attrib.tag[0]) ) {
674  case 'N':
675  nam = std::move(attrib.value);
676  break;
677  case 'T':
678  typ = std::move(attrib.value);
679  break;
680  }
681  }
682  STATUS sc = create(nam, typ);
683  if ( !sc.isSuccess() ) return sc;
684  if ( m_defaultPartition.empty() ) m_defaultPartition = nam;
685  }
686  return STATUS::SUCCESS;
687  }
PartitionDefs m_partitionDefs
Datastore partition definitions.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
STATUS create(CSTR &nam, CSTR &typ) override
Create a partition object. The name identifies the partition uniquely.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
STATUS clearPartitions()
Clear all partitions.
void ignore() const
Definition: StatusCode.h:108
std::string m_defaultPartition
Default partition.
void toupper(std::string &s)
STATUS MultiStoreSvc::objectLeaves ( const OBJECT pObject,
std::vector< IRegistry * > &  leaves 
)
inlineoverride

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

Definition at line 154 of file MultiStoreSvc.cpp.

154  {
155  return call_<const OBJECT*,std::vector<IRegistry*>&>(&IDataManagerSvc::objectLeaves, pObject, leaves);
156  }
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 ...
STATUS MultiStoreSvc::objectLeaves ( const IRegistry pObject,
std::vector< IRegistry * > &  leaves 
)
inlineoverride

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

Definition at line 158 of file MultiStoreSvc.cpp.

158  {
159  return call_<const IRegistry*,std::vector<IRegistry*>&>( &IDataManagerSvc::objectLeaves, pObject, leaves);
160  }
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 ...
STATUS MultiStoreSvc::objectParent ( const OBJECT pObject,
IRegistry *&  refpParent 
)
inlineoverride

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

Definition at line 162 of file MultiStoreSvc.cpp.

162  {
163  return call_<const OBJECT*, IRegistry*&>( &IDataManagerSvc::objectParent, pObject, refpParent);
164  }
virtual StatusCode objectParent(const DataObject *pObject, IRegistry *&refpParent)=0
IDataManagerSvc: Explore the object store: retrieve the object's parent.
STATUS MultiStoreSvc::objectParent ( const IRegistry pObject,
IRegistry *&  refpParent 
)
inlineoverride

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

Definition at line 166 of file MultiStoreSvc.cpp.

166  {
167  return call_<const IRegistry*, IRegistry*&>( &IDataManagerSvc::objectParent, pObject, refpParent);
168  }
virtual StatusCode objectParent(const DataObject *pObject, IRegistry *&refpParent)=0
IDataManagerSvc: Explore the object store: retrieve the object's parent.
STATUS MultiStoreSvc::preLoad ( )
inlineoverride

load all preload items of the list

Definition at line 282 of file MultiStoreSvc.cpp.

282  {
283  return call_<>( &IDataProviderSvc::preLoad );
284  }
virtual StatusCode preLoad()=0
Load all preload items of the list.
STATUS MultiStoreSvc::preparePartitions ( )
inline

Prepare partition for usage.

Definition at line 624 of file MultiStoreSvc.cpp.

624  {
625  STATUS iret = STATUS::SUCCESS;
626  for(auto& i : m_partitions) {
628  switch ( m_root.type ) {
629  case address_type:
630  if ( m_root.root.address ) {
631  ADDRESS* pAdd = nullptr;
632  ADDRESS* p = m_root.root.address;
634  p->clID(),
635  p->par(),
636  p->ipar(),
637  pAdd);
638  if ( sc.isSuccess() ) {
639  sc = i.second.dataManager->setRoot(m_root.path, pAdd);
640  }
641  }
642  break;
643  case object_type:
644  if ( m_root.root.object ) {
645  if ( m_root.root.object->clID() == CLID_DataObject ) {
646  sc = i.second.dataManager->setRoot(m_root.path, new DataObject());
647  }
648  }
649  break;
650  default:
651  sc = STATUS::FAILURE;
652  break;
653  }
654  if ( !sc.isSuccess() ) iret = sc;
655  }
656  return iret;
657  }
virtual const std::string * par() const =0
Retrieve String parameters.
Partitions m_partitions
Datastore partitions.
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ipar, IOpaqueAddress *&refpAddress)=0
Create a Generic address using explicit arguments to identify a single object.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
virtual long svcType() const =0
Retrieve service type.
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:68
virtual const CLID & clID() const =0
Retrieve class information from link.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
struct MultiStoreSvc::tagROOT m_root
union MultiStoreSvc::tagROOT::@1 root
SmartIF< IAddressCreator > m_addrCreator
Reference to address creator.
Opaque address interface definition.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
list i
Definition: ana.py:128
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
STATUS MultiStoreSvc::registerAddress ( CSTR path,
ADDRESS pAddr 
)
inlineoverride

IDataManagerSvc: Register object address with the data store.

Definition at line 130 of file MultiStoreSvc.cpp.

130  {
131  return call_<CSTR&,ADDRESS*>( &IDataManagerSvc::registerAddress, path, pAddr);
132  }
list path
Definition: __init__.py:15
virtual StatusCode registerAddress(const std::string &fullPath, IOpaqueAddress *pAddress)=0
Register object address with the data store.
STATUS MultiStoreSvc::registerAddress ( OBJECT parent,
CSTR path,
ADDRESS pAddr 
)
inlineoverride

IDataManagerSvc: Register object address with the data store.

Definition at line 134 of file MultiStoreSvc.cpp.

134  {
135  return call_<OBJECT*,CSTR&,ADDRESS*>( &IDataManagerSvc::registerAddress, parent, path, pAddr);
136  }
list path
Definition: __init__.py:15
virtual StatusCode registerAddress(const std::string &fullPath, IOpaqueAddress *pAddress)=0
Register object address with the data store.
STATUS MultiStoreSvc::registerAddress ( IRegistry parent,
CSTR path,
ADDRESS pAdd 
)
inlineoverride

IDataManagerSvc: Register object address with the data store.

Definition at line 138 of file MultiStoreSvc.cpp.

138  {
139  return call_<IRegistry*,CSTR&,ADDRESS*>( &IDataManagerSvc::registerAddress, parent, path, pAdd);
140  }
list path
Definition: __init__.py:15
virtual StatusCode registerAddress(const std::string &fullPath, IOpaqueAddress *pAddress)=0
Register object address with the data store.
STATUS MultiStoreSvc::registerObject ( CSTR path,
OBJECT pObj 
)
inlineoverride

Register object with the data store.

Definition at line 286 of file MultiStoreSvc.cpp.

286  {
287  return registerObject(nullptr, path, pObj);
288  }
list path
Definition: __init__.py:15
STATUS registerObject(CSTR &path, OBJECT *pObj) override
Register object with the data store.
STATUS MultiStoreSvc::registerObject ( CSTR parent,
CSTR obj,
OBJECT pObj 
)
inlineoverride

Register object with the data store.

Definition at line 290 of file MultiStoreSvc.cpp.

290  {
291  return call_<CSTR&,CSTR&,OBJECT*>(&IDataProviderSvc::registerObject, parent,obj,pObj);
292  }
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)=0
Register object with the data store.
STATUS MultiStoreSvc::registerObject ( CSTR parent,
int  item,
OBJECT pObj 
)
inlineoverride

Register object with the data store.

Definition at line 294 of file MultiStoreSvc.cpp.

294  {
295  return call_<CSTR&,int,OBJECT*>( &IDataProviderSvc::registerObject, parent, item, pObj);
296  }
tuple item
print s1,s2
Definition: ana.py:146
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)=0
Register object with the data store.
STATUS MultiStoreSvc::registerObject ( OBJECT parent,
CSTR obj,
OBJECT pObj 
)
inlineoverride

Register object with the data store.

Definition at line 298 of file MultiStoreSvc.cpp.

298  {
299  return call_<OBJECT*,CSTR&,OBJECT*>( &IDataProviderSvc::registerObject, parent, obj, pObj);
300  }
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)=0
Register object with the data store.
STATUS MultiStoreSvc::registerObject ( OBJECT parent,
int  obj,
OBJECT pObj 
)
inlineoverride

Register object with the data store.

Definition at line 302 of file MultiStoreSvc.cpp.

302  {
303  return call_<OBJECT*,int,OBJECT*>( &IDataProviderSvc::registerObject, parent, obj, pObj);
304  }
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)=0
Register object with the data store.
STATUS MultiStoreSvc::reinitialize ( )
inlineoverride

Service initialisation.

Definition at line 568 of file MultiStoreSvc.cpp.

568  {
570  MsgStream log(msgSvc(), name());
571  if (!sc.isSuccess()) {
572  log << MSG::ERROR << "Enable to reinitialize base class"
573  << endmsg;
574  return sc;
575  }
576  detachServices();
577  sc = attachServices();
578  if ( !sc.isSuccess() ) {
579  log << MSG::ERROR << "Failed to attach necessary services." << endmsg;
580  return sc;
581  }
582  sc = makePartitions();
583  if (!sc.isSuccess()) {
584  log << MSG::ERROR << "Failed to connect to store partitions." << endmsg;
585  return sc;
586  }
587  // return
588  return STATUS::SUCCESS;
589  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
STATUS detachServices()
STATUS makePartitions()
Create all partitions according to job options.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
StatusCode reinitialize() override
Definition: Service.cpp:283
STATUS attachServices()
STATUS MultiStoreSvc::removePreLoadItem ( const DataStoreItem item)
inlineoverride

Remove an item from the preload list.

Definition at line 270 of file MultiStoreSvc.cpp.

270  {
271  return call_<const DataStoreItem&>( &IDataProviderSvc::removePreLoadItem, item);
272  }
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.
tuple item
print s1,s2
Definition: ana.py:146
STATUS MultiStoreSvc::removePreLoadItem ( CSTR item)
inlineoverride

Add an item to the preload list.

Definition at line 274 of file MultiStoreSvc.cpp.

274  {
275  return call_<CSTR&>( &IDataProviderSvc::removePreLoadItem, item);
276  }
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.
tuple item
print s1,s2
Definition: ana.py:146
STATUS MultiStoreSvc::resetPreLoad ( )
inlineoverride

Clear the preload list.

Definition at line 278 of file MultiStoreSvc.cpp.

278  {
279  return call_<>( &IDataProviderSvc::resetPreLoad);
280  }
virtual StatusCode resetPreLoad()=0
Clear the preload list.
STATUS MultiStoreSvc::retrieveObject ( IRegistry parent,
CSTR path,
OBJECT *&  pObj 
)
inlineoverride

Retrieve object from data store.

Definition at line 330 of file MultiStoreSvc.cpp.

330  {
331  return call_<IRegistry*,CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, path, pObj);
332  }
list path
Definition: __init__.py:15
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
STATUS MultiStoreSvc::retrieveObject ( CSTR path,
OBJECT *&  pObj 
)
inlineoverride

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

Definition at line 334 of file MultiStoreSvc.cpp.

334  {
335  return call_<CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, path, pObj);
336  }
list path
Definition: __init__.py:15
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
STATUS MultiStoreSvc::retrieveObject ( CSTR parent,
CSTR path,
OBJECT *&  pObj 
)
inlineoverride

Retrieve object from data store.

Definition at line 338 of file MultiStoreSvc.cpp.

338  {
339  return call_<CSTR&,CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, path, pObj);
340  }
list path
Definition: __init__.py:15
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
STATUS MultiStoreSvc::retrieveObject ( CSTR parent,
int  item,
OBJECT *&  pObj 
)
inlineoverride

Retrieve object from data store.

Definition at line 342 of file MultiStoreSvc.cpp.

342  {
343  return call_<CSTR&,int,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, item, pObj);
344  }
tuple item
print s1,s2
Definition: ana.py:146
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
STATUS MultiStoreSvc::retrieveObject ( OBJECT parent,
CSTR path,
OBJECT *&  pObj 
)
inlineoverride

Retrieve object from data store.

Definition at line 346 of file MultiStoreSvc.cpp.

346  {
347  return call_<OBJECT*,CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, path, pObj);
348  }
list path
Definition: __init__.py:15
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
STATUS MultiStoreSvc::retrieveObject ( OBJECT parent,
int  item,
OBJECT *&  pObj 
)
inlineoverride

Retrieve object from data store.

Definition at line 350 of file MultiStoreSvc.cpp.

350  {
351  return call_<OBJECT*,int,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, item, pObj);
352  }
tuple item
print s1,s2
Definition: ana.py:146
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
CLID MultiStoreSvc::rootCLID ( ) const
inlineoverride

IDataManagerSvc: Accessor for root event CLID.

Definition at line 121 of file MultiStoreSvc.cpp.

121  {
122  return m_rootCLID;
123  }
CLID m_rootCLID
Integer Property corresponding to CLID of root entry.
const std::string& MultiStoreSvc::rootName ( ) const
inlineoverride

Name for root Event.

Definition at line 125 of file MultiStoreSvc.cpp.

125  {
126  return m_rootName;
127  }
std::string m_rootName
Name of root event.
STATUS MultiStoreSvc::setDataLoader ( IConversionSvc pDataLoader,
IDataProviderSvc dpsvc = nullptr 
)
inlineoverride

IDataManagerSvc: Pass a default data loader to the service.

Definition at line 253 of file MultiStoreSvc.cpp.

253  {
254  m_dataLoader = pDataLoader;
255  if ( m_dataLoader ) m_dataLoader->setDataProvider(dpsvc ? dpsvc : this);
256  for(auto& i : m_partitions) {
257  i.second.dataManager->setDataLoader(m_dataLoader.get()).ignore();
258  }
259  return SUCCESS;
260  }
Partitions m_partitions
Datastore partitions.
virtual StatusCode setDataProvider(IDataProviderSvc *pService)=0
Set Data provider service.
SmartIF< IConversionSvc > m_dataLoader
Pointer to data loader service.
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
list i
Definition: ana.py:128
STATUS MultiStoreSvc::setRoot ( std::string  path,
OBJECT pObj 
)
inlineoverride

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 211 of file MultiStoreSvc.cpp.

211  {
212  if ( m_root.root.object ) {
213  switch ( m_root.type ) {
214  case address_type:
216  break;
217  case object_type:
219  break;
220  }
221  }
222  m_root.path = std::move(path);
224  m_root.root.object = pObj;
227  }
list path
Definition: __init__.py:15
virtual unsigned long release()=0
release reference to object
STATUS activate(CSTR &nam) override
Activate a partition object. The name identifies the partition uniquely.
struct MultiStoreSvc::tagROOT m_root
union MultiStoreSvc::tagROOT::@1 root
STATUS preparePartitions()
Prepare partition for usage.
virtual unsigned long release()
release reference to object
Definition: DataObject.cpp:56
std::string m_defaultPartition
Default partition.
STATUS MultiStoreSvc::setRoot ( std::string  path,
ADDRESS pAddr 
)
inlineoverride

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 231 of file MultiStoreSvc.cpp.

231  {
232  if ( m_root.root.object ) {
233  switch ( m_root.type ) {
234  case address_type:
236  break;
237  case object_type:
239  break;
240  }
241  }
242  m_root.path = std::move(path);
244  m_root.root.address = pAddr;
245  if ( m_root.root.address ) {
249  }
250  return STATUS::FAILURE;
251  }
list path
Definition: __init__.py:15
virtual unsigned long release()=0
release reference to object
STATUS activate(CSTR &nam) override
Activate a partition object. The name identifies the partition uniquely.
struct MultiStoreSvc::tagROOT m_root
union MultiStoreSvc::tagROOT::@1 root
STATUS preparePartitions()
Prepare partition for usage.
virtual unsigned long release()
release reference to object
Definition: DataObject.cpp:56
std::string m_defaultPartition
Default partition.
virtual unsigned long addRef()=0
Add reference to object.
STATUS MultiStoreSvc::traverseSubTree ( CSTR path,
AGENT pAgent 
)
inlineoverride

Analyze by traversing all data objects below the sub tree.

Definition at line 198 of file MultiStoreSvc.cpp.

198  {
199  return call_<CSTR&,AGENT*>( &IDataManagerSvc::traverseSubTree, path, pAgent);
200  }
list path
Definition: __init__.py:15
virtual StatusCode traverseSubTree(const std::string &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 
)
inlineoverride

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

Definition at line 202 of file MultiStoreSvc.cpp.

202  {
203  return call_<OBJECT*,AGENT*>( &IDataManagerSvc::traverseSubTree, pObject, pAgent);
204  }
virtual StatusCode traverseSubTree(const std::string &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)
inlineoverride

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

Definition at line 206 of file MultiStoreSvc.cpp.

206  {
207  return call_<AGENT*>( &IDataManagerSvc::traverseTree, pAgent);
208  }
virtual StatusCode traverseTree(IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects in the data store.
STATUS MultiStoreSvc::unlinkObject ( IRegistry from,
CSTR objPath 
)
inlineoverride

Remove a link to another object.

Definition at line 394 of file MultiStoreSvc.cpp.

394  {
395  return call_<IRegistry*,CSTR&>( &IDataProviderSvc::unlinkObject, from, objPath);
396  }
virtual StatusCode unlinkObject(IRegistry *from, const std::string &objPath)=0
Remove a link to another object.
STATUS MultiStoreSvc::unlinkObject ( CSTR from,
CSTR objPath 
)
inlineoverride

Remove a link to another object.

Definition at line 398 of file MultiStoreSvc.cpp.

398  {
399  return call_<CSTR&,CSTR&>( &IDataProviderSvc::unlinkObject, from, objPath);
400  }
virtual StatusCode unlinkObject(IRegistry *from, const std::string &objPath)=0
Remove a link to another object.
STATUS MultiStoreSvc::unlinkObject ( OBJECT from,
CSTR objPath 
)
inlineoverride

Remove a link to another object.

Definition at line 402 of file MultiStoreSvc.cpp.

402  {
403  return call_<OBJECT*,CSTR&>( &IDataProviderSvc::unlinkObject, from, objPath);
404  }
virtual StatusCode unlinkObject(IRegistry *from, const std::string &objPath)=0
Remove a link to another object.
STATUS MultiStoreSvc::unlinkObject ( CSTR path)
inlineoverride

Remove a link to another object.

Definition at line 406 of file MultiStoreSvc.cpp.

406  {
407  return call_<CSTR&>( &IDataProviderSvc::unlinkObject, path);
408  }
list path
Definition: __init__.py:15
virtual StatusCode unlinkObject(IRegistry *from, const std::string &objPath)=0
Remove a link to another object.
STATUS MultiStoreSvc::unregisterAddress ( CSTR path)
inlineoverride

IDataManagerSvc: Unregister object address from the data store.

Definition at line 142 of file MultiStoreSvc.cpp.

142  {
143  return call_<CSTR&>( &IDataManagerSvc::unregisterAddress, path);
144  }
list path
Definition: __init__.py:15
virtual StatusCode unregisterAddress(const std::string &fullPath)=0
Unregister object address from the data store.
STATUS MultiStoreSvc::unregisterAddress ( OBJECT pParent,
CSTR path 
)
inlineoverride

IDataManagerSvc: Unregister object address from the data store.

Definition at line 146 of file MultiStoreSvc.cpp.

146  {
147  return call_<OBJECT*,CSTR&>( &IDataManagerSvc::unregisterAddress, pParent, path);
148  }
list path
Definition: __init__.py:15
virtual StatusCode unregisterAddress(const std::string &fullPath)=0
Unregister object address from the data store.
STATUS MultiStoreSvc::unregisterAddress ( IRegistry pParent,
CSTR path 
)
inlineoverride

IDataManagerSvc: Unregister object address from the data store.

Definition at line 150 of file MultiStoreSvc.cpp.

150  {
151  return call_<IRegistry*,CSTR&>( &IDataManagerSvc::unregisterAddress, pParent, path);
152  }
list path
Definition: __init__.py:15
virtual StatusCode unregisterAddress(const std::string &fullPath)=0
Unregister object address from the data store.
STATUS MultiStoreSvc::unregisterObject ( CSTR path)
inlineoverride

Unregister object from the data store.

Definition at line 306 of file MultiStoreSvc.cpp.

306  {
307  return call_<CSTR&>( &IDataProviderSvc::unregisterObject, path);
308  }
list path
Definition: __init__.py:15
virtual StatusCode unregisterObject(const std::string &fullPath)=0
Unregister object from the data store.
STATUS MultiStoreSvc::unregisterObject ( CSTR parent,
CSTR obj 
)
inlineoverride

Unregister object from the data store.

Definition at line 310 of file MultiStoreSvc.cpp.

310  {
311  return call_<CSTR&,CSTR&>( &IDataProviderSvc::unregisterObject, parent, obj);
312  }
virtual StatusCode unregisterObject(const std::string &fullPath)=0
Unregister object from the data store.
STATUS MultiStoreSvc::unregisterObject ( CSTR parent,
int  obj 
)
inlineoverride

Unregister object from the data store.

Definition at line 314 of file MultiStoreSvc.cpp.

314  {
315  return call_<CSTR&,int>( &IDataProviderSvc::unregisterObject, parent, obj);
316  }
virtual StatusCode unregisterObject(const std::string &fullPath)=0
Unregister object from the data store.
STATUS MultiStoreSvc::unregisterObject ( OBJECT pObj)
inlineoverride

Unregister object from the data store.

Definition at line 318 of file MultiStoreSvc.cpp.

318  {
319  return call_<OBJECT*>( &IDataProviderSvc::unregisterObject, pObj);
320  }
virtual StatusCode unregisterObject(const std::string &fullPath)=0
Unregister object from the data store.
STATUS MultiStoreSvc::unregisterObject ( OBJECT pObj,
CSTR path 
)
inlineoverride

Unregister object from the data store.

Definition at line 322 of file MultiStoreSvc.cpp.

322  {
323  return call_<OBJECT*,CSTR&>( &IDataProviderSvc::unregisterObject, pObj, path);
324  }
list path
Definition: __init__.py:15
virtual StatusCode unregisterObject(const std::string &fullPath)=0
Unregister object from the data store.
STATUS MultiStoreSvc::unregisterObject ( OBJECT pObj,
int  item 
)
inlineoverride

Unregister object from the data store.

Definition at line 326 of file MultiStoreSvc.cpp.

326  {
327  return call_<OBJECT*,int>( &IDataProviderSvc::unregisterObject, pObj, item);
328  }
virtual StatusCode unregisterObject(const std::string &fullPath)=0
Unregister object from the data store.
tuple item
print s1,s2
Definition: ana.py:146
STATUS MultiStoreSvc::updateObject ( IRegistry pDirectory)
inlineoverride

Update object identified by its directory entry.

Definition at line 410 of file MultiStoreSvc.cpp.

410  {
411  return call_<IRegistry*>( &IDataProviderSvc::updateObject, pDirectory);
412  }
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
STATUS MultiStoreSvc::updateObject ( CSTR path)
inlineoverride

Update object.

Definition at line 414 of file MultiStoreSvc.cpp.

414  {
415  return call_<CSTR&>( &IDataProviderSvc::updateObject, path);
416  }
list path
Definition: __init__.py:15
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
STATUS MultiStoreSvc::updateObject ( OBJECT pObj)
inlineoverride

Update object.

Definition at line 418 of file MultiStoreSvc.cpp.

418  {
419  return call_<OBJECT*>( &IDataProviderSvc::updateObject, pObj);
420  }
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
STATUS MultiStoreSvc::updateObject ( CSTR parent,
CSTR updatePath 
)
inlineoverride

Update object.

Definition at line 422 of file MultiStoreSvc.cpp.

422  {
423  return call_<CSTR&,CSTR&>( &IDataProviderSvc::updateObject, parent, updatePath);
424  }
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
STATUS MultiStoreSvc::updateObject ( OBJECT parent,
CSTR updatePath 
)
inlineoverride

Update object.

Definition at line 426 of file MultiStoreSvc.cpp.

426  {
427  return call_<OBJECT*,CSTR&>( &IDataProviderSvc::updateObject, parent, updatePath);
428  }
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 84 of file MultiStoreSvc.cpp.

Partition MultiStoreSvc::m_current
protected

Current partition.

Definition at line 97 of file MultiStoreSvc.cpp.

SmartIF<IConversionSvc> MultiStoreSvc::m_dataLoader
protected

Pointer to data loader service.

Definition at line 82 of file MultiStoreSvc.cpp.

std::string MultiStoreSvc::m_defaultPartition
protected

Default partition.

Definition at line 103 of file MultiStoreSvc.cpp.

std::string MultiStoreSvc::m_loader
protected

Data loader name.

Definition at line 80 of file MultiStoreSvc.cpp.

PartitionDefs MultiStoreSvc::m_partitionDefs
protected

Datastore partition definitions.

Definition at line 101 of file MultiStoreSvc.cpp.

Partitions MultiStoreSvc::m_partitions
protected

Datastore partitions.

Definition at line 99 of file MultiStoreSvc.cpp.

struct MultiStoreSvc::tagROOT MultiStoreSvc::m_root
protected
CLID MultiStoreSvc::m_rootCLID
protected

Integer Property corresponding to CLID of root entry.

Definition at line 76 of file MultiStoreSvc.cpp.

std::string MultiStoreSvc::m_rootName
protected

Name of root event.

Definition at line 78 of file MultiStoreSvc.cpp.


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