The Gaudi Framework  v29r0 (ff2e7097)
HiveWhiteBoard Class Reference

Data service base class. More...

Inheritance diagram for HiveWhiteBoard:
Collaboration diagram for HiveWhiteBoard:

Public Member Functions

CLID rootCLID () const override
 IDataManagerSvc: Accessor for root event CLID. More...
 
const std::stringrootName () const override
 Name for root Event. More...
 
StatusCode registerAddress (const std::string &path, IOpaqueAddress *pAddr) override
 IDataManagerSvc: Register object address with the data store. More...
 
StatusCode registerAddress (DataObject *parent, const std::string &path, IOpaqueAddress *pAddr) override
 IDataManagerSvc: Register object address with the data store. More...
 
StatusCode registerAddress (IRegistry *parent, const std::string &path, IOpaqueAddress *pAdd) override
 IDataManagerSvc: Register object address with the data store. More...
 
StatusCode unregisterAddress (const std::string &path) override
 IDataManagerSvc: Unregister object address from the data store. More...
 
StatusCode unregisterAddress (DataObject *pParent, const std::string &path) override
 IDataManagerSvc: Unregister object address from the data store. More...
 
StatusCode unregisterAddress (IRegistry *pParent, const std::string &path) override
 IDataManagerSvc: Unregister object address from the data store. More...
 
StatusCode objectLeaves (const DataObject *pObject, std::vector< IRegistry * > &leaves) override
 Explore the object store: retrieve all leaves attached to the object. More...
 
StatusCode objectLeaves (const IRegistry *pObject, std::vector< IRegistry * > &leaves) override
 Explore the object store: retrieve all leaves attached to the object. More...
 
StatusCode objectParent (const DataObject *pObject, IRegistry *&refpParent) override
 IDataManagerSvc: Explore the object store: retrieve the object's parent. More...
 
StatusCode objectParent (const IRegistry *pObject, IRegistry *&refpParent) override
 IDataManagerSvc: Explore the object store: retrieve the object's parent. More...
 
StatusCode clearSubTree (const std::string &path) override
 Remove all data objects below the sub tree identified. More...
 
StatusCode clearSubTree (DataObject *pObject) override
 Remove all data objects below the sub tree identified. More...
 
StatusCode clearStore () override
 IDataManagerSvc: Remove all data objects in the data store. More...
 
StatusCode traverseSubTree (const std::string &path, IDataStoreAgent *pAgent) override
 Analyze by traversing all data objects below the sub tree. More...
 
StatusCode traverseSubTree (DataObject *pObject, IDataStoreAgent *pAgent) override
 IDataManagerSvc: Analyze by traversing all data objects below the sub tree. More...
 
StatusCode traverseTree (IDataStoreAgent *pAgent) override
 IDataManagerSvc: Analyze by traversing all data objects in the data store. More...
 
StatusCode setRoot (std::string path, DataObject *pObj) override
 Initialize data store for new event by giving new event path and root object. More...
 
StatusCode setRoot (std::string path, IOpaqueAddress *pAddr) override
 Initialize data store for new event by giving new event path and address of root object. More...
 
StatusCode setDataLoader (IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc __attribute__((unused))=nullptr) override
 IDataManagerSvc: Pass a default data loader to the service. More...
 
StatusCode addPreLoadItem (const DataStoreItem &item) override
 Add an item to the preload list. More...
 
StatusCode addPreLoadItem (const std::string &item) override
 Add an item to the preload list. More...
 
StatusCode removePreLoadItem (const DataStoreItem &item) override
 Remove an item from the preload list. More...
 
StatusCode removePreLoadItem (const std::string &item) override
 Add an item to the preload list. More...
 
StatusCode resetPreLoad () override
 Clear the preload list. More...
 
StatusCode preLoad () override
 load all preload items of the list More...
 
StatusCode registerObject (const std::string &path, DataObject *pObj) override
 Register object with the data store. (The most common one is the only monitored one for the time being....) More...
 
StatusCode registerObject (const std::string &parent, const std::string &obj, DataObject *pObj) override
 Register object with the data store. More...
 
StatusCode registerObject (const std::string &parent, int item, DataObject *pObj) override
 Register object with the data store. More...
 
StatusCode registerObject (DataObject *parent, const std::string &obj, DataObject *pObj) override
 Register object with the data store. More...
 
StatusCode registerObject (DataObject *parent, int obj, DataObject *pObj) override
 Register object with the data store. More...
 
StatusCode unregisterObject (const std::string &path) override
 Unregister object from the data store. More...
 
StatusCode unregisterObject (const std::string &parent, const std::string &obj) override
 Unregister object from the data store. More...
 
StatusCode unregisterObject (const std::string &parent, int obj) override
 Unregister object from the data store. More...
 
StatusCode unregisterObject (DataObject *pObj) override
 Unregister object from the data store. More...
 
StatusCode unregisterObject (DataObject *pObj, const std::string &path) override
 Unregister object from the data store. More...
 
StatusCode unregisterObject (DataObject *pObj, int item) override
 Unregister object from the data store. More...
 
StatusCode retrieveObject (IRegistry *parent, const std::string &path, DataObject *&pObj) override
 Retrieve object from data store. More...
 
StatusCode retrieveObject (const std::string &path, DataObject *&pObj) override
 Retrieve object identified by its full path from the data store. More...
 
StatusCode retrieveObject (const std::string &parent, const std::string &path, DataObject *&pObj) override
 Retrieve object from data store. More...
 
StatusCode retrieveObject (const std::string &parent, int item, DataObject *&pObj) override
 Retrieve object from data store. More...
 
StatusCode retrieveObject (DataObject *parent, const std::string &path, DataObject *&pObj) override
 Retrieve object from data store. More...
 
StatusCode retrieveObject (DataObject *parent, int item, DataObject *&pObj) override
 Retrieve object from data store. More...
 
StatusCode findObject (const std::string &path, DataObject *&pObj) override
 Find object identified by its full path in the data store. More...
 
StatusCode findObject (IRegistry *parent, const std::string &path, DataObject *&pObj) override
 Find object identified by its full path in the data store. More...
 
StatusCode findObject (const std::string &parent, const std::string &path, DataObject *&pObj) override
 Find object in the data store. More...
 
StatusCode findObject (const std::string &parent, int item, DataObject *&pObject) override
 Find object in the data store. More...
 
StatusCode findObject (DataObject *parent, const std::string &path, DataObject *&pObject) override
 Find object in the data store. More...
 
