| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Attributes | List of all members
EvtStoreSvc Class Reference

Use a minimal event store implementation, and adds everything required to satisfy the IDataProviderSvc, IDataManagerSvc and IHiveWhiteBoard interfaces by throwing exceptions except when the functionality is really needed... More...

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

## Public Member Functions
CLID | rootCLID () const override
const std::string & | rootName () const override
StatusCode | setDataLoader (IConversionSvc *svc, IDataProviderSvc *dpsvc) override
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 | freeSlots () override
StatusCode | selectStore (size_t partition) override
| Activate a partition object. The identifies the partition uniquely. More...
StatusCode | clearStore () override
StatusCode | clearStore (size_t partition) override
| Remove all data objects in one 'slot' of the data store. More...
StatusCode | setNumberOfStores (size_t slots) override
| Set the number of event slots (copies of DataSvc objects). More...
size_t | getNumberOfStores () const override
size_t | getPartitionNumber (int eventnumber) const override
| Get the partition number corresponding to a given event. More...
bool | exists (const DataObjID &id) override
StatusCode | objectParent (const DataObject *, IRegistry *&) override
StatusCode | objectParent (const IRegistry *, IRegistry *&) override
StatusCode | objectLeaves (const DataObject *, std::vector< IRegistry * > &) override
StatusCode | objectLeaves (const IRegistry *, std::vector< IRegistry * > &) override
StatusCode | clearSubTree (std::string_view) override
StatusCode | clearSubTree (DataObject *obj) override
StatusCode | traverseSubTree (std::string_view, IDataStoreAgent *) override
StatusCode | traverseSubTree (DataObject *obj, IDataStoreAgent *pAgent) override
StatusCode | traverseTree (IDataStoreAgent *pAgent) override
StatusCode | setRoot (std::string root_name, DataObject *pObject) override
StatusCode | setRoot (std::string root_path, IOpaqueAddress *pRootAddr) override
StatusCode | unregisterAddress (std::string_view) override
StatusCode | unregisterAddress (IRegistry *, std::string_view) override
StatusCode | registerAddress (std::string_view fullPath, IOpaqueAddress *pAddress) override
StatusCode | registerAddress (IRegistry *parentObj, std::string_view objectPath, IOpaqueAddress *pAddress) override
StatusCode | registerObject (std::string_view parentPath, std::string_view objectPath, DataObject *pObject) override
StatusCode | registerObject (DataObject *parentObj, std::string_view objectPath, DataObject *pObject) override
StatusCode | unregisterObject (std::string_view) override
StatusCode | unregisterObject (DataObject *obj) override
StatusCode | unregisterObject (DataObject *obj, std::string_view sr) override
StatusCode | retrieveObject (IRegistry *pDirectory, std::string_view path, DataObject *&pObject) override
StatusCode | findObject (IRegistry *pDirectory, std::string_view path, DataObject *&pObject) override
StatusCode | findObject (std::string_view fullPath, DataObject *&pObject) override
StatusCode | updateObject (IRegistry *) override
StatusCode | updateObject (DataObject *) override
StatusCode | addPreLoadItem (const DataStoreItem &) override
StatusCode | removePreLoadItem (const DataStoreItem &) override
StatusCode | resetPreLoad () override
StatusCode | preLoad () override
StatusCode | linkObject (IRegistry *, std::string_view, DataObject *) override
StatusCode | linkObject (std::string_view, DataObject *) override
StatusCode | unlinkObject (IRegistry *, std::string_view) override
StatusCode | unlinkObject (DataObject *, std::string_view) override
StatusCode | unlinkObject (std::string_view) override
StatusCode | initialize () override
StatusCode | finalize () override
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::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
Public Member Functions inherited from Service
const std::string & | name () const override
| Retrieve name of the service. More...
StatusCode | configure () override
StatusCode | initialize () override
StatusCode | start () override
StatusCode | stop () override
StatusCode | finalize () override
StatusCode | terminate () override
Gaudi::StateMachine::State | FSMState () const override
Gaudi::StateMachine::State | targetFSMState () const override
StatusCode | reinitialize () override
StatusCode | restart () override
StatusCode | sysInitialize () override
| Initialize Service. More...
StatusCode | sysStart () override
| Initialize Service. More...
StatusCode | sysStop () override
| Initialize Service. More...
StatusCode | sysFinalize () override
| Finalize Service. More...
StatusCode | sysReinitialize () override
| Re-initialize the Service. More...
StatusCode | sysRestart () override
| Re-initialize the Service. More...
| Service (std::string name, ISvcLocator *svcloc)
| Standard Constructor. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
| Retrieve pointer to service locator. More...
StatusCode | setProperties ()
| Method for setting declared properties to the values specified for the job. More...
template<class T >
StatusCode | service (const std::string &name, const T *&psvc, bool createIf=true) const
| Access a service by name, creating it if it doesn't already exist. More...
template<class T >
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const
template<typename IFace = IService>
SmartIF< IFace > | service (const std::string &name, bool createIf=true) const
template<class T >
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const
| Access a service by name and type, creating it if it doesn't already exist. More...
template<class T >
StatusCode | declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
| Declare used tool. More...
SmartIF< IAuditorSvc > & | auditorSvc () const
| The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| PropertyHolder ()=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
| Helper to wrap a regular data member and use it as a regular property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
| Declare a PropertyBase instance setting name and documentation. More...
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| convert the property to the string More...
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override
| get all properties More...
bool | hasProperty (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (const PropertyHolder &)=delete
Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | msgLevel () const
| get the cached level (originally extracted from the embedded MsgStream) More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const
| Backward compatibility function for getting the output level. More...
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...

## Private Attributes
Gaudi::Property< CLID > | m_rootCLID {this, "RootCLID", 110 , "CLID of root entry"}
Gaudi::Property< std::string > | m_rootName {this, "RootName", "/Event", "name of root entry"}
Gaudi::Property< bool > | m_forceLeaves {this, "ForceLeaves", false, "force creation of default leaves on registerObject"}
Gaudi::Property< std::string > | m_loader {this, "DataLoader", "EventPersistencySvc"}
Gaudi::Property< size_t > | m_slots {this, "EventSlots", 1, "number of event slots"}
SmartIF< IConversionSvc > | m_dataLoader
std::vector< DataStoreItem > | m_preLoads
| Items to be pre-loaded. More...
std::vector< Synced< Partition > > | m_partitions
| The actual store(s) More...
tbb::concurrent_queue< size_t > | m_freeSlots

## 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
using | Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using | PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| Typedef used to refer to this class from derived classes, as in. More...
Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...
Protected Member Functions inherited from Service
| ~Service () override
| Standard Destructor. More...
int | outputLevel () const
| get the `Service's` output level More...
Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | setUpMessaging () const
| Set up local caches. More...
MSG::Level | resetMessaging ()
| Reinitialize internal states. More...
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...
Protected Attributes inherited from Service
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::Property< int > | m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
Gaudi::Property< bool > | m_auditInit {this, "AuditServices", false, " unused"}
Gaudi::Property< bool > | m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
Gaudi::Property< bool > | m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
Gaudi::Property< bool > | m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
Gaudi::Property< bool > | m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
Gaudi::Property< bool > | m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
Gaudi::Property< bool > | m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...

## Detailed Description

Use a minimal event store implementation, and adds everything required to satisfy the IDataProviderSvc, IDataManagerSvc and IHiveWhiteBoard interfaces by throwing exceptions except when the functionality is really needed...

Author
  Gerhard Raven

Version
  1.0

Definition at line 188 of file EvtStoreSvc.cpp.

## Member Function Documentation

## ◆ addPreLoadItem()

StatusCode EvtStoreSvc::addPreLoadItem | ( | const DataStoreItem & | item | ) |
| override

Definition at line 526 of file EvtStoreSvc.cpp.

526 {
527 auto i = std::find( m_preLoads.begin(), m_preLoads.begin(), item );
528 if ( i == m_preLoads.end() ) m_preLoads.push_back( item );
529 return StatusCode::SUCCESS;
530 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
EvtStoreSvc::m_preLoads
std::vector< DataStoreItem > m_preLoads
Items to be pre-loaded.
Definition: EvtStoreSvc.cpp:198
std::vector::end
T end(T... args)
std::vector::push_back
T push_back(T... args)
std::find
T find(T... args)
std::vector::begin
T begin(T... args)

## ◆ allocateStore()

size_t EvtStoreSvc::allocateStore | ( | int | evtnumber | ) |
| override

Allocate a store partition for a given event number.

Definition at line 321 of file EvtStoreSvc.cpp.

321 {
322 // take next free slot in the list
323 size_t slot = std::string::npos;
324 if ( m_freeSlots.try_pop( slot ) ) {
325 assert( slot != std::string::npos );
326 assert( slot < m_partitions.size() );
327 [[maybe_unused]] auto prev = m_partitions[slot].with_lock(
328 [evtnumber]( Partition& p ) { return std::exchange( p.eventNumber, evtnumber ); } );
329 assert( prev == -1 ); // or whatever value represents 'free'
330 }
331 return slot;
332 }
EvtStoreSvc::m_freeSlots
tbb::concurrent_queue< size_t > m_freeSlots
Definition: EvtStoreSvc.cpp:203
std::prev
T prev(T... args)
EvtStoreSvc::m_partitions
std::vector< Synced< Partition > > m_partitions
The actual store(s)
Definition: EvtStoreSvc.cpp:201
std::vector::size
T size(T... args)

## ◆ clearStore() [1/2]

StatusCode EvtStoreSvc::clearStore | ( |  | ) |
| override

Definition at line 380 of file EvtStoreSvc.cpp.

380 {
381 return fwd( []( Partition& p ) {
382 p.store.clear();
383 return StatusCode::SUCCESS;
384 } );
385 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ clearStore() [2/2]

StatusCode EvtStoreSvc::clearStore | ( | size_t | partition | ) |
| override

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

Definition at line 367 of file EvtStoreSvc.cpp.

367 {
368 return m_partitions[partition].with_lock( []( Partition& p ) {
369 p.store.clear();
370 return StatusCode::SUCCESS;
371 } );
372 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
std::partition
T partition(T... args)
EvtStoreSvc::m_partitions
std::vector< Synced< Partition > > m_partitions
The actual store(s)
Definition: EvtStoreSvc.cpp:201

## ◆ clearSubTree() [1/2]

StatusCode EvtStoreSvc::clearSubTree | ( | std::string_view | top | ) |
| override

Definition at line 373 of file EvtStoreSvc.cpp.

373 {
374 top = normalize_path( top, rootName() );
375 return fwd( [&]( Partition& p ) {
376 p.store.erase_if( [top]( const auto& value ) { return boost::algorithm::starts_with( value.first, top ); } );
377 return StatusCode::SUCCESS;
378 } );
379 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
EvtStoreSvc::rootName
const std::string & rootName() const override
Definition: EvtStoreSvc.cpp:314

## ◆ clearSubTree() [2/2]

StatusCode EvtStoreSvc::clearSubTree | ( | DataObject * | obj | ) |
| inline override

Definition at line 232 of file EvtStoreSvc.cpp.

232 {
233 return obj && obj->registry() ? clearSubTree( obj->registry()->identifier() ) : StatusCode::FAILURE;
234 }
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
EvtStoreSvc::clearSubTree
StatusCode clearSubTree(std::string_view) override
Definition: EvtStoreSvc.cpp:373
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
IRegistry::identifier
virtual const id_type & identifier() const =0
Full identifier (or key)

## ◆ exists()

bool EvtStoreSvc::exists | ( | const DataObjID & | id | ) |
| inline override

Definition at line 221 of file EvtStoreSvc.cpp.

221 {
222 DataObject* pObject{nullptr};
223 return findObject( id.fullKey(), pObject ).isSuccess();
224 }
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
EvtStoreSvc::findObject
StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject) override
Definition: EvtStoreSvc.cpp:517

## ◆ finalize()

StatusCode EvtStoreSvc::finalize | ( |  | ) |
| inline override

Definition at line 303 of file EvtStoreSvc.cpp.

303 {
304 setDataLoader( nullptr, nullptr ).ignore(); // release
305 return extends::finalize();
306 }
EvtStoreSvc::setDataLoader
StatusCode setDataLoader(IConversionSvc *svc, IDataProviderSvc *dpsvc) override
Definition: EvtStoreSvc.cpp:315
StatusCode::ignore
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:153

## ◆ findObject() [1/2]

StatusCode EvtStoreSvc::findObject | ( | IRegistry * | pDirectory,
|  | std::string_view | path,
|  | DataObject *& | pObject
| ) |  |
| override

Definition at line 517 of file EvtStoreSvc.cpp.

517 {
518 return retrieveObject( pDirectory, path, pObject );
519 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
EvtStoreSvc::retrieveObject
StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject) override
Definition: EvtStoreSvc.cpp:505

## ◆ findObject() [2/2]

StatusCode EvtStoreSvc::findObject | ( | std::string_view | fullPath,
|  | DataObject *& | pObject
| ) |  |
| override

Definition at line 520 of file EvtStoreSvc.cpp.

520 {
521 return retrieveObject( nullptr, fullPath, pObject );
522 }
EvtStoreSvc::retrieveObject
StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject) override
Definition: EvtStoreSvc.cpp:505

## ◆ freeSlots()

size_t EvtStoreSvc::freeSlots | ( |  | ) |
| inline override

Definition at line 214 of file EvtStoreSvc.cpp.

214 { return m_freeSlots.unsafe_size(); }
EvtStoreSvc::m_freeSlots
tbb::concurrent_queue< size_t > m_freeSlots
Definition: EvtStoreSvc.cpp:203

## ◆ freeStore()

StatusCode EvtStoreSvc::freeStore | ( | size_t | partition | ) |
| override

Free a store partition.

Definition at line 359 of file EvtStoreSvc.cpp.

359 {
360 assert( partition < m_partitions.size() );
361 auto prev = m_partitions[partition].with_lock( []( Partition& p ) { return std::exchange( p.eventNumber, -1 ); } );
362 if ( UNLIKELY( prev == -1 ) ) return StatusCode::FAILURE; // double free -- should never happen!
363 m_freeSlots.push( partition );
364 return StatusCode::SUCCESS;
365 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
EvtStoreSvc::m_freeSlots
tbb::concurrent_queue< size_t > m_freeSlots
Definition: EvtStoreSvc.cpp:203
std::partition
T partition(T... args)
std::prev
T prev(T... args)
EvtStoreSvc::m_partitions
std::vector< Synced< Partition > > m_partitions
The actual store(s)
Definition: EvtStoreSvc.cpp:201
std::vector::size
T size(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86

## ◆ getNumberOfStores()

size_t EvtStoreSvc::getNumberOfStores | ( |  | ) | const
| inline override

Definition at line 219 of file EvtStoreSvc.cpp.

219 { return m_slots; }
EvtStoreSvc::m_slots
Gaudi::Property< size_t > m_slots
Definition: EvtStoreSvc.cpp:193

## ◆ getPartitionNumber()

size_t EvtStoreSvc::getPartitionNumber | ( | int | eventnumber | ) | const
| override

Get the partition number corresponding to a given event.

Definition at line 348 of file EvtStoreSvc.cpp.

348 {
349 auto i = std::find_if( begin( m_partitions ), end( m_partitions ),
350 with_lock( [eventnumber]( const Partition& p ) { return p.eventNumber == eventnumber; } ) );
351 return i != end( m_partitions ) ? std::distance( begin( m_partitions ), i ) : std::string::npos;
352 }
std::distance
T distance(T... args)
std
STL namespace.
EvtStoreSvc::m_partitions
std::vector< Synced< Partition > > m_partitions
The actual store(s)
Definition: EvtStoreSvc.cpp:201
IOTest.end
def end
Definition: IOTest.py:112
std::find_if
T find_if(T... args)
Gaudi::Utils::begin
AttribStringParser::Iterator begin(const AttribStringParser &parser)
Definition: AttribStringParser.h:120

## ◆ initialize()

StatusCode EvtStoreSvc::initialize | ( |  | ) |
| inline override

Definition at line 285 of file EvtStoreSvc.cpp.

285 {
286 Entry::setDataProviderSvc( this );
287 extends::initialize().ignore();
288 if ( !setNumberOfStores( m_slots ).isSuccess() ) {
289 error() << "Cannot set number of slots" << endmsg;
290 return StatusCode::FAILURE;
291 }
292 m_partitions = std::vector<Synced<Partition>>( m_slots );
293 for ( size_t i = 0; i < m_slots; i++ ) { m_freeSlots.push( i ); }
294 selectStore( 0 ).ignore();
295
296 auto loader = serviceLocator()->service( m_loader ).as<IConversionSvc>().get();
297 if ( !loader ) {
298 error() << "Cannot get IConversionSvc " << m_loader.value() << endmsg;
299 return StatusCode::FAILURE;
300 }
301 return setDataLoader( loader, nullptr );
302 }
EvtStoreSvc::setNumberOfStores
StatusCode setNumberOfStores(size_t slots) override
Set the number of event slots (copies of DataSvc objects).
Definition: EvtStoreSvc.cpp:334
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:277
EvtStoreSvc::setDataLoader
StatusCode setDataLoader(IConversionSvc *svc, IDataProviderSvc *dpsvc) override
Definition: EvtStoreSvc.cpp:315
IConversionSvc
Definition: IConversionSvc.h:37
EvtStoreSvc::m_freeSlots
tbb::concurrent_queue< size_t > m_freeSlots
Definition: EvtStoreSvc.cpp:203
EvtStoreSvc::m_loader
Gaudi::Property< std::string > m_loader
Definition: EvtStoreSvc.cpp:192
EvtStoreSvc::m_slots
Gaudi::Property< size_t > m_slots
Definition: EvtStoreSvc.cpp:193
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
EvtStoreSvc::m_partitions
std::vector< Synced< Partition > > m_partitions
The actual store(s)
Definition: EvtStoreSvc.cpp:201
StatusCode::ignore
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:153
EvtStoreSvc::selectStore
StatusCode selectStore(size_t partition) override
Activate a partition object. The identifies the partition uniquely.
Definition: EvtStoreSvc.cpp:354
Gaudi::Functional::details::get
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
Definition: FunctionalDetails.h:332
std::vector
STL class.
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
ReadAndWriteWhiteBoard.loader
loader
Definition: ReadAndWriteWhiteBoard.py:36
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ linkObject() [1/2]

StatusCode EvtStoreSvc::linkObject | ( | IRegistry * | ,
|  | std::string_view | ,
|  | DataObject * |
| ) |  |
| inline override

Definition at line 279 of file EvtStoreSvc.cpp.

279 { return dummy( __FUNCTION__ ); }

## ◆ linkObject() [2/2]

StatusCode EvtStoreSvc::linkObject | ( | std::string_view | ,
|  | DataObject * |
| ) |  |
| inline override

Definition at line 280 of file EvtStoreSvc.cpp.

280 { return dummy( __FUNCTION__ ); }

## ◆ objectLeaves() [1/2]

StatusCode EvtStoreSvc::objectLeaves | ( | const DataObject * | ,
|  | std::vector< IRegistry * > & |
| ) |  |
| inline override

Definition at line 228 of file EvtStoreSvc.cpp.

228 { return dummy( __FUNCTION__ ); }

## ◆ objectLeaves() [2/2]

StatusCode EvtStoreSvc::objectLeaves | ( | const IRegistry * | ,
|  | std::vector< IRegistry * > & |
| ) |  |
| inline override

Definition at line 229 of file EvtStoreSvc.cpp.

229 { return dummy( __FUNCTION__ ); }

## ◆ objectParent() [1/2]

StatusCode EvtStoreSvc::objectParent | ( | const DataObject * | ,
|  | IRegistry *& |
| ) |  |
| inline override

Definition at line 226 of file EvtStoreSvc.cpp.

226 { return dummy( __FUNCTION__ ); }

## ◆ objectParent() [2/2]

StatusCode EvtStoreSvc::objectParent | ( | const IRegistry * | ,
|  | IRegistry *& |
| ) |  |
| inline override

Definition at line 227 of file EvtStoreSvc.cpp.

227 { return dummy( __FUNCTION__ ); }

## ◆ preLoad()

StatusCode EvtStoreSvc::preLoad | ( |  | ) |
| override

Definition at line 536 of file EvtStoreSvc.cpp.

536 {
537 for ( const auto& i : m_preLoads ) {
538 DataObject* pObj;
539 if ( msgLevel( MSG::DEBUG ) ) debug() << "Preloading " << i.path() << endmsg;
540 retrieveObject( nullptr, i.path(), pObj ).ignore();
541 }
542 return StatusCode::SUCCESS;
543 }
MSG::DEBUG
Definition: IMessageSvc.h:15
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
EvtStoreSvc::m_preLoads
std::vector< DataStoreItem > m_preLoads
Items to be pre-loaded.
Definition: EvtStoreSvc.cpp:198
EvtStoreSvc::retrieveObject
StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject) override
Definition: EvtStoreSvc.cpp:505
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ registerAddress() [1/2]

StatusCode EvtStoreSvc::registerAddress | ( | std::string_view | fullPath,
|  | IOpaqueAddress * | pAddress
| ) |  |
| override

Definition at line 440 of file EvtStoreSvc.cpp.

440 {
441 return registerAddress( nullptr, path, pAddr );
442 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
EvtStoreSvc::registerAddress
StatusCode registerAddress(std::string_view fullPath, IOpaqueAddress *pAddress) override
Definition: EvtStoreSvc.cpp:440

## ◆ registerAddress() [2/2]

StatusCode EvtStoreSvc::registerAddress | ( | IRegistry * | parentObj,
|  | std::string_view | objectPath,
|  | IOpaqueAddress * | pAddress
| ) |  |
| override

Definition at line 443 of file EvtStoreSvc.cpp.

443 {
444 auto addr = std::unique_ptr<IOpaqueAddress>( pAddr );
445 if ( msgLevel( MSG::DEBUG ) ) {
446 debug() << "registerAddress( (IRegistry*)" << (void*)pReg << ", " << path << ", (IOpaqueAddress*)" << addr.get()
447 << "[ " << addr->par()[0] << ", " << addr->par()[1] << " ]"
448 << " )" << endmsg;
449 }
450 if ( !addr ) return Status::INVALID_OBJ_ADDR; // Precondition: Address must be valid
451 if ( path.empty() || path[0] != '/' ) return StatusCode::FAILURE;
452 auto object = createObj( *m_dataLoader, *addr ); // Call data loader
453 if ( !object ) return Status::INVALID_OBJECT;
454 auto fullpath = ( pReg ? pReg->identifier() : m_rootName.value() ) + std::string{path};
455 // the data loader expects the path _including_ the root
456 auto dummy = Entry{fullpath, {}, {}};
457 object->setRegistry( &dummy );
458 addr->setRegistry( &dummy );
459 auto status = m_dataLoader->fillObjRefs( addr.get(), object.get() );
460 if ( !status.isSuccess() ) return status;
461 // note: put will overwrite the registry in pObject to point at the
462 // one actually used -- so we do not dangle, pointing at dummy beyond its
463 // lifetime
464 if ( msgLevel( MSG::DEBUG ) ) {
465 debug() << "registerAddress: " << std::quoted( normalize_path( fullpath, rootName() ) ) << " (DataObject*)"
466 << (void*)object.get() << ( object ? " -> " + System::typeinfoName( typeid( *object ) ) : std::string{} )
467 << endmsg;
468 }
469 fwd( [&]( Partition& p ) {
470 p.store.put( normalize_path( fullpath, rootName() ), std::move( object ), std::move( addr ) );
471 return StatusCode::SUCCESS;
472 } ).ignore();
473 return status;
474 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
EvtStoreSvc::m_dataLoader
SmartIF< IConversionSvc > m_dataLoader
Definition: EvtStoreSvc.cpp:195
MSG::DEBUG
Definition: IMessageSvc.h:15
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
std
STL namespace.
EvtStoreSvc::m_rootName
Gaudi::Property< std::string > m_rootName
Definition: EvtStoreSvc.cpp:190
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
std::string
STL class.
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
std::move
T move(T... args)
IConverter::fillObjRefs
virtual StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the created transient object.
Gaudi::Functional::details::get
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
Definition: FunctionalDetails.h:332
std::unique_ptr
STL class.
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
EvtStoreSvc::rootName
const std::string & rootName() const override
Definition: EvtStoreSvc.cpp:314

## ◆ registerObject() [1/2]

StatusCode EvtStoreSvc::registerObject | ( | std::string_view | parentPath,
|  | std::string_view | objectPath,
|  | DataObject * | pObject
| ) |  |
| override

Definition at line 475 of file EvtStoreSvc.cpp.

476 {
477 return parentPath.empty()
478 ? registerObject( nullptr, objectPath, pObject )
479 : registerObject( nullptr, std::string{parentPath}.append( "/" ).append( objectPath ), pObject );
480 }
std
STL namespace.
EvtStoreSvc::registerObject
StatusCode registerObject(std::string_view parentPath, std::string_view objectPath, DataObject *pObject) override
Definition: EvtStoreSvc.cpp:475

## ◆ registerObject() [2/2]

StatusCode EvtStoreSvc::registerObject | ( | DataObject * | parentObj,
|  | std::string_view | objectPath,
|  | DataObject * | pObject
| ) |  |
| override

Definition at line 481 of file EvtStoreSvc.cpp.

481 {
482 if ( parentObj ) return StatusCode::FAILURE;
483 return fwd( [&, object = std::unique_ptr<DataObject>( pObject ),
484 path = normalize_path( path, rootName() )]( Partition& p ) mutable {
485 if ( m_forceLeaves ) {
486 auto dir = path;
487 for ( auto i = dir.rfind( '/' ); i != std::string_view::npos; i = dir.rfind( '/' ) ) {
488 dir = dir.substr( 0, i );
489 if ( !p.store.find( dir ) ) {
490 if ( msgLevel( MSG::DEBUG ) ) {
491 debug() << "registerObject: adding directory " << std::quoted( dir ) << endmsg;
492 }
493 p.store.put( dir, std::unique_ptr<DataObject>{} );
494 }
495 }
496 }
497 if ( msgLevel( MSG::DEBUG ) ) {
498 debug() << "registerObject: " << std::quoted( path ) << " (DataObject*)" << (void*)object.get()
499 << ( object ? " -> " + System::typeinfoName( typeid( *object ) ) : std::string{} ) << endmsg;
500 }
501 p.store.put( path, std::move( object ) );
502 return StatusCode::SUCCESS;
503 } );
504 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
MSG::DEBUG
Definition: IMessageSvc.h:15
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
std
STL namespace.
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
EvtStoreSvc::m_forceLeaves
Gaudi::Property< bool > m_forceLeaves
Definition: EvtStoreSvc.cpp:191
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
std::move
T move(T... args)
Gaudi::Functional::details::get
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
Definition: FunctionalDetails.h:332
std::unique_ptr
STL class.
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
EvtStoreSvc::rootName
const std::string & rootName() const override
Definition: EvtStoreSvc.cpp:314

## ◆ removePreLoadItem()

StatusCode EvtStoreSvc::removePreLoadItem | ( | const DataStoreItem & | item | ) |
| override

Definition at line 531 of file EvtStoreSvc.cpp.

531 {
532 auto i = std::remove( m_preLoads.begin(), m_preLoads.begin(), item );
533 m_preLoads.erase( i, m_preLoads.end() );
534 return StatusCode::SUCCESS;
535 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
EvtStoreSvc::m_preLoads
std::vector< DataStoreItem > m_preLoads
Items to be pre-loaded.
Definition: EvtStoreSvc.cpp:198
std::vector::end
T end(T... args)
std::remove
T remove(T... args)
std::vector::erase
T erase(T... args)
std::vector::begin
T begin(T... args)

## ◆ resetPreLoad()

StatusCode EvtStoreSvc::resetPreLoad | ( |  | ) |
| inline override

Definition at line 273 of file EvtStoreSvc.cpp.

273 {
274 m_preLoads.clear();
275 return StatusCode::SUCCESS;
276 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
EvtStoreSvc::m_preLoads
std::vector< DataStoreItem > m_preLoads
Items to be pre-loaded.
Definition: EvtStoreSvc.cpp:198
std::vector::clear
T clear(T... args)

## ◆ retrieveObject()

StatusCode EvtStoreSvc::retrieveObject | ( | IRegistry * | pDirectory,
|  | std::string_view | path,
|  | DataObject *& | pObject
| ) |  |
| override

Definition at line 505 of file EvtStoreSvc.cpp.

505 {
506 if ( pDirectory ) return StatusCode::FAILURE;
507 return fwd( [&]( Partition& p ) {
508 path = normalize_path( path, rootName() );
509 pObject = const_cast<DataObject*>( p.store.get( path ) );
510 if ( msgLevel( MSG::DEBUG ) ) {
511 debug() << "retrieveObject: " << std::quoted( path ) << " (DataObject*)" << (void*)pObject
512 << ( pObject ? " -> " + System::typeinfoName( typeid( *pObject ) ) : std::string{} ) << endmsg;
513 }
514 return pObject ? StatusCode::SUCCESS : StatusCode::FAILURE;
515 } );
516 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
MSG::DEBUG
Definition: IMessageSvc.h:15
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
std::string
STL class.
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
EvtStoreSvc::rootName
const std::string & rootName() const override
Definition: EvtStoreSvc.cpp:314

## ◆ rootCLID()

CLID EvtStoreSvc::rootCLID | ( |  | ) | const
| override

Definition at line 313 of file EvtStoreSvc.cpp.

313 { return m_rootCLID; }
EvtStoreSvc::m_rootCLID
Gaudi::Property< CLID > m_rootCLID
Definition: EvtStoreSvc.cpp:189

## ◆ rootName()

const std::string & EvtStoreSvc::rootName | ( |  | ) | const
| override

Definition at line 314 of file EvtStoreSvc.cpp.

314 { return m_rootName; }
EvtStoreSvc::m_rootName
Gaudi::Property< std::string > m_rootName
Definition: EvtStoreSvc.cpp:190

## ◆ selectStore()

StatusCode EvtStoreSvc::selectStore | ( | size_t | partition | ) |
| override

Activate a partition object. The identifies the partition uniquely.

Definition at line 354 of file EvtStoreSvc.cpp.

354 {
355 s_current = &m_partitions[partition];
356 return StatusCode::SUCCESS;
357 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
std::partition
T partition(T... args)
EvtStoreSvc::m_partitions
std::vector< Synced< Partition > > m_partitions
The actual store(s)
Definition: EvtStoreSvc.cpp:201

## ◆ setDataLoader()

StatusCode EvtStoreSvc::setDataLoader | ( | IConversionSvc * | svc,
|  | IDataProviderSvc * | dpsvc
| ) |  |
| override

Definition at line 315 of file EvtStoreSvc.cpp.

315 {
316 m_dataLoader = pDataLoader;
317 if ( m_dataLoader ) m_dataLoader->setDataProvider( dpsvc ? dpsvc : this ).ignore();
318 return StatusCode::SUCCESS;
319 }
EvtStoreSvc::m_dataLoader
SmartIF< IConversionSvc > m_dataLoader
Definition: EvtStoreSvc.cpp:195
IConverter::setDataProvider
virtual StatusCode setDataProvider(IDataProviderSvc *pService)=0
Set Data provider service.
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
StatusCode::ignore
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:153

## ◆ setNumberOfStores()

StatusCode EvtStoreSvc::setNumberOfStores | ( | size_t | slots | ) |
| override

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

Definition at line 334 of file EvtStoreSvc.cpp.

334 {
335 if ( slots < size_t{1} ) {
336 error() << "Invalid number of slots (" << slots << ")" << endmsg;
337 return StatusCode::FAILURE;
338 }
339 if ( FSMState() == Gaudi::StateMachine::INITIALIZED || FSMState() == Gaudi::StateMachine::RUNNING ) {
340 error() << "Too late to change the number of slots!" << endmsg;
341 return StatusCode::FAILURE;
342 }
343 m_slots = slots;
344 Gaudi::Concurrency::ConcurrencyFlags::setNumConcEvents( slots );
345 return StatusCode::SUCCESS;
346 }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
Service::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: Service.h:52
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
EvtStoreSvc::m_slots
Gaudi::Property< size_t > m_slots
Definition: EvtStoreSvc.cpp:193
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:16
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
Gaudi::Concurrency::ConcurrencyFlags::setNumConcEvents
static GAUDI_API void setNumConcEvents(const std::size_t &nE)
Definition: ConcurrencyFlags.h:59

## ◆ setRoot() [1/2]

StatusCode EvtStoreSvc::setRoot | ( | std::string | root_name,
|  | DataObject * | pObject
| ) |  |
| override

Definition at line 407 of file EvtStoreSvc.cpp.

407 {
408 if ( msgLevel( MSG::DEBUG ) ) {
409 debug() << "setRoot( " << root_path << ", (DataObject*)" << (void*)pObject << " )" << endmsg;
410 }
411 clearStore().ignore();
412 return registerObject( nullptr, root_path, pObject );
413 }
MSG::DEBUG
Definition: IMessageSvc.h:15
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
EvtStoreSvc::clearStore
StatusCode clearStore() override
Definition: EvtStoreSvc.cpp:380
StatusCode::ignore
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:153
EvtStoreSvc::registerObject
StatusCode registerObject(std::string_view parentPath, std::string_view objectPath, DataObject *pObject) override
Definition: EvtStoreSvc.cpp:475
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ setRoot() [2/2]

StatusCode EvtStoreSvc::setRoot | ( | std::string | root_path,
|  | IOpaqueAddress * | pRootAddr
| ) |  |
| override

Definition at line 414 of file EvtStoreSvc.cpp.

414 {
415 auto rootAddr = std::unique_ptr<IOpaqueAddress>( pRootAddr );
416 if ( msgLevel( MSG::DEBUG ) ) {
417 debug() << "setRoot( " << root_path << ", (IOpaqueAddress*)" << (void*)rootAddr.get() << " )" << endmsg;
418 }
419 clearStore().ignore();
420 if ( !rootAddr ) return Status::INVALID_OBJ_ADDR; // Precondition: Address must be valid
421 if ( msgLevel( MSG::DEBUG ) ) {
422 const std::string* par = rootAddr->par();
423 debug() << "par[0]=" << par[0] << endmsg;
424 debug() << "par[1]=" << par[1] << endmsg;
425 }
426 auto object = createObj( *m_dataLoader, *rootAddr ); // Call data loader
427 if ( !object ) return Status::INVALID_OBJECT;
428 if ( msgLevel( MSG::DEBUG ) ) { debug() << "Root Object " << root_path << " created " << endmsg; }
429 auto dummy = Entry{root_path, {}, {}};
430 object->setRegistry( &dummy );
431 rootAddr->setRegistry( &dummy );
432 auto status = m_dataLoader->fillObjRefs( rootAddr.get(), object.get() );
433 if ( status.isSuccess() ) {
434 auto pObject = object.get();
435 status = registerObject( nullptr, root_path, object.release() );
436 if ( status.isSuccess() ) pObject->registry()->setAddress( rootAddr.release() );
437 }
438 return status;
439 }
EvtStoreSvc::m_dataLoader
SmartIF< IConversionSvc > m_dataLoader
Definition: EvtStoreSvc.cpp:195
MSG::DEBUG
Definition: IMessageSvc.h:15
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
std::string
STL class.
compareOutputFiles.par
string par
Definition: compareOutputFiles.py:465
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
EvtStoreSvc::clearStore
StatusCode clearStore() override
Definition: EvtStoreSvc.cpp:380
StatusCode::ignore
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:153
IConverter::fillObjRefs
virtual StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the created transient object.
std::unique_ptr
STL class.
EvtStoreSvc::registerObject
StatusCode registerObject(std::string_view parentPath, std::string_view objectPath, DataObject *pObject) override
Definition: EvtStoreSvc.cpp:475
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ traverseSubTree() [1/2]

StatusCode EvtStoreSvc::traverseSubTree | ( | std::string_view | top,
|  | IDataStoreAgent * | pAgent
| ) |  |
| override

Definition at line 386 of file EvtStoreSvc.cpp.

386 {
387 return fwd( [&]( Partition& p ) {
388 top = normalize_path( top, rootName() );
389 auto cmp = []( const Entry* lhs, const Entry* rhs ) { return lhs->identifier() < rhs->identifier(); };
390 std::set<const Entry*, decltype( cmp )> keys{std::move( cmp )};
391 for ( const auto& v : p.store ) {
392 if ( boost::algorithm::starts_with( v.second.identifier(), top ) ) keys.insert( &v.second );
393 }
394 auto k = keys.begin();
395 while ( k != keys.end() ) {
396 const auto& id = ( *k )->identifier();
397 int level = std::count( id.begin(), id.end(), '/' );
398 bool accept = pAgent->analyse( const_cast<Entry*>( *( k++ ) ), level );
399 if ( !accept ) {
400 k = std::find_if_not( k, keys.end(),
401 [&id]( const auto& e ) { return boost::algorithm::starts_with( e->identifier(), id ); } );
402 }
403 }
404 return StatusCode::SUCCESS;
405 } );
406 }
IDataStoreAgent::analyse
virtual bool analyse(IRegistry *pObject, int level)=0
Analyse the data object.
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
IOTest.end
def end
Definition: IOTest.py:112
std::move
T move(T... args)
std::count
T count(T... args)
std::find_if_not
T find_if_not(T... args)
std::set
STL class.
gaudirun.level
level
Definition: gaudirun.py:334
Gaudi::Utils::begin
AttribStringParser::Iterator begin(const AttribStringParser &parser)
Definition: AttribStringParser.h:120
EvtStoreSvc::rootName
const std::string & rootName() const override
Definition: EvtStoreSvc.cpp:314

## ◆ traverseSubTree() [2/2]

StatusCode EvtStoreSvc::traverseSubTree | ( | DataObject * | obj,
|  | IDataStoreAgent * | pAgent
| ) |  |
| inline override

Definition at line 237 of file EvtStoreSvc.cpp.

237 {
238 return ( obj && obj->registry() ) ? traverseSubTree( obj->registry()->identifier(), pAgent ) : StatusCode::FAILURE;
239 }
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
EvtStoreSvc::traverseSubTree
StatusCode traverseSubTree(std::string_view, IDataStoreAgent *) override
Definition: EvtStoreSvc.cpp:386
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
IRegistry::identifier
virtual const id_type & identifier() const =0
Full identifier (or key)

## ◆ traverseTree()

StatusCode EvtStoreSvc::traverseTree | ( | IDataStoreAgent * | pAgent | ) |
| inline override

Definition at line 240 of file EvtStoreSvc.cpp.

240 { return traverseSubTree( std::string_view{}, pAgent ); }
EvtStoreSvc::traverseSubTree
StatusCode traverseSubTree(std::string_view, IDataStoreAgent *) override
Definition: EvtStoreSvc.cpp:386

## ◆ unlinkObject() [1/3]

StatusCode EvtStoreSvc::unlinkObject | ( | IRegistry * | ,
|  | std::string_view |
| ) |  |
| inline override

Definition at line 281 of file EvtStoreSvc.cpp.

281 { return dummy( __FUNCTION__ ); }

## ◆ unlinkObject() [2/3]

StatusCode EvtStoreSvc::unlinkObject | ( | DataObject * | ,
|  | std::string_view |
| ) |  |
| inline override

Definition at line 282 of file EvtStoreSvc.cpp.

282 { return dummy( __FUNCTION__ ); }

## ◆ unlinkObject() [3/3]

StatusCode EvtStoreSvc::unlinkObject | ( | std::string_view |  | ) |
| inline override

Definition at line 283 of file EvtStoreSvc.cpp.

283 { return dummy( __FUNCTION__ ); }

## ◆ unregisterAddress() [1/2]

StatusCode EvtStoreSvc::unregisterAddress | ( | std::string_view |  | ) |
| inline override

Definition at line 245 of file EvtStoreSvc.cpp.

245 { return dummy( __FUNCTION__ ); };

## ◆ unregisterAddress() [2/2]

StatusCode EvtStoreSvc::unregisterAddress | ( | IRegistry * | ,
|  | std::string_view |
| ) |  |
| inline override

Definition at line 246 of file EvtStoreSvc.cpp.

246 { return dummy( __FUNCTION__ ); };

## ◆ unregisterObject() [1/3]

StatusCode EvtStoreSvc::unregisterObject | ( | std::string_view | sr | ) |
| override

Definition at line 523 of file EvtStoreSvc.cpp.

523 {
524 return fwd( [&]( Partition& p ) { return p.store.erase( sr ) != 0 ? StatusCode::SUCCESS : StatusCode::FAILURE; } );
525 }
Gaudi::Units::sr
constexpr double sr
Definition: SystemOfUnits.h:114
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86

## ◆ unregisterObject() [2/3]

StatusCode EvtStoreSvc::unregisterObject | ( | DataObject * | obj | ) |
| inline override

Definition at line 254 of file EvtStoreSvc.cpp.

254 {
255 return ( obj && obj->registry() ) ? unregisterObject( obj->registry()->identifier() ) : StatusCode::FAILURE;
256 }
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
EvtStoreSvc::unregisterObject
StatusCode unregisterObject(std::string_view) override
Definition: EvtStoreSvc.cpp:523
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
IRegistry::identifier
virtual const id_type & identifier() const =0
Full identifier (or key)

## ◆ unregisterObject() [3/3]

StatusCode EvtStoreSvc::unregisterObject | ( | DataObject * | obj,
|  | std::string_view | sr
| ) |  |
| inline override

Definition at line 257 of file EvtStoreSvc.cpp.

257 {
258 return !obj ? unregisterObject( sr )
259 : obj->registry() ? unregisterObject( ( obj->registry()->identifier() + '/' ).append( sr ) )
260 : StatusCode::FAILURE;
261 };
Gaudi::Units::sr
constexpr double sr
Definition: SystemOfUnits.h:114
GaudiPython.Bindings.FAILURE
FAILURE
Definition: Bindings.py:57
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
GaudiPluginService.cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:71
EvtStoreSvc::unregisterObject
StatusCode unregisterObject(std::string_view) override
Definition: EvtStoreSvc.cpp:523

## ◆ updateObject() [1/2]

StatusCode EvtStoreSvc::updateObject | ( | IRegistry * |  | ) |
| inline override

Definition at line 268 of file EvtStoreSvc.cpp.

268 { return dummy( __FUNCTION__ ); }

## ◆ updateObject() [2/2]

StatusCode EvtStoreSvc::updateObject | ( | DataObject * |  | ) |
| inline override

Definition at line 269 of file EvtStoreSvc.cpp.

269 { return dummy( __FUNCTION__ ); }

## Member Data Documentation

## ◆ m_dataLoader

SmartIF<IConversionSvc> EvtStoreSvc::m_dataLoader
| private

Definition at line 195 of file EvtStoreSvc.cpp.

## ◆ m_forceLeaves

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

Definition at line 191 of file EvtStoreSvc.cpp.

## ◆ m_freeSlots

tbb::concurrent_queue<size_t> EvtStoreSvc::m_freeSlots
| private

Definition at line 203 of file EvtStoreSvc.cpp.

## ◆ m_loader

Gaudi::Property<std::string> EvtStoreSvc::m_loader {this, "DataLoader", "EventPersistencySvc"}
| private

Definition at line 192 of file EvtStoreSvc.cpp.

## ◆ m_partitions

std::vector<Synced<Partition> > EvtStoreSvc::m_partitions
| private

The actual store(s)

Definition at line 201 of file EvtStoreSvc.cpp.

## ◆ m_preLoads

std::vector<DataStoreItem> EvtStoreSvc::m_preLoads
| private

Items to be pre-loaded.

Definition at line 198 of file EvtStoreSvc.cpp.

## ◆ m_rootCLID

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

Definition at line 189 of file EvtStoreSvc.cpp.

## ◆ m_rootName

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

Definition at line 190 of file EvtStoreSvc.cpp.

## ◆ m_slots

Gaudi::Property<size_t> EvtStoreSvc::m_slots {this, "EventSlots", 1, "number of event slots"}
| private

Definition at line 193 of file EvtStoreSvc.cpp.

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

- GaudiCommonSvc/src/DataSvc/EvtStoreSvc.cpp