The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
HiveWhiteBoard.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11//====================================================================
12// WhiteBoard (Concurrent Event Data Store)
13//--------------------------------------------------------------------
14//
15//====================================================================
16// Include files
20#include <GaudiKernel/DataSvc.h>
22#include <GaudiKernel/Service.h>
23#include <GaudiKernel/SmartIF.h>
25#include <Rtypes.h>
26#include <ThreadLocalStorage.h>
27#include <boost/callable_traits.hpp>
28#include <mutex>
29#include <tbb/concurrent_queue.h>
30#include <utility>
31
32// Interfaces
43
44namespace {
45 struct Partition final {
46 SmartIF<IDataProviderSvc> dataProvider;
47 SmartIF<IDataManagerSvc> dataManager;
48 int eventNumber = -1;
49
50 // allow acces 'by type' -- used in fwd
51 template <typename T>
52 T* get();
53 };
54 template <>
55 IDataProviderSvc* Partition::get<IDataProviderSvc>() {
56 return dataProvider.get();
57 }
58 template <>
59 IDataManagerSvc* Partition::get<IDataManagerSvc>() {
60 return dataManager.get();
61 }
62
63 // C++20: replace with http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0290r2.html
64 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4033.html
65
66 template <typename T, typename Mutex = std::recursive_mutex, typename ReadLock = std::scoped_lock<Mutex>,
67 typename WriteLock = ReadLock>
68 class Synced {
69 T m_obj;
70 mutable Mutex m_mtx;
71
72 public:
73 template <typename F>
74 decltype( auto ) with_lock( F&& f ) {
75 WriteLock lock{ m_mtx };
76 return f( m_obj );
77 }
78 template <typename F>
79 decltype( auto ) with_lock( F&& f ) const {
80 ReadLock lock{ m_mtx };
81 return f( m_obj );
82 }
83 };
84 // transform an f(T) into an f(Synced<T>)
85 template <typename Fun>
86 auto with_lock( Fun&& f ) {
87 return [f = std::forward<Fun>( f )]( auto& p ) -> decltype( auto ) { return p.with_lock( f ); };
88 }
89 // call f(T) for each element in a container of Synced<T>
90 template <typename ContainerOfSynced, typename Fun>
91 void for_( ContainerOfSynced& c, Fun&& f ) {
92 std::for_each( begin( c ), end( c ), with_lock( std::forward<Fun>( f ) ) );
93 }
94} // namespace
95
96TTHREAD_TLS( Synced<Partition>* ) s_current = nullptr;
97
98namespace {
99 namespace detail {
100 // given a callable F(Arg_t,...)
101 // argument_t<F> will be equal to Arg_t
102 template <typename F>
103 using argument_t = std::tuple_element_t<0, boost::callable_traits::args_t<F>>;
104 } // namespace detail
105
106 template <typename Fun>
107 StatusCode fwd( Fun f ) {
108 if ( !s_current ) return IDataProviderSvc::Status::INVALID_ROOT;
109 return s_current->with_lock( [&]( Partition& p ) {
110 auto* svc = p.get<std::decay_t<detail::argument_t<Fun>>>();
111 return svc ? f( *svc ) : IDataProviderSvc::Status::INVALID_ROOT;
112 } );
113 }
114} // namespace
115
128class HiveWhiteBoard : public extends<Service, IDataProviderSvc, IDataManagerSvc, IHiveWhiteBoard> {
129protected:
130 Gaudi::Property<CLID> m_rootCLID{ this, "RootCLID", 110 /*CLID_Event*/, "CLID of root entry" };
131 Gaudi::Property<std::string> m_rootName{ this, "RootName", "/Event", "name of root entry" };
132 Gaudi::Property<std::string> m_loader{ this, "DataLoader", "EventPersistencySvc", "" };
133 Gaudi::Property<size_t> m_slots{ this, "EventSlots", 1, "number of event slots" };
134 Gaudi::Property<bool> m_forceLeaves{ this, "ForceLeaves", false,
135 "force creation of default leaves on registerObject" };
136 Gaudi::Property<bool> m_enableFaultHdlr{ this, "EnableFaultHandler", false,
137 "enable incidents on data creation requests" };
138 Gaudi::Property<std::vector<std::string>> m_inhibitPathes{ this, "InhibitPaths", {}, "inhibited leaves" };
139
145 std::vector<Synced<Partition>> m_partitions;
147 tbb::concurrent_queue<size_t> m_freeSlots;
148
149public:
151 using extends::extends;
152
154 ~HiveWhiteBoard() override {
155 setDataLoader( 0 ).ignore();
156 resetPreLoad().ignore();
157 clearStore().ignore();
158 for_( m_partitions, []( Partition& p ) {
159 p.dataManager->release();
160 p.dataProvider->release();
161 } );
162 m_partitions.clear();
163 }
164
166 size_t freeSlots() override { return m_freeSlots.unsafe_size(); }
167
169 CLID rootCLID() const override { return (CLID)m_rootCLID; }
171 const std::string& rootName() const override { return m_rootName; }
172
174 StatusCode registerAddress( std::string_view path, IOpaqueAddress* pAddr ) override {
175 return fwd( [&]( IDataManagerSvc& p ) { return p.registerAddress( path, pAddr ); } );
176 }
177
178 StatusCode registerAddress( IRegistry* parent, std::string_view path, IOpaqueAddress* pAdd ) override {
179 return fwd( [&]( IDataManagerSvc& p ) { return p.registerAddress( parent, path, pAdd ); } );
180 }
181
182 StatusCode unregisterAddress( std::string_view path ) override {
183 return fwd( [&]( IDataManagerSvc& p ) { return p.unregisterAddress( path ); } );
184 }
185
186 StatusCode unregisterAddress( IRegistry* pParent, std::string_view path ) override {
187 return fwd( [&]( IDataManagerSvc& p ) { return p.unregisterAddress( pParent, path ); } );
188 }
189
190 StatusCode objectLeaves( const DataObject* pObject, std::vector<IRegistry*>& leaves ) override {
191 return fwd( [&]( IDataManagerSvc& p ) { return p.objectLeaves( pObject, leaves ); } );
192 }
193
194 StatusCode objectLeaves( const IRegistry* pObject, std::vector<IRegistry*>& leaves ) override {
195 return fwd( [&]( IDataManagerSvc& p ) { return p.objectLeaves( pObject, leaves ); } );
196 }
197
198 StatusCode objectParent( const DataObject* pObject, IRegistry*& refpParent ) override {
199 return fwd( [&]( IDataManagerSvc& p ) { return p.objectParent( pObject, refpParent ); } );
200 }
201
202 StatusCode objectParent( const IRegistry* pObject, IRegistry*& refpParent ) override {
203 return fwd( [&]( IDataManagerSvc& p ) { return p.objectParent( pObject, refpParent ); } );
204 }
205
206 StatusCode clearSubTree( std::string_view path ) override {
207 return fwd( [&]( IDataManagerSvc& p ) { return p.clearSubTree( path ); } );
208 }
209
210 StatusCode clearSubTree( DataObject* pObject ) override {
211 return fwd( [&]( IDataManagerSvc& p ) { return p.clearSubTree( pObject ); } );
212 }
213
215 for_( m_partitions, []( Partition& p ) { p.dataManager->clearStore().ignore(); } );
216 return StatusCode::SUCCESS;
217 }
218
220 StatusCode traverseSubTree( std::string_view path, IDataStoreAgent* pAgent ) override {
221 return fwd( [&]( IDataManagerSvc& p ) { return p.traverseSubTree( path, pAgent ); } );
222 }
223
224 StatusCode traverseSubTree( DataObject* pObject, IDataStoreAgent* pAgent ) override {
225 return fwd( [&]( IDataManagerSvc& p ) { return p.traverseSubTree( pObject, pAgent ); } );
226 }
227
229 return fwd( [&]( IDataManagerSvc& p ) { return p.traverseTree( pAgent ); } );
230 }
231
233 StatusCode setRoot( std::string path, DataObject* pObj ) override {
234 return fwd(
235 [pObj, path = std::move( path )]( IDataManagerSvc& p ) { return p.setRoot( std::move( path ), pObj ); } );
236 }
237
240 StatusCode setRoot( std::string path, IOpaqueAddress* pAddr ) override {
241 return fwd(
242 [pAddr, path = std::move( path )]( IDataManagerSvc& p ) { return p.setRoot( std::move( path ), pAddr ); } );
243 }
244
249 StatusCode setDataLoader( IConversionSvc* pDataLoader, IDataProviderSvc* = nullptr ) override {
250 if ( pDataLoader ) pDataLoader->addRef();
251 if ( pDataLoader ) pDataLoader->setDataProvider( this ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
252 m_dataLoader = pDataLoader;
253 for_( m_partitions, [&]( Partition& p ) { p.dataManager->setDataLoader( m_dataLoader, this ).ignore(); } );
254 return StatusCode::SUCCESS;
255 }
256
257 StatusCode addPreLoadItem( const DataStoreItem& item ) override {
258 for_( m_partitions, [&]( Partition& p ) {
259 p.dataProvider->addPreLoadItem( item ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
260 } );
261 return StatusCode::SUCCESS;
262 }
263
265 for_( m_partitions, [&]( Partition& p ) {
266 p.dataProvider->removePreLoadItem( item ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
267 } );
268 return StatusCode::SUCCESS;
269 }
270
272 for_( m_partitions, [&]( Partition& p ) {
273 p.dataProvider->resetPreLoad().ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
274 } );
275 return StatusCode::SUCCESS;
276 }
277
278 StatusCode preLoad() override {
279 return fwd( [&]( IDataProviderSvc& p ) { return p.preLoad(); } );
280 }
281
282 StatusCode registerObject( std::string_view parent, std::string_view obj, DataObject* pObj ) override {
283 return fwd( [&]( IDataProviderSvc& p ) { return p.registerObject( parent, obj, pObj ); } );
284 }
285
286 StatusCode registerObject( DataObject* parent, std::string_view obj, DataObject* pObj ) override {
287 return fwd( [&]( IDataProviderSvc& p ) { return p.registerObject( parent, obj, pObj ); } );
288 }
289
290 StatusCode unregisterObject( std::string_view path ) override {
291 return fwd( [&]( IDataProviderSvc& p ) { return p.unregisterObject( path ); } );
292 }
293
295 return fwd( [&]( IDataProviderSvc& p ) { return p.unregisterObject( pObj ); } );
296 }
297
298 StatusCode unregisterObject( DataObject* pObj, std::string_view path ) override {
299 return fwd( [&]( IDataProviderSvc& p ) { return p.unregisterObject( pObj, path ); } );
300 }
301
302 StatusCode retrieveObject( IRegistry* parent, std::string_view path, DataObject*& pObj ) override {
303 return fwd( [&]( IDataProviderSvc& p ) { return p.retrieveObject( parent, path, pObj ); } );
304 }
305
306 StatusCode findObject( std::string_view path, DataObject*& pObj ) override {
307 return fwd( [&]( IDataProviderSvc& p ) { return p.retrieveObject( path, pObj ); } );
308 }
309
310 StatusCode findObject( IRegistry* parent, std::string_view path, DataObject*& pObj ) override {
311 return fwd( [&]( IDataProviderSvc& p ) { return p.retrieveObject( parent, path, pObj ); } );
312 }
313
314 StatusCode linkObject( IRegistry* from, std::string_view objPath, DataObject* to ) override {
315 return fwd( [&]( IDataProviderSvc& p ) { return p.linkObject( from, objPath, to ); } );
316 }
317
318 StatusCode linkObject( std::string_view fullPath, DataObject* to ) override {
319 return fwd( [&]( IDataProviderSvc& p ) { return p.linkObject( fullPath, to ); } );
320 }
321
322 StatusCode unlinkObject( IRegistry* from, std::string_view objPath ) override {
323 return fwd( [&]( IDataProviderSvc& p ) { return p.unlinkObject( from, objPath ); } );
324 }
325
326 StatusCode unlinkObject( DataObject* from, std::string_view objPath ) override {
327 return fwd( [&]( IDataProviderSvc& p ) { return p.unlinkObject( from, objPath ); } );
328 }
329
330 StatusCode unlinkObject( std::string_view path ) override {
331 return fwd( [&]( IDataProviderSvc& p ) { return p.unlinkObject( path ); } );
332 }
333
334 StatusCode updateObject( IRegistry* pDirectory ) override {
335 return fwd( [&]( IDataProviderSvc& p ) { return p.updateObject( pDirectory ); } );
336 }
337
339 return fwd( [&]( IDataProviderSvc& p ) { return p.updateObject( pObj ); } );
340 }
341
342 //
343 //---IHiveWhiteBard implemenation--------------------------------------------------
344 //
345
347 StatusCode clearStore( size_t partition ) override {
348 return m_partitions[partition].with_lock( []( Partition& p ) { return p.dataManager->clearStore(); } );
349 }
350
352 StatusCode selectStore( size_t partition ) override {
353 s_current = &m_partitions[partition];
354 return StatusCode::SUCCESS;
355 }
356
358 StatusCode setNumberOfStores( size_t slots ) override {
360 warning() << "Too late to change the number of slots!" << endmsg;
361 return StatusCode::FAILURE;
362 }
363 m_slots = slots;
365 return StatusCode::SUCCESS;
366 }
367
369 size_t getNumberOfStores() const override { return m_slots; }
370
372 bool exists( const DataObjID& id ) override {
373 DataObject* pObject{ nullptr };
374 return findObject( id.fullKey(), pObject ).isSuccess();
375 }
376
378 size_t allocateStore( int evtnumber ) override {
379 // take next free slot in the list
380 size_t slot = std::string::npos;
381 if ( m_freeSlots.try_pop( slot ) ) {
382 assert( slot != std::string::npos );
383 assert( slot < m_partitions.size() );
384 m_partitions[slot].with_lock( [evtnumber]( Partition& p ) {
385 assert( p.eventNumber == -1 ); // or whatever value represents 'free'
386 p.eventNumber = evtnumber;
387 } );
388 }
389 return slot;
390 }
391
393 StatusCode freeStore( size_t partition ) override {
394 assert( partition < m_partitions.size() );
395 auto prev = m_partitions[partition].with_lock( []( Partition& p ) { return std::exchange( p.eventNumber, -1 ); } );
396 if ( prev == -1 ) return StatusCode::FAILURE; // double free -- should never happen!
397 m_freeSlots.push( partition );
398 return StatusCode::SUCCESS;
399 }
400
402 size_t getPartitionNumber( int eventnumber ) const override {
403 auto i = std::find_if( begin( m_partitions ), end( m_partitions ),
404 with_lock( [eventnumber]( const Partition& p ) { return p.eventNumber == eventnumber; } ) );
405 return i != end( m_partitions ) ? std::distance( begin( m_partitions ), i ) : std::string::npos;
406 }
407
409 m_addrCreator = service( m_loader, true );
410 if ( !m_addrCreator ) {
411 error() << "Failed to retrieve data loader "
412 << "\"" << m_loader << "\"" << endmsg;
413 return StatusCode::FAILURE;
414 }
415 SmartIF<IConversionSvc> dataLoader{ service( m_loader, true ) };
416 if ( !dataLoader ) {
417 error() << MSG::ERROR << "Failed to retrieve data loader "
418 << "\"" << m_loader << "\"" << endmsg;
419 return StatusCode::FAILURE;
420 }
421 StatusCode sc = setDataLoader( dataLoader );
422 if ( !sc.isSuccess() ) {
423 error() << MSG::ERROR << "Failed to set data loader "
424 << "\"" << m_loader << "\"" << endmsg;
425 return sc;
426 }
427 return sc;
428 }
429
431 m_addrCreator.reset();
432 m_dataLoader.reset();
433 return StatusCode::SUCCESS;
434 }
435
436 //
437 //---IService implemenation---------------------------------------------------------
438 //
439
443 if ( !sc.isSuccess() ) {
444 error() << "Unable to initialize base class" << endmsg;
445 return sc;
446 }
447 if ( m_slots < (size_t)1 ) {
448 error() << "Invalid number of slots (" << m_slots << ")" << endmsg;
449 return StatusCode::FAILURE;
450 }
451
452 if ( !setNumberOfStores( m_slots ).isSuccess() ) {
453 error() << "Cannot set number of slots" << endmsg;
454 return StatusCode::FAILURE;
455 }
456
457 m_partitions = std::vector<Synced<Partition>>( m_slots );
458 for ( size_t i = 0; i < m_slots; i++ ) {
459 DataSvc* svc = new DataSvc( name() + "_" + std::to_string( i ), serviceLocator() );
460 // Percolate properties
461 svc->setProperty( m_rootCLID ).ignore();
462 svc->setProperty( m_rootName ).ignore();
465 // make sure that CommonMessaging is initialized
468
469 sc = svc->initialize();
470 if ( !sc.isSuccess() ) {
471 error() << "Failed to instantiate DataSvc as store partition" << endmsg;
472 return sc;
473 }
474 m_partitions[i].with_lock( [&]( Partition& p ) {
475 p.dataProvider = svc;
476 p.dataManager = svc;
477 } );
478 m_freeSlots.push( i );
479 }
480 selectStore( 0 ).ignore();
481 return attachServices();
482 }
483
487 if ( !sc.isSuccess() ) {
488 error() << "Unable to reinitialize base class" << endmsg;
489 return sc;
490 }
491 detachServices().ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
492 sc = attachServices();
493 if ( !sc.isSuccess() ) {
494 error() << "Failed to attach necessary services." << endmsg;
495 return sc;
496 }
497 return StatusCode::SUCCESS;
498 }
499
501 StatusCode finalize() override {
502 setDataLoader( 0 ).ignore();
503 clearStore().ignore();
504 return Service::finalize();
505 }
506};
507
508// Instantiation of a static factory class used by clients to create
509// instances of this service
510DECLARE_COMPONENT( HiveWhiteBoard )
unsigned int CLID
Class ID definition.
Definition ClassID.h:16
TTHREAD_TLS(Synced< Partition > *) s_current
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
A DataObject is the base class of any identifiable object on any data store.
Definition DataObject.h:37
Description of the DataStoreItem class.
Data service base class.
Definition DataSvc.h:43
StatusCode initialize() override
Service initialization.
Definition DataSvc.cpp:795
static GAUDI_API void setNumConcEvents(const std::size_t &nE)
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
Data service base class.
std::vector< Synced< Partition > > m_partitions
Datastore partitions.
StatusCode unlinkObject(DataObject *from, std::string_view objPath) override
Remove a link to another object.
StatusCode finalize() override
Service initialisation.
StatusCode setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
StatusCode registerAddress(IRegistry *parent, std::string_view path, IOpaqueAddress *pAdd) override
IDataManagerSvc: Register object address with the data store.
Gaudi::Property< bool > m_forceLeaves
StatusCode objectParent(const DataObject *pObject, IRegistry *&refpParent) override
IDataManagerSvc: Explore the object store: retrieve the object's parent.
StatusCode detachServices()
StatusCode findObject(IRegistry *parent, std::string_view path, DataObject *&pObj) override
Find object identified by its full path in the data store.
SmartIF< IAddressCreator > m_addrCreator
Reference to address creator.
StatusCode linkObject(IRegistry *from, std::string_view objPath, DataObject *to) override
Add a link to another object.
size_t getPartitionNumber(int eventnumber) const override
Get the partition number corresponding to a given event.
StatusCode traverseSubTree(DataObject *pObject, IDataStoreAgent *pAgent) override
IDataManagerSvc: Analyze by traversing all data objects below the sub tree.
StatusCode unlinkObject(std::string_view path) override
Remove a link to another object.
Gaudi::Property< std::string > m_rootName
StatusCode resetPreLoad() override
Clear the preload list.
StatusCode setRoot(std::string path, IOpaqueAddress *pAddr) override
Initialize data store for new event by giving new event path and address of root object.
StatusCode unlinkObject(IRegistry *from, std::string_view objPath) override
Remove a link to another object.
~HiveWhiteBoard() override
Standard Destructor.
StatusCode registerObject(std::string_view parent, std::string_view obj, DataObject *pObj) override
Register object with the data store.
StatusCode setRoot(std::string path, DataObject *pObj) override
Initialize data store for new event by giving new event path and root object.
StatusCode reinitialize() override
Service initialisation.
CLID rootCLID() const override
IDataManagerSvc: Accessor for root event CLID.
StatusCode initialize() override
Service initialisation.
StatusCode freeStore(size_t partition) override
Free a store partition.
StatusCode clearSubTree(std::string_view path) override
Remove all data objects below the sub tree identified.
StatusCode registerObject(DataObject *parent, std::string_view obj, DataObject *pObj) override
Register object with the data store.
Gaudi::Property< bool > m_enableFaultHdlr
tbb::concurrent_queue< size_t > m_freeSlots
fifo queue of free slots
StatusCode attachServices()
Gaudi::Property< size_t > m_slots
StatusCode objectLeaves(const IRegistry *pObject, std::vector< IRegistry * > &leaves) override
Explore the object store: retrieve all leaves attached to the object.
StatusCode unregisterObject(DataObject *pObj) override
Unregister object from the data store.
StatusCode traverseTree(IDataStoreAgent *pAgent) override
IDataManagerSvc: Analyze by traversing all data objects in the data store.
StatusCode clearStore() override
IDataManagerSvc: Remove all data objects in the data store.
Gaudi::Property< std::vector< std::string > > m_inhibitPathes
bool exists(const DataObjID &id) override
check if a data object exists in the current store
size_t allocateStore(int evtnumber) override
Allocate a store partition for a given event number.
StatusCode clearSubTree(DataObject *pObject) override
Remove all data objects below the sub tree identified.
SmartIF< IConversionSvc > m_dataLoader
Pointer to data loader service.
StatusCode objectParent(const IRegistry *pObject, IRegistry *&refpParent) override
IDataManagerSvc: Explore the object store: retrieve the object's parent.
StatusCode addPreLoadItem(const DataStoreItem &item) override
Add an item to the preload list.
StatusCode clearStore(size_t partition) override
Remove all data objects in one 'slot' of the data store.
size_t getNumberOfStores() const override
Get the number of event slots (copies of DataSvc objects).
Gaudi::Property< CLID > m_rootCLID
Gaudi::Property< std::string > m_loader
StatusCode removePreLoadItem(const DataStoreItem &item) override
Remove an item from the preload list.
StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &leaves) override
Explore the object store: retrieve all leaves attached to the object.
StatusCode updateObject(IRegistry *pDirectory) override
Update object identified by its directory entry.
StatusCode unregisterObject(std::string_view path) override
Unregister object from the data store.
StatusCode setNumberOfStores(size_t slots) override
Set the number of event slots (copies of DataSvc objects).
StatusCode retrieveObject(IRegistry *parent, std::string_view path, DataObject *&pObj) override
Retrieve object from data store.
StatusCode selectStore(size_t partition) override
Activate a partition object. The identifies the partition uniquely.
StatusCode findObject(std::string_view path, DataObject *&pObj) override
Find object identified by its full path in the data store.
StatusCode preLoad() override
load all preload items of the list
StatusCode updateObject(DataObject *pObj) override
Update object.
StatusCode unregisterAddress(std::string_view path) override
IDataManagerSvc: Unregister object address from the data store.
const std::string & rootName() const override
Name for root Event.
StatusCode unregisterAddress(IRegistry *pParent, std::string_view path) override
IDataManagerSvc: Unregister object address from the data store.
size_t freeSlots() override
Get free slots number.
StatusCode unregisterObject(DataObject *pObj, std::string_view path) override
Unregister object from the data store.
StatusCode registerAddress(std::string_view path, IOpaqueAddress *pAddr) override
IDataManagerSvc: Register object address with the data store.
StatusCode traverseSubTree(std::string_view path, IDataStoreAgent *pAgent) override
Analyze by traversing all data objects below the sub tree.
StatusCode linkObject(std::string_view fullPath, DataObject *to) override
Add a link to another object.
virtual StatusCode setDataProvider(IDataProviderSvc *pService)=0
Set Data provider service.
Data provider interface definition.
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
virtual StatusCode linkObject(IRegistry *from, std::string_view objPath, DataObject *toObj)=0
Add a link to another object.
virtual StatusCode unregisterObject(std::string_view fullPath)=0
Unregister object from the data store.
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
virtual StatusCode unlinkObject(IRegistry *from, std::string_view objPath)=0
Remove a link to another object.
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.
virtual StatusCode resetPreLoad()=0
Clear the preload list.
@ INVALID_ROOT
Invalid root path object cannot be retrieved or stored.
virtual StatusCode preLoad()=0
Load all preload items of the list.
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
Generic data agent interface.
virtual unsigned long addRef() const =0
Increment the reference count of Interface instance.
virtual unsigned long release() const =0
Release Interface instance.
Opaque address interface definition.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition IRegistry.h:29
StatusCode setProperty(const Gaudi::Details::PropertyBase &p)
Set the property from a property.
Definition IProperty.h:38
Gaudi::StateMachine::State FSMState() const override
Definition Service.h:55
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition Service.cpp:336
StatusCode finalize() override
Definition Service.cpp:223
Gaudi::Property< int > m_outputLevel
flag indicating whether ToolHandle tools have been added to m_tools
Definition Service.h:184
const std::string & name() const override
Retrieve name of the service.
Definition Service.cpp:333
StatusCode reinitialize() override
Definition Service.cpp:296
SmartIF< IFace > service(const std::string &name, bool createIf=true) const
Definition Service.h:79
StatusCode initialize() override
Definition Service.cpp:118
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition StatusCode.h:139
bool isSuccess() const
Definition StatusCode.h:314
constexpr static const auto SUCCESS
Definition StatusCode.h:99
constexpr static const auto FAILURE
Definition StatusCode.h:100
Base class used to extend a class implementing other interfaces.
Definition extends.h:19
decltype(auto) for_(F &&f)
AttribStringParser::Iterator begin(const AttribStringParser &parser)
auto with_lock(Fun &&f)
get
decorate the vector of properties
Definition decorators.py:94
@ ERROR
Definition IMessageSvc.h:22
virtual StatusCode clearSubTree(std::string_view sub_path)=0
Remove all data objects below the sub tree identified by its full path name.
virtual StatusCode setRoot(std::string root_name, DataObject *pObject)=0
Initialize data store for new event by giving new event path.
virtual StatusCode objectParent(const DataObject *pObject, IRegistry *&refpParent)=0
IDataManagerSvc: Explore the object store: retrieve the object's parent.
virtual StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &refLeaves)=0
Explore the object store: retrieve all leaves attached to the object The object is identified by its ...
virtual StatusCode traverseSubTree(std::string_view sub_tree_path, IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects below the sub tree identified by its full path name.
virtual StatusCode registerAddress(std::string_view fullPath, IOpaqueAddress *pAddress)=0
Register object address with the data store.
virtual StatusCode setDataLoader(IConversionSvc *svc, IDataProviderSvc *dpsvc=nullptr)=0
Pass a default data loader to the service.
virtual StatusCode clearStore()=0
Remove all data objects in the data store.
virtual StatusCode unregisterAddress(std::string_view fullPath)=0
Unregister object address from the data store.
virtual StatusCode traverseTree(IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects in the data store.