StatusCode findObject (DataObject *parent, int item, DataObject *&pObject) override
 Find object in the data store. More...
 
StatusCode linkObject (IRegistry *from, const std::string &objPath, DataObject *to) override
 Add a link to another object. More...
 
StatusCode linkObject (const std::string &from, const std::string &objPath, DataObject *to) override
 Add a link to another object. More...
 
StatusCode linkObject (DataObject *from, const std::string &objPath, DataObject *to) override
 Add a link to another object. More...
 
StatusCode linkObject (const std::string &fullPath, DataObject *to) override
 Add a link to another object. More...
 
StatusCode unlinkObject (IRegistry *from, const std::string &objPath) override
 Remove a link to another object. More...
 
StatusCode unlinkObject (const std::string &from, const std::string &objPath) override
 Remove a link to another object. More...
 
StatusCode unlinkObject (DataObject *from, const std::string &objPath) override
 Remove a link to another object. More...
 
StatusCode unlinkObject (const std::string &path) override
 Remove a link to another object. More...
 
StatusCode updateObject (IRegistry *pDirectory) override
 Update object identified by its directory entry. More...
 
StatusCode updateObject (const std::string &path) override
 Update object. More...
 
StatusCode updateObject (DataObject *pObj) override
 Update object. More...
 
StatusCode updateObject (const std::string &parent, const std::string &updatePath) override
 Update object. More...
 
StatusCode updateObject (DataObject *parent, const std::string &updatePath) override
 Update object. More...
 
StatusCode clearStore (size_t partition) override
 Remove all data objects in one 'slot' of the data store. More...
 
StatusCode selectStore (size_t partition) override
 Activate a partition object. The identifies the partition uniquely. More...
 
StatusCode setNumberOfStores (size_t slots) override
 Set the number of event slots (copies of DataSvc objects). More...
 
size_t getNumberOfStores () const override
 Get the number of event slots (copies of DataSvc objects). More...
 
StatusCode getNewDataObjects (DataObjIDColl &products) override
 Get the list of new DataObjects in the current store. More...
 
bool newDataObjectsPresent () override
 Check if new DataObjects are in the current store. More...
 
size_t allocateStore (int evtnumber) override
 Allocate a store partition for a given event number. More...
 
StatusCode freeStore (size_t partition) override
 Free a store partition. More...
 
size_t getPartitionNumber (int eventnumber) const override
 Get the partition number corresponding to a given event. More...
 
StatusCode attachServices ()
 
StatusCode detachServices ()
 
StatusCode initialize () override
 Service initialisation. More...
 
StatusCode reinitialize () override
 Service initialisation. More...
 
StatusCode finalize () override
 Service initialisation. More...
 
virtual ~HiveWhiteBoard ()
 Standard Destructor. More...
 
- Public Member Functions inherited from extends< Service, IDataProviderSvc, IDataManagerSvc, IHiveWhiteBoard >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
 ~extends () override=default
 Virtual destructor. More...
 
- Public Member Functions inherited from Service
const std::stringname () const override
 Retrieve name of the service. More...
 
StatusCode configure () override
 
StatusCode initialize () override
 
StatusCode start () override
 
StatusCode stop () override
 
StatusCode finalize () override
 
StatusCode terminate () override
 
Gaudi::StateMachine::State FSMState () const override
 
Gaudi::StateMachine::State targetFSMState () const override
 
StatusCode reinitialize () override
 
StatusCode restart () override
 
StatusCode sysInitialize () override
 Initialize Service. More...
 
StatusCode sysStart () override
 Initialize Service. More...
 
StatusCode sysStop () override
 Initialize Service. More...
 
StatusCode sysFinalize () override
 Finalize Service. More...
 
StatusCode sysReinitialize () override
 Re-initialize the Service. More...
 
StatusCode sysRestart () override
 Re-initialize the Service. More...
 
 Service (std::string name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. More...
 
template<class T >
StatusCode service (const std::string &name, const T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<typename IFace = IService>
SmartIF< IFace > service (const std::string &name, bool createIf=true) const
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
 Declare used tool. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 PropertyHolder ()=default
 
 ~PropertyHolder () override=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none") const
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p) override
 set the property form another property More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 set the property from name and the value More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (const std::string &name) const override
 get the property by name More...
 
StatusCode getProperty (const std::string &n, std::string &v) const override
 convert the property to the string More...
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties More...
 
bool hasProperty (const std::string &name) const override
 Return true if we have a property with the given name. More...
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none")
 Specializations for various GaudiHandles. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none")
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, DataObjectHandleBase &ref, const std::string &doc="none")
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level 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< Partition > Partitions
 

Protected Attributes

Gaudi::Property< CLIDm_rootCLID {this, "RootCLID", 110 , "CLID of root entry"}
 
Gaudi::Property< std::stringm_rootName {this, "RootName", "/Event", "name of root entry"}
 
Gaudi::Property< std::stringm_loader {this, "DataLoader", "EventPersistencySvc", ""}
 
Gaudi::Property< int > m_slots {this, "EventSlots", 1, "number of event slots"}
 
Gaudi::Property< bool > m_forceLeaves {this, "ForceLeaves", false, "force creation of default leaves on registerObject"}
 
Gaudi::Property< bool > m_enableFaultHdlr
 
IConversionSvcm_dataLoader = nullptr
 Pointer to data loader service. More...
 
IAddressCreatorm_addrCreator = nullptr
 Reference to address creator. 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< IAuditorSvcm_pAuditorSvc
 Auditor Service. More...
 

Additional Inherited Members

- Public Types inherited from extends< Service, IDataProviderSvc, IDataManagerSvc, IHiveWhiteBoard >
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...
 
- Protected Member Functions inherited from Service
 ~Service () override
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBaseproperty (const std::string &name) const
 
- Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. 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
Pere Mato
Version
1.0

Definition at line 95 of file HiveWhiteBoard.cpp.

Member Typedef Documentation

typedef std::vector<Partition> HiveWhiteBoard::Partitions
protected

Definition at line 98 of file HiveWhiteBoard.cpp.

Constructor & Destructor Documentation

virtual HiveWhiteBoard::~HiveWhiteBoard ( )
inlinevirtual

Standard Destructor.

Definition at line 627 of file HiveWhiteBoard.cpp.

628  {
629  setDataLoader( 0 ).ignore();
630  resetPreLoad().ignore();
631  clearStore().ignore();
632 
633  for ( Partitions::iterator i = m_partitions.begin(); i != m_partitions.end(); ++i ) {
634  ( *i ).dataManager->release();
635  ( *i ).dataProvider->release();
636  }
638  }
StatusCode setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc __attribute__((unused))=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
StatusCode resetPreLoad() override
Clear the preload list.
T end(T...args)
StatusCode clearStore() override
IDataManagerSvc: Remove all data objects in the data store.
T clear(T...args)
Partitions m_partitions
Datastore partitions.
T begin(T...args)
void ignore() const
Definition: StatusCode.h:109

Member Function Documentation

StatusCode HiveWhiteBoard::addPreLoadItem ( const DataStoreItem item)
inlineoverride

Add an item to the preload list.

Definition at line 233 of file HiveWhiteBoard.cpp.

234  {
235  for ( auto& p : m_partitions ) p.dataProvider->addPreLoadItem( item );
236  return StatusCode::SUCCESS;
237  }
Partitions m_partitions
Datastore partitions.
StatusCode HiveWhiteBoard::addPreLoadItem ( const std::string item)
inlineoverride

Add an item to the preload list.

Definition at line 239 of file HiveWhiteBoard.cpp.

240  {
241  for ( auto& p : m_partitions ) p.dataProvider->addPreLoadItem( item );
242  return StatusCode::SUCCESS;
243  }
Partitions m_partitions
Datastore partitions.
size_t HiveWhiteBoard::allocateStore ( int  evtnumber)
inlineoverride

Allocate a store partition for a given event number.

Definition at line 488 of file HiveWhiteBoard.cpp.

489  {
490  // size_t free = std::string::npos;
491  size_t index = 0;
492  for ( auto& p : m_partitions ) {
493  if ( p.eventNumber == evtnumber ) {
494  error() << "Attempt to allocate a store partition for an event that is still active" << endmsg;
495  return std::string::npos;
496  } else if ( p.eventNumber == -1 ) {
497  p.eventNumber = evtnumber;
498  // info() << "Got allocated slot..." << index << endmsg;
499  return index;
500  }
501  index++;
502  }
503  return std::string::npos;
504  }
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Partitions m_partitions
Datastore partitions.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
StatusCode HiveWhiteBoard::attachServices ( )
inline

Definition at line 525 of file HiveWhiteBoard.cpp.

526  {
527  StatusCode sc = service( m_loader, m_addrCreator, true );
528  if ( !sc.isSuccess() ) {
529  error() << "Failed to retrieve data loader "
530  << "\"" << m_loader << "\"" << endmsg;
531  return sc;
532  }
533  IConversionSvc* dataLoader = 0;
534  sc = service( m_loader, dataLoader, true );
535  if ( !sc.isSuccess() ) {
536  error() << MSG::ERROR << "Failed to retrieve data loader "
537  << "\"" << m_loader << "\"" << endmsg;
538  return sc;
539  }
540  sc = setDataLoader( dataLoader );
541  dataLoader->release();
542  if ( !sc.isSuccess() ) {
543  error() << MSG::ERROR << "Failed to set data loader "
544  << "\"" << m_loader << "\"" << endmsg;
545  return sc;
546  }
547  return sc;
548  }
StatusCode setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc __attribute__((unused))=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
Gaudi::Property< std::string > m_loader
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
virtual unsigned long release()=0
Release Interface instance.
IAddressCreator * m_addrCreator
Reference to address creator.
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
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
StatusCode HiveWhiteBoard::clearStore ( )
inlineoverride

IDataManagerSvc: Remove all data objects in the data store.

Definition at line 185 of file HiveWhiteBoard.cpp.

186  {
187  for ( auto& p : m_partitions ) p.dataManager->clearStore().ignore();
188  return StatusCode::SUCCESS;
189  }
Partitions m_partitions
Datastore partitions.
StatusCode HiveWhiteBoard::clearStore ( size_t  partition)
inlineoverride

Remove all data objects in one 'slot' of the data store.

Definition at line 446 of file HiveWhiteBoard.cpp.

446 { return m_partitions[partition].dataManager->clearStore(); }
T partition(T...args)
Partitions m_partitions
Datastore partitions.
StatusCode HiveWhiteBoard::clearSubTree ( const std::string path)
inlineoverride

Remove all data objects below the sub tree identified.

Definition at line 181 of file HiveWhiteBoard.cpp.

181 { _CALL( dataManager, clearSubTree, ( path ) ); }
#define _CALL(P, F, ARGS)
StatusCode clearSubTree(const std::string &path) override
Remove all data objects below the sub tree identified.
StatusCode HiveWhiteBoard::clearSubTree ( DataObject pObject)
inlineoverride

Remove all data objects below the sub tree identified.

Definition at line 183 of file HiveWhiteBoard.cpp.

183 { _CALL( dataManager, clearSubTree, ( pObject ) ); }
#define _CALL(P, F, ARGS)
StatusCode clearSubTree(const std::string &path) override
Remove all data objects below the sub tree identified.
StatusCode HiveWhiteBoard::detachServices ( )
inline

Definition at line 550 of file HiveWhiteBoard.cpp.

551  {
554  m_addrCreator = 0;
555  m_dataLoader = 0;
556  return StatusCode::SUCCESS;
557  }
virtual unsigned long release()=0
Release Interface instance.
IAddressCreator * m_addrCreator
Reference to address creator.
IConversionSvc * m_dataLoader
Pointer to data loader service.
StatusCode HiveWhiteBoard::finalize ( )
inlineoverride

Service initialisation.

Definition at line 616 of file HiveWhiteBoard.cpp.

617  {
618  setDataLoader( 0 ).ignore();
619  clearStore().ignore();
620  return Service::finalize();
621  }
StatusCode setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc __attribute__((unused))=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
StatusCode finalize() override
Definition: Service.cpp:174
StatusCode clearStore() override
IDataManagerSvc: Remove all data objects in the data store.
void ignore() const
Definition: StatusCode.h:109
StatusCode HiveWhiteBoard::findObject ( const std::string path,
DataObject *&  pObj 
)
inlineoverride

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

Definition at line 358 of file HiveWhiteBoard.cpp.

359  {
360  _CALL( dataProvider, retrieveObject, ( path, pObj ) );
361  }
#define _CALL(P, F, ARGS)
StatusCode retrieveObject(IRegistry *parent, const std::string &path, DataObject *&pObj) override
Retrieve object from data store.
StatusCode HiveWhiteBoard::findObject ( IRegistry parent,
const std::string path,
DataObject *&  pObj 
)
inlineoverride

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

Definition at line 363 of file HiveWhiteBoard.cpp.

364  {
365  _CALL( dataProvider, retrieveObject, ( parent, path, pObj ) );
366  }
#define _CALL(P, F, ARGS)
StatusCode retrieveObject(IRegistry *parent, const std::string &path, DataObject *&pObj) override
Retrieve object from data store.
StatusCode HiveWhiteBoard::findObject ( const std::string parent,
const std::string path,
DataObject *&  pObj 
)
inlineoverride

Find object in the data store.

Definition at line 368 of file HiveWhiteBoard.cpp.

369  {
370  _CALL( dataProvider, retrieveObject, ( parent, path, pObj ) );
371  }
#define _CALL(P, F, ARGS)
StatusCode retrieveObject(IRegistry *parent, const std::string &path, DataObject *&pObj) override
Retrieve object from data store.
StatusCode HiveWhiteBoard::findObject ( const std::string parent,
int  item,
DataObject *&  pObject 
)
inlineoverride

Find object in the data store.

Definition at line 373 of file HiveWhiteBoard.cpp.

374  {
375  _CALL( dataProvider, findObject, ( parent, item, pObject ) );
376  }
#define _CALL(P, F, ARGS)
StatusCode findObject(const std::string &path, DataObject *&pObj) override
Find object identified by its full path in the data store.
StatusCode HiveWhiteBoard::findObject ( DataObject parent,
const std::string path,
DataObject *&  pObject 
)
inlineoverride

Find object in the data store.

Definition at line 378 of file HiveWhiteBoard.cpp.

379  {
380  _CALL( dataProvider, findObject, ( parent, path, pObject ) );
381  }
#define _CALL(P, F, ARGS)
StatusCode findObject(const std::string &path, DataObject *&pObj) override
Find object identified by its full path in the data store.
StatusCode HiveWhiteBoard::findObject ( DataObject parent,
int  item,
DataObject *&  pObject 
)
inlineoverride

Find object in the data store.

Definition at line 383 of file HiveWhiteBoard.cpp.

384  {
385  _CALL( dataProvider, findObject, ( parent, item, pObject ) );
386  }
#define _CALL(P, F, ARGS)
StatusCode findObject(const std::string &path, DataObject *&pObj) override
Find object identified by its full path in the data store.
StatusCode HiveWhiteBoard::freeStore ( size_t  partition)
inlineoverride

Free a store partition.

Definition at line 507 of file HiveWhiteBoard.cpp.

508  {
509  m_partitions[partition].eventNumber = -1;
510  // info() << "Freed slot..." << partition << endmsg;
511  return StatusCode::SUCCESS;
512  }
T partition(T...args)
Partitions m_partitions
Datastore partitions.
StatusCode HiveWhiteBoard::getNewDataObjects ( DataObjIDColl products)
inlineoverride

Get the list of new DataObjects in the current store.

Definition at line 470 of file HiveWhiteBoard.cpp.

471  {
472  wbMutex::scoped_lock lock;
473  lock.acquire( s_current->storeMutex );
474  products = s_current->newDataObjects;
475  s_current->newDataObjects.clear();
476  return StatusCode::SUCCESS;
477  }
T lock(T...args)
T clear(T...args)
size_t HiveWhiteBoard::getNumberOfStores ( ) const
inlineoverride

Get the number of event slots (copies of DataSvc objects).

Definition at line 467 of file HiveWhiteBoard.cpp.

467 { return m_slots; }
Gaudi::Property< int > m_slots
size_t HiveWhiteBoard::getPartitionNumber ( int  eventnumber) const
inlineoverride

Get the partition number corresponding to a given event.

Definition at line 515 of file HiveWhiteBoard.cpp.

516  {
517  size_t index{};
518  for ( auto& p : m_partitions ) {
519  if ( p.eventNumber == eventnumber ) return index;
520  ++index;
521  }
522  return std::string::npos;
523  }
Partitions m_partitions
Datastore partitions.
StatusCode HiveWhiteBoard::initialize ( )
inlineoverride

Service initialisation.

Definition at line 564 of file HiveWhiteBoard.cpp.

565  {
567  if ( !sc.isSuccess() ) {
568  error() << "Unable to initialize base class" << endmsg;
569  return sc;
570  }
571 
572  if ( 1 > m_slots ) {
573  error() << "Invalid number of slots (" << m_slots << ")" << endmsg;
574  return StatusCode::FAILURE;
575  }
576 
577  for ( int i = 0; i < m_slots; i++ ) {
578  std::ostringstream oss;
579  oss << name() << "_" << i;
580  DataSvc* svc = new DataSvc( oss.str(), serviceLocator() );
581  // Percolate properties
582  svc->setProperty( m_rootCLID ).ignore();
583  svc->setProperty( m_rootName ).ignore();
584  svc->setProperty( m_forceLeaves ).ignore();
586 
587  sc = svc->initialize();
588  if ( !sc.isSuccess() ) {
589  error() << "Failed to instantiate DataSvc as store partition" << endmsg;
590  return sc;
591  }
592  m_partitions.push_back( Partition( svc, svc ) );
593  }
594  selectStore( 0 ).ignore();
595  return attachServices();
596  }
StatusCode initialize() override
Definition: Service.cpp:64
Gaudi::Property< std::string > m_rootName
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:289
Gaudi::Property< bool > m_enableFaultHdlr
StatusCode setProperty(const Gaudi::Details::PropertyBase &p) override
set the property form another property
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
Gaudi::Property< int > m_slots
StatusCode selectStore(size_t partition) override
Activate a partition object. The identifies the partition uniquely.
T push_back(T...args)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Gaudi::Property< CLID > m_rootCLID
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
StatusCode attachServices()
Partitions m_partitions
Datastore partitions.
Gaudi::Property< bool > m_forceLeaves
StatusCode initialize() override
Service initialization.
Definition: DataSvc.cpp:1119
Data service base class.
Definition: DataSvc.h:44
void ignore() const
Definition: StatusCode.h:109
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:292
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
StatusCode HiveWhiteBoard::linkObject ( IRegistry from,
const std::string objPath,
DataObject to 
)
inlineoverride

Add a link to another object.

Definition at line 388 of file HiveWhiteBoard.cpp.

389  {
390  _CALL( dataProvider, linkObject, ( from, objPath, to ) );
391  }
#define _CALL(P, F, ARGS)
StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *to) override
Add a link to another object.
StatusCode HiveWhiteBoard::linkObject ( const std::string from,
const std::string objPath,
DataObject to 
)
inlineoverride

Add a link to another object.

Definition at line 393 of file HiveWhiteBoard.cpp.

394  {
395  _CALL( dataProvider, linkObject, ( from, objPath, to ) );
396  }
#define _CALL(P, F, ARGS)
StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *to) override
Add a link to another object.
StatusCode HiveWhiteBoard::linkObject ( DataObject from,
const std::string objPath,
DataObject to 
)
inlineoverride

Add a link to another object.

Definition at line 398 of file HiveWhiteBoard.cpp.

399  {
400  _CALL( dataProvider, linkObject, ( from, objPath, to ) );
401  }
#define _CALL(P, F, ARGS)
StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *to) override
Add a link to another object.
StatusCode HiveWhiteBoard::linkObject ( const std::string fullPath,
DataObject to 
)
inlineoverride

Add a link to another object.

Definition at line 403 of file HiveWhiteBoard.cpp.

404  {
405  _CALL( dataProvider, linkObject, ( fullPath, to ) );
406  }
#define _CALL(P, F, ARGS)
StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *to) override
Add a link to another object.
bool HiveWhiteBoard::newDataObjectsPresent ( )
inlineoverride

Check if new DataObjects are in the current store.

Definition at line 480 of file HiveWhiteBoard.cpp.

481  {
482  wbMutex::scoped_lock lock;
483  lock.acquire( s_current->storeMutex );
484  return s_current->newDataObjects.size() != 0;
485  }
T lock(T...args)
StatusCode HiveWhiteBoard::objectLeaves ( const DataObject pObject,
std::vector< IRegistry * > &  leaves 
)
inlineoverride

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

Definition at line 161 of file HiveWhiteBoard.cpp.

162  {
163  _CALL( dataManager, objectLeaves, ( pObject, leaves ) );
164  }
#define _CALL(P, F, ARGS)
StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &leaves) override
Explore the object store: retrieve all leaves attached to the object.
StatusCode HiveWhiteBoard::objectLeaves ( const IRegistry pObject,
std::vector< IRegistry * > &  leaves 
)
inlineoverride

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

Definition at line 166 of file HiveWhiteBoard.cpp.

167  {
168  _CALL( dataManager, objectLeaves, ( pObject, leaves ) );
169  }
#define _CALL(P, F, ARGS)
StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &leaves) override
Explore the object store: retrieve all leaves attached to the object.
StatusCode HiveWhiteBoard::objectParent ( const DataObject pObject,
IRegistry *&  refpParent 
)
inlineoverride

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

Definition at line 171 of file HiveWhiteBoard.cpp.

172  {
173  _CALL( dataManager, objectParent, ( pObject, refpParent ) );
174  }
#define _CALL(P, F, ARGS)
StatusCode objectParent(const DataObject *pObject, IRegistry *&refpParent) override
IDataManagerSvc: Explore the object store: retrieve the object&#39;s parent.
StatusCode HiveWhiteBoard::objectParent ( const IRegistry pObject,
IRegistry *&  refpParent 
)
inlineoverride

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

Definition at line 176 of file HiveWhiteBoard.cpp.

177  {
178  _CALL( dataManager, objectParent, ( pObject, refpParent ) );
179  }
#define _CALL(P, F, ARGS)
StatusCode objectParent(const DataObject *pObject, IRegistry *&refpParent) override
IDataManagerSvc: Explore the object store: retrieve the object&#39;s parent.
StatusCode HiveWhiteBoard::preLoad ( )
inlineoverride

load all preload items of the list

Definition at line 263 of file HiveWhiteBoard.cpp.

264  {
265  wbMutex::scoped_lock lock;
266  lock.acquire( s_current->storeMutex );
267  StatusCode sc = s_current->dataProvider->preLoad();
268  DataAgent da( s_current->newDataObjects );
269  s_current->dataManager->traverseTree( &da );
270  return sc;
271  }
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
T lock(T...args)
StatusCode HiveWhiteBoard::registerAddress ( const std::string path,
IOpaqueAddress pAddr 
)
inlineoverride

IDataManagerSvc: Register object address with the data store.

Definition at line 131 of file HiveWhiteBoard.cpp.

132  {
133  _CALL( dataManager, registerAddress, ( path, pAddr ) );
134  }
StatusCode registerAddress(const std::string &path, IOpaqueAddress *pAddr) override
IDataManagerSvc: Register object address with the data store.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::registerAddress ( DataObject parent,
const std::string path,
IOpaqueAddress pAddr 
)
inlineoverride

IDataManagerSvc: Register object address with the data store.

Definition at line 136 of file HiveWhiteBoard.cpp.

137  {
138  _CALL( dataManager, registerAddress, ( parent, path, pAddr ) );
139  }
StatusCode registerAddress(const std::string &path, IOpaqueAddress *pAddr) override
IDataManagerSvc: Register object address with the data store.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::registerAddress ( IRegistry parent,
const std::string path,
IOpaqueAddress pAdd 
)
inlineoverride

IDataManagerSvc: Register object address with the data store.

Definition at line 141 of file HiveWhiteBoard.cpp.

142  {
143  _CALL( dataManager, registerAddress, ( parent, path, pAdd ) );
144  }
StatusCode registerAddress(const std::string &path, IOpaqueAddress *pAddr) override
IDataManagerSvc: Register object address with the data store.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::registerObject ( const std::string path,
DataObject pObj 
)
inlineoverride

Register object with the data store. (The most common one is the only monitored one for the time being....)

Definition at line 273 of file HiveWhiteBoard.cpp.

274  {
275  wbMutex::scoped_lock lock;
276  lock.acquire( s_current->storeMutex );
277  StatusCode sc = s_current->dataProvider->registerObject( path, pObj );
278  if ( sc.isSuccess() ) {
279  s_current->newDataObjects.insert( DataObjID( path ) );
280  }
281  return sc;
282  }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
T lock(T...args)
StatusCode HiveWhiteBoard::registerObject ( const std::string parent,
const std::string obj,
DataObject pObj 
)
inlineoverride

Register object with the data store.

Definition at line 284 of file HiveWhiteBoard.cpp.

285  {
286  _CALL( dataProvider, registerObject, ( parent, obj, pObj ) );
287  }
StatusCode registerObject(const std::string &path, DataObject *pObj) override
Register object with the data store. (The most common one is the only monitored one for the time bein...
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::registerObject ( const std::string parent,
int  item,
DataObject pObj 
)
inlineoverride

Register object with the data store.

Definition at line 289 of file HiveWhiteBoard.cpp.

290  {
291  _CALL( dataProvider, registerObject, ( parent, item, pObj ) );
292  }
StatusCode registerObject(const std::string &path, DataObject *pObj) override
Register object with the data store. (The most common one is the only monitored one for the time bein...
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::registerObject ( DataObject parent,
const std::string obj,
DataObject pObj 
)
inlineoverride

Register object with the data store.

Definition at line 294 of file HiveWhiteBoard.cpp.

295  {
296  _CALL( dataProvider, registerObject, ( parent, obj, pObj ) );
297  }
StatusCode registerObject(const std::string &path, DataObject *pObj) override
Register object with the data store. (The most common one is the only monitored one for the time bein...
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::registerObject ( DataObject parent,
int  obj,
DataObject pObj 
)
inlineoverride

Register object with the data store.

Definition at line 299 of file HiveWhiteBoard.cpp.

300  {
301  _CALL( dataProvider, registerObject, ( parent, obj, pObj ) );
302  }
StatusCode registerObject(const std::string &path, DataObject *pObj) override
Register object with the data store. (The most common one is the only monitored one for the time bein...
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::reinitialize ( )
inlineoverride

Service initialisation.

Definition at line 599 of file HiveWhiteBoard.cpp.

600  {
602  if ( !sc.isSuccess() ) {
603  error() << "Unable to reinitialize base class" << endmsg;
604  return sc;
605  }
606  detachServices();
607  sc = attachServices();
608  if ( !sc.isSuccess() ) {
609  error() << "Failed to attach necessary services." << endmsg;
610  return sc;
611  }
612  return StatusCode::SUCCESS;
613  }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
StatusCode detachServices()
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
StatusCode reinitialize() override
Definition: Service.cpp:250
StatusCode attachServices()
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
StatusCode HiveWhiteBoard::removePreLoadItem ( const DataStoreItem item)
inlineoverride

Remove an item from the preload list.

Definition at line 245 of file HiveWhiteBoard.cpp.

246  {
247  for ( auto& p : m_partitions ) p.dataProvider->removePreLoadItem( item );
248  return StatusCode::SUCCESS;
249  }
Partitions m_partitions
Datastore partitions.
StatusCode HiveWhiteBoard::removePreLoadItem ( const std::string item)
inlineoverride

Add an item to the preload list.

Definition at line 251 of file HiveWhiteBoard.cpp.

252  {
253  for ( auto& p : m_partitions ) p.dataProvider->removePreLoadItem( item );
254  return StatusCode::SUCCESS;
255  }
Partitions m_partitions
Datastore partitions.
StatusCode HiveWhiteBoard::resetPreLoad ( )
inlineoverride

Clear the preload list.

Definition at line 257 of file HiveWhiteBoard.cpp.

258  {
259  for ( auto& p : m_partitions ) p.dataProvider->resetPreLoad();
260  return StatusCode::SUCCESS;
261  }
Partitions m_partitions
Datastore partitions.
StatusCode HiveWhiteBoard::retrieveObject ( IRegistry parent,
const std::string path,
DataObject *&  pObj 
)
inlineoverride

Retrieve object from data store.

Definition at line 328 of file HiveWhiteBoard.cpp.

329  {
330  _CALL( dataProvider, retrieveObject, ( parent, path, pObj ) );
331  }
#define _CALL(P, F, ARGS)
StatusCode retrieveObject(IRegistry *parent, const std::string &path, DataObject *&pObj) override
Retrieve object from data store.
StatusCode HiveWhiteBoard::retrieveObject ( const std::string path,
DataObject *&  pObj 
)
inlineoverride

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

Definition at line 333 of file HiveWhiteBoard.cpp.

334  {
335  _CALL( dataProvider, retrieveObject, ( path, pObj ) );
336  }
#define _CALL(P, F, ARGS)
StatusCode retrieveObject(IRegistry *parent, const std::string &path, DataObject *&pObj) override
Retrieve object from data store.
StatusCode HiveWhiteBoard::retrieveObject ( const std::string parent,
const std::string path,
DataObject *&  pObj 
)
inlineoverride

Retrieve object from data store.

Definition at line 338 of file HiveWhiteBoard.cpp.

339  {
340  _CALL( dataProvider, retrieveObject, ( parent, path, pObj ) );
341  }
#define _CALL(P, F, ARGS)
StatusCode retrieveObject(IRegistry *parent, const std::string &path, DataObject *&pObj) override
Retrieve object from data store.
StatusCode HiveWhiteBoard::retrieveObject ( const std::string parent,
int  item,
DataObject *&  pObj 
)
inlineoverride

Retrieve object from data store.

Definition at line 343 of file HiveWhiteBoard.cpp.

344  {
345  _CALL( dataProvider, retrieveObject, ( parent, item, pObj ) );
346  }
#define _CALL(P, F, ARGS)
StatusCode retrieveObject(IRegistry *parent, const std::string &path, DataObject *&pObj) override
Retrieve object from data store.
StatusCode HiveWhiteBoard::retrieveObject ( DataObject parent,
const std::string path,
DataObject *&  pObj 
)
inlineoverride

Retrieve object from data store.

Definition at line 348 of file HiveWhiteBoard.cpp.

349  {
350  _CALL( dataProvider, retrieveObject, ( parent, path, pObj ) );
351  }
#define _CALL(P, F, ARGS)
StatusCode retrieveObject(IRegistry *parent, const std::string &path, DataObject *&pObj) override
Retrieve object from data store.
StatusCode HiveWhiteBoard::retrieveObject ( DataObject parent,
int  item,
DataObject *&  pObj 
)
inlineoverride

Retrieve object from data store.

Definition at line 353 of file HiveWhiteBoard.cpp.

354  {
355  _CALL( dataProvider, retrieveObject, ( parent, item, pObj ) );
356  }
#define _CALL(P, F, ARGS)
StatusCode retrieveObject(IRegistry *parent, const std::string &path, DataObject *&pObj) override
Retrieve object from data store.
CLID HiveWhiteBoard::rootCLID ( ) const
inlineoverride

IDataManagerSvc: Accessor for root event CLID.

Definition at line 117 of file HiveWhiteBoard.cpp.

117 { return (CLID)m_rootCLID; }
Gaudi::Property< CLID > m_rootCLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
const std::string& HiveWhiteBoard::rootName ( ) const
inlineoverride

Name for root Event.

Definition at line 119 of file HiveWhiteBoard.cpp.

119 { return m_rootName; }
Gaudi::Property< std::string > m_rootName
StatusCode HiveWhiteBoard::selectStore ( size_t  partition)
inlineoverride

Activate a partition object. The identifies the partition uniquely.

Definition at line 449 of file HiveWhiteBoard.cpp.

450  {
451  s_current = &m_partitions[partition];
452  return StatusCode::SUCCESS;
453  }
T partition(T...args)
Partitions m_partitions
Datastore partitions.
StatusCode HiveWhiteBoard::setDataLoader ( IConversionSvc pDataLoader,
IDataProviderSvc *dpsvc   __attribute__(unused) = nullptr 
)
inlineoverride

IDataManagerSvc: Pass a default data loader to the service.

The optional data provider is not considered. On the other hand, the data provider is specified to be the whiteboard.

Definition at line 218 of file HiveWhiteBoard.cpp.

220  {
221  if ( 0 != pDataLoader ) pDataLoader->addRef();
222  if ( 0 != m_dataLoader ) m_dataLoader->release();
223  if ( 0 != pDataLoader ) {
224  pDataLoader->setDataProvider( this );
225  }
226  m_dataLoader = pDataLoader;
227  for ( auto& p : m_partitions ) {
228  p.dataManager->setDataLoader( m_dataLoader, this ).ignore();
229  }
230  return SUCCESS;
231  }
virtual StatusCode setDataProvider(IDataProviderSvc *pService)=0
Set Data provider service.
Partitions m_partitions
Datastore partitions.
virtual unsigned long release()=0
Release Interface instance.
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
IConversionSvc * m_dataLoader
Pointer to data loader service.
StatusCode HiveWhiteBoard::setNumberOfStores ( size_t  slots)
inlineoverride

Set the number of event slots (copies of DataSvc objects).

Definition at line 456 of file HiveWhiteBoard.cpp.

457  {
458  if ( (int)slots != m_slots and FSMState() == Gaudi::StateMachine::INITIALIZED ) {
459  warning() << "Too late to change the number of slots!" << endmsg;
460  return StatusCode::FAILURE;
461  }
462  m_slots = slots;
463  return StatusCode::SUCCESS;
464  }
Gaudi::Property< int > m_slots
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Gaudi::StateMachine::State FSMState() const override
Definition: Service.h:54
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
StatusCode HiveWhiteBoard::setRoot ( std::string  path,
DataObject 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 205 of file HiveWhiteBoard.cpp.

205 { _CALL( dataManager, setRoot, ( path, pObj ) ); }
#define _CALL(P, F, ARGS)
StatusCode setRoot(std::string path, DataObject *pObj) override
Initialize data store for new event by giving new event path and root object.
StatusCode HiveWhiteBoard::setRoot ( std::string  path,
IOpaqueAddress 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 209 of file HiveWhiteBoard.cpp.

210  {
211  _CALL( dataManager, setRoot, ( path, pAddr ) );
212  }
#define _CALL(P, F, ARGS)
StatusCode setRoot(std::string path, DataObject *pObj) override
Initialize data store for new event by giving new event path and root object.
StatusCode HiveWhiteBoard::traverseSubTree ( const std::string path,
IDataStoreAgent pAgent 
)
inlineoverride

Analyze by traversing all data objects below the sub tree.

Definition at line 192 of file HiveWhiteBoard.cpp.

193  {
194  _CALL( dataManager, traverseSubTree, ( path, pAgent ) );
195  }
StatusCode traverseSubTree(const std::string &path, IDataStoreAgent *pAgent) override
Analyze by traversing all data objects below the sub tree.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::traverseSubTree ( DataObject pObject,
IDataStoreAgent pAgent 
)
inlineoverride

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

Definition at line 197 of file HiveWhiteBoard.cpp.

198  {
199  _CALL( dataManager, traverseSubTree, ( pObject, pAgent ) );
200  }
StatusCode traverseSubTree(const std::string &path, IDataStoreAgent *pAgent) override
Analyze by traversing all data objects below the sub tree.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::traverseTree ( IDataStoreAgent pAgent)
inlineoverride

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

Definition at line 202 of file HiveWhiteBoard.cpp.

202 { _CALL( dataManager, traverseTree, ( pAgent ) ); }
#define _CALL(P, F, ARGS)
StatusCode traverseTree(IDataStoreAgent *pAgent) override
IDataManagerSvc: Analyze by traversing all data objects in the data store.
StatusCode HiveWhiteBoard::unlinkObject ( IRegistry from,
const std::string objPath 
)
inlineoverride

Remove a link to another object.

Definition at line 408 of file HiveWhiteBoard.cpp.

409  {
410  _CALL( dataProvider, unlinkObject, ( from, objPath ) );
411  }
StatusCode unlinkObject(IRegistry *from, const std::string &objPath) override
Remove a link to another object.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::unlinkObject ( const std::string from,
const std::string objPath 
)
inlineoverride

Remove a link to another object.

Definition at line 413 of file HiveWhiteBoard.cpp.

414  {
415  _CALL( dataProvider, unlinkObject, ( from, objPath ) );
416  }
StatusCode unlinkObject(IRegistry *from, const std::string &objPath) override
Remove a link to another object.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::unlinkObject ( DataObject from,
const std::string objPath 
)
inlineoverride

Remove a link to another object.

Definition at line 418 of file HiveWhiteBoard.cpp.

419  {
420  _CALL( dataProvider, unlinkObject, ( from, objPath ) );
421  }
StatusCode unlinkObject(IRegistry *from, const std::string &objPath) override
Remove a link to another object.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::unlinkObject ( const std::string path)
inlineoverride

Remove a link to another object.

Definition at line 423 of file HiveWhiteBoard.cpp.

423 { _CALL( dataProvider, unlinkObject, ( path ) ); }
StatusCode unlinkObject(IRegistry *from, const std::string &objPath) override
Remove a link to another object.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::unregisterAddress ( const std::string path)
inlineoverride

IDataManagerSvc: Unregister object address from the data store.

Definition at line 146 of file HiveWhiteBoard.cpp.

147  {
148  _CALL( dataManager, unregisterAddress, ( path ) );
149  }
StatusCode unregisterAddress(const std::string &path) override
IDataManagerSvc: Unregister object address from the data store.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::unregisterAddress ( DataObject pParent,
const std::string path 
)
inlineoverride

IDataManagerSvc: Unregister object address from the data store.

Definition at line 151 of file HiveWhiteBoard.cpp.

152  {
153  _CALL( dataManager, unregisterAddress, ( pParent, path ) );
154  }
StatusCode unregisterAddress(const std::string &path) override
IDataManagerSvc: Unregister object address from the data store.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::unregisterAddress ( IRegistry pParent,
const std::string path 
)
inlineoverride

IDataManagerSvc: Unregister object address from the data store.

Definition at line 156 of file HiveWhiteBoard.cpp.

157  {
158  _CALL( dataManager, unregisterAddress, ( pParent, path ) );
159  }
StatusCode unregisterAddress(const std::string &path) override
IDataManagerSvc: Unregister object address from the data store.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::unregisterObject ( const std::string path)
inlineoverride

Unregister object from the data store.

Definition at line 304 of file HiveWhiteBoard.cpp.

304 { _CALL( dataProvider, unregisterObject, ( path ) ); }
#define _CALL(P, F, ARGS)
StatusCode unregisterObject(const std::string &path) override
Unregister object from the data store.
StatusCode HiveWhiteBoard::unregisterObject ( const std::string parent,
const std::string obj 
)
inlineoverride

Unregister object from the data store.

Definition at line 306 of file HiveWhiteBoard.cpp.

307  {
308  _CALL( dataProvider, unregisterObject, ( parent, obj ) );
309  }
#define _CALL(P, F, ARGS)
StatusCode unregisterObject(const std::string &path) override
Unregister object from the data store.
StatusCode HiveWhiteBoard::unregisterObject ( const std::string parent,
int  obj 
)
inlineoverride

Unregister object from the data store.

Definition at line 311 of file HiveWhiteBoard.cpp.

312  {
313  _CALL( dataProvider, unregisterObject, ( parent, obj ) );
314  }
#define _CALL(P, F, ARGS)
StatusCode unregisterObject(const std::string &path) override
Unregister object from the data store.
StatusCode HiveWhiteBoard::unregisterObject ( DataObject pObj)
inlineoverride

Unregister object from the data store.

Definition at line 316 of file HiveWhiteBoard.cpp.

316 { _CALL( dataProvider, unregisterObject, ( pObj ) ); }
#define _CALL(P, F, ARGS)
StatusCode unregisterObject(const std::string &path) override
Unregister object from the data store.
StatusCode HiveWhiteBoard::unregisterObject ( DataObject pObj,
const std::string path 
)
inlineoverride

Unregister object from the data store.

Definition at line 318 of file HiveWhiteBoard.cpp.

319  {
320  _CALL( dataProvider, unregisterObject, ( pObj, path ) );
321  }
#define _CALL(P, F, ARGS)
StatusCode unregisterObject(const std::string &path) override
Unregister object from the data store.
StatusCode HiveWhiteBoard::unregisterObject ( DataObject pObj,
int  item 
)
inlineoverride

Unregister object from the data store.

Definition at line 323 of file HiveWhiteBoard.cpp.

324  {
325  _CALL( dataProvider, unregisterObject, ( pObj, item ) );
326  }
#define _CALL(P, F, ARGS)
StatusCode unregisterObject(const std::string &path) override
Unregister object from the data store.
StatusCode HiveWhiteBoard::updateObject ( IRegistry pDirectory)
inlineoverride

Update object identified by its directory entry.

Definition at line 425 of file HiveWhiteBoard.cpp.

425 { _CALL( dataProvider, updateObject, ( pDirectory ) ); }
StatusCode updateObject(IRegistry *pDirectory) override
Update object identified by its directory entry.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::updateObject ( const std::string path)
inlineoverride

Update object.

Definition at line 427 of file HiveWhiteBoard.cpp.

427 { _CALL( dataProvider, updateObject, ( path ) ); }
StatusCode updateObject(IRegistry *pDirectory) override
Update object identified by its directory entry.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::updateObject ( DataObject pObj)
inlineoverride

Update object.

Definition at line 429 of file HiveWhiteBoard.cpp.

429 { _CALL( dataProvider, updateObject, ( pObj ) ); }
StatusCode updateObject(IRegistry *pDirectory) override
Update object identified by its directory entry.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::updateObject ( const std::string parent,
const std::string updatePath 
)
inlineoverride

Update object.

Definition at line 431 of file HiveWhiteBoard.cpp.

432  {
433  _CALL( dataProvider, updateObject, ( parent, updatePath ) );
434  }
StatusCode updateObject(IRegistry *pDirectory) override
Update object identified by its directory entry.
#define _CALL(P, F, ARGS)
StatusCode HiveWhiteBoard::updateObject ( DataObject parent,
const std::string updatePath 
)
inlineoverride

Update object.

Definition at line 436 of file HiveWhiteBoard.cpp.

437  {
438  _CALL( dataProvider, updateObject, ( parent, updatePath ) );
439  }
StatusCode updateObject(IRegistry *pDirectory) override
Update object identified by its directory entry.
#define _CALL(P, F, ARGS)

Member Data Documentation

IAddressCreator* HiveWhiteBoard::m_addrCreator = nullptr
protected

Reference to address creator.

Definition at line 111 of file HiveWhiteBoard.cpp.

IConversionSvc* HiveWhiteBoard::m_dataLoader = nullptr
protected

Pointer to data loader service.

Definition at line 109 of file HiveWhiteBoard.cpp.

Gaudi::Property<bool> HiveWhiteBoard::m_enableFaultHdlr
protected
Initial value:
{this, "EnableFaultHandler", false,
"enable incidents on data creation requests"}

Definition at line 105 of file HiveWhiteBoard.cpp.

Gaudi::Property<bool> HiveWhiteBoard::m_forceLeaves {this, "ForceLeaves", false, "force creation of default leaves on registerObject"}
protected

Definition at line 104 of file HiveWhiteBoard.cpp.

Gaudi::Property<std::string> HiveWhiteBoard::m_loader {this, "DataLoader", "EventPersistencySvc", ""}
protected

Definition at line 102 of file HiveWhiteBoard.cpp.

Partitions HiveWhiteBoard::m_partitions
protected

Datastore partitions.

Definition at line 113 of file HiveWhiteBoard.cpp.

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

Definition at line 100 of file HiveWhiteBoard.cpp.

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

Definition at line 101 of file HiveWhiteBoard.cpp.

Gaudi::Property<int> HiveWhiteBoard::m_slots {this, "EventSlots", 1, "number of event slots"}
protected

Definition at line 103 of file HiveWhiteBoard.cpp.


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