The Gaudi Framework  master (9f3f8895)
Loading...
Searching...
No Matches
HiveWhiteBoard.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2026 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
21#include <GaudiKernel/DataSvc.h>
23#include <GaudiKernel/Service.h>
24#include <GaudiKernel/SmartIF.h>
26#include <Rtypes.h>
27#include <ThreadLocalStorage.h>
28#include <boost/callable_traits.hpp>
29#include <mutex>
30#include <tbb/concurrent_queue.h>
31#include <utility>
32
33// Interfaces
44
45namespace {
46 struct Partition final {
47 SmartIF<IDataProviderSvc> dataProvider;
48 SmartIF<IDataManagerSvc> dataManager;
49 int eventNumber = -1;
50
51 // allow acces 'by type' -- used in fwd
52 template <typename T>
53 T* get();
54 };
55 template <>
56 IDataProviderSvc* Partition::get<IDataProviderSvc>() {
57 return dataProvider.get();
58 }
59 template <>
60 IDataManagerSvc* Partition::get<IDataManagerSvc>() {
61 return dataManager.get();
62 }
63 using SynchronizedPartition = Gaudi::cxx::SynchronizedValue<Partition, std::recursive_mutex>;
64
65} // namespace
66
67TTHREAD_TLS( SynchronizedPartition* ) s_current = nullptr;
68
69namespace {
70 namespace detail {
71 // given a callable F(Arg_t,...)
72 // argument_t<F> will be equal to Arg_t
73 template <typename F>
74 using argument_t = std::tuple_element_t<0, boost::callable_traits::args_t<F>>;
75 } // namespace detail
76
77 template <typename Fun>
78 StatusCode fwd( Fun f ) {
79 if ( !s_current ) return IDataProviderSvc::Status::INVALID_ROOT;
80 return s_current->with_lock( [&]( Partition& p ) {
81 auto* svc = p.get<std::decay_t<detail::argument_t<Fun>>>();
82 return svc ? f( *svc ) : IDataProviderSvc::Status::INVALID_ROOT;
83 } );
84 }
85} // namespace
86
99class HiveWhiteBoard : public extends<Service, IDataProviderSvc, IDataManagerSvc, IHiveWhiteBoard,
100 Gaudi::Concurrency::ConcurrencyManager> {
101protected:
102 Gaudi::Property<CLID> m_rootCLID{ this, "RootCLID", 110 /*CLID_Event*/, "CLID of root entry" };
103 Gaudi::Property<std::string> m_rootName{ this, "RootName", "/Event", "name of root entry" };
104 Gaudi::Property<std::string> m_loader{ this, "DataLoader", "EventPersistencySvc", "" };
105 Gaudi::Property<size_t> m_slots{ this, "EventSlots", 1, "number of event slots" };
106 Gaudi::Property<bool> m_forceLeaves{ this, "ForceLeaves", false,
107 "force creation of default leaves on registerObject" };
108 Gaudi::Property<bool> m_enableFaultHdlr{ this, "EnableFaultHandler", false,
109 "enable incidents on data creation requests" };
110 Gaudi::Property<std::vector<std::string>> m_inhibitPathes{ this, "InhibitPaths", {}, "inhibited leaves" };
111
117 std::vector<SynchronizedPartition> m_partitions;
119 tbb::concurrent_queue<size_t> m_freeSlots;
120
121public:
123 using extends::extends;
124
126 ~HiveWhiteBoard() override {
127 setDataLoader( 0 ).ignore();
128 resetPreLoad().ignore();
129 clearStore().ignore();
130 for_each( m_partitions, []( Partition& p ) {
131 p.dataManager->release();
132 p.dataProvider->release();
133 } );
134 m_partitions.clear();
135 }
136
138 size_t freeSlots() override { return m_freeSlots.unsafe_size(); }
139
141 CLID rootCLID() const override { return (CLID)m_rootCLID; }
143 const std::string& rootName() const override { return m_rootName; }
144
146 StatusCode registerAddress( std::string_view path, IOpaqueAddress* pAddr ) override {
147 return fwd( [&]( IDataManagerSvc& p ) { return p.registerAddress( path, pAddr ); } );
148 }
149
150 StatusCode registerAddress( IRegistry* parent, std::string_view path, IOpaqueAddress* pAdd ) override {
151 return fwd( [&]( IDataManagerSvc& p ) { return p.registerAddress( parent, path, pAdd ); } );
152 }
153
154 StatusCode unregisterAddress( std::string_view path ) override {
155 return fwd( [&]( IDataManagerSvc& p ) { return p.unregisterAddress( path ); } );
156 }
157
158 StatusCode unregisterAddress( IRegistry* pParent, std::string_view path ) override {
159 return fwd( [&]( IDataManagerSvc& p ) { return p.unregisterAddress( pParent, path ); } );
160 }
161
162 StatusCode objectLeaves( const DataObject* pObject, std::vector<IRegistry*>& leaves ) override {
163 return fwd( [&]( IDataManagerSvc& p ) { return p.objectLeaves( pObject, leaves ); } );
164 }
165
166 StatusCode objectLeaves( const IRegistry* pObject, std::vector<IRegistry*>& leaves ) override {
167 return fwd( [&]( IDataManagerSvc& p ) { return p.objectLeaves( pObject, leaves ); } );
168 }
169
170 StatusCode objectParent( const DataObject* pObject, IRegistry*& refpParent ) override {
171 return fwd( [&]( IDataManagerSvc& p ) { return p.objectParent( pObject, refpParent ); } );
172 }
173
174 StatusCode objectParent( const IRegistry* pObject, IRegistry*& refpParent ) override {
175 return fwd( [&]( IDataManagerSvc& p ) { return p.objectParent( pObject, refpParent ); } );
176 }
177
178 StatusCode clearSubTree( std::string_view path ) override {
179 return fwd( [&]( IDataManagerSvc& p ) { return p.clearSubTree( path ); } );
180 }
181
182 StatusCode clearSubTree( DataObject* pObject ) override {
183 return fwd( [&]( IDataManagerSvc& p ) { return p.clearSubTree( pObject ); } );
184 }
185
187 for_each( m_partitions, []( Partition& p ) { p.dataManager->clearStore().ignore(); } );
188 return StatusCode::SUCCESS;
189 }
190
192 StatusCode traverseSubTree( std::string_view path, IDataStoreAgent* pAgent ) override {
193 return fwd( [&]( IDataManagerSvc& p ) { return p.traverseSubTree( path, pAgent ); } );
194 }
195
196 StatusCode traverseSubTree( DataObject* pObject, IDataStoreAgent* pAgent ) override {
197 return fwd( [&]( IDataManagerSvc& p ) { return p.traverseSubTree( pObject, pAgent ); } );
198 }
199
201 return fwd( [&]( IDataManagerSvc& p ) { return p.traverseTree( pAgent ); } );
202 }
203
205 StatusCode setRoot( std::string path, DataObject* pObj ) override {
206 return fwd(
207 [pObj, path = std::move( path )]( IDataManagerSvc& p ) { return p.setRoot( std::move( path ), pObj ); } );
208 }
209
212 StatusCode setRoot( std::string path, IOpaqueAddress* pAddr ) override {
213 return fwd(
214 [pAddr, path = std::move( path )]( IDataManagerSvc& p ) { return p.setRoot( std::move( path ), pAddr ); } );
215 }
216
221 StatusCode setDataLoader( IConversionSvc* pDataLoader, IDataProviderSvc* = nullptr ) override {
222 if ( pDataLoader ) pDataLoader->addRef();
223 if ( pDataLoader ) pDataLoader->setDataProvider( this ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
224 m_dataLoader = pDataLoader;
225 for_each( m_partitions, [&]( Partition& p ) { p.dataManager->setDataLoader( m_dataLoader, this ).ignore(); } );
226 return StatusCode::SUCCESS;
227 }
228
229 StatusCode addPreLoadItem( const DataStoreItem& item ) override {
230 for_each( m_partitions, [&]( Partition& p ) {
231 p.dataProvider->addPreLoadItem( item ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
232 } );
233 return StatusCode::SUCCESS;
234 }
235
237 for_each( m_partitions, [&]( Partition& p ) {
238 p.dataProvider->removePreLoadItem( item ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
239 } );
240 return StatusCode::SUCCESS;
241 }
242
244 for_each( m_partitions, [&]( Partition& p ) {
245 p.dataProvider->resetPreLoad().ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
246 } );
247 return StatusCode::SUCCESS;
248 }
249
250 StatusCode preLoad() override {
251 return fwd( [&]( IDataProviderSvc& p ) { return p.preLoad(); } );
252 }
253
254 StatusCode registerObject( std::string_view parent, std::string_view obj, DataObject* pObj ) override {
255 return fwd( [&]( IDataProviderSvc& p ) { return p.registerObject( parent, obj, pObj ); } );
256 }
257
258 StatusCode registerObject( DataObject* parent, std::string_view obj, DataObject* pObj ) override {
259 return fwd( [&]( IDataProviderSvc& p ) { return p.registerObject( parent, obj, pObj ); } );
260 }
261
262 StatusCode unregisterObject( std::string_view path ) override {
263 return fwd( [&]( IDataProviderSvc& p ) { return p.unregisterObject( path ); } );
264 }
265
267 return fwd( [&]( IDataProviderSvc& p ) { return p.unregisterObject( pObj ); } );
268 }
269
270 StatusCode unregisterObject( DataObject* pObj, std::string_view path ) override {
271 return fwd( [&]( IDataProviderSvc& p ) { return p.unregisterObject( pObj, path ); } );
272 }
273
274 StatusCode retrieveObject( IRegistry* parent, std::string_view path, DataObject*& pObj ) override {
275 return fwd( [&]( IDataProviderSvc& p ) { return p.retrieveObject( parent, path, pObj ); } );
276 }
277
278 StatusCode findObject( std::string_view path, DataObject*& pObj ) override {
279 return fwd( [&]( IDataProviderSvc& p ) { return p.retrieveObject( path, pObj ); } );
280 }
281
282 StatusCode findObject( IRegistry* parent, std::string_view path, DataObject*& pObj ) override {
283 return fwd( [&]( IDataProviderSvc& p ) { return p.retrieveObject( parent, path, pObj ); } );
284 }
285
286 StatusCode linkObject( IRegistry* from, std::string_view objPath, DataObject* to ) override {
287 return fwd( [&]( IDataProviderSvc& p ) { return p.linkObject( from, objPath, to ); } );
288 }
289
290 StatusCode linkObject( std::string_view fullPath, DataObject* to ) override {
291 return fwd( [&]( IDataProviderSvc& p ) { return p.linkObject( fullPath, to ); } );
292 }
293
294 StatusCode unlinkObject( IRegistry* from, std::string_view objPath ) override {
295 return fwd( [&]( IDataProviderSvc& p ) { return p.unlinkObject( from, objPath ); } );
296 }
297
298 StatusCode unlinkObject( DataObject* from, std::string_view objPath ) override {
299 return fwd( [&]( IDataProviderSvc& p ) { return p.unlinkObject( from, objPath ); } );
300 }
301
302 StatusCode unlinkObject( std::string_view path ) override {
303 return fwd( [&]( IDataProviderSvc& p ) { return p.unlinkObject( path ); } );
304 }
305
306 StatusCode updateObject( IRegistry* pDirectory ) override {
307 return fwd( [&]( IDataProviderSvc& p ) { return p.updateObject( pDirectory ); } );
308 }
309
311 return fwd( [&]( IDataProviderSvc& p ) { return p.updateObject( pObj ); } );
312 }
313
314 //
315 //---IHiveWhiteBard implemenation--------------------------------------------------
316 //
317
319 StatusCode clearStore( size_t partition ) override {
320 return m_partitions[partition].with_lock( []( Partition& p ) { return p.dataManager->clearStore(); } );
321 }
322
324 StatusCode selectStore( size_t partition ) override {
325 s_current = &m_partitions[partition];
326 return StatusCode::SUCCESS;
327 }
328
330 StatusCode setNumberOfStores( size_t slots ) override {
332 warning() << "Too late to change the number of slots!" << endmsg;
333 return StatusCode::FAILURE;
334 }
335 m_slots = slots;
337 return StatusCode::SUCCESS;
338 }
339
341 size_t getNumberOfStores() const override { return m_slots; }
342
344 bool exists( const DataObjID& id ) override {
345 DataObject* pObject{ nullptr };
346 return findObject( id.fullKey(), pObject ).isSuccess();
347 }
348
350 size_t allocateStore( int evtnumber ) override {
351 // take next free slot in the list
352 size_t slot = std::string::npos;
353 if ( m_freeSlots.try_pop( slot ) ) {
354 assert( slot != std::string::npos );
355 assert( slot < m_partitions.size() );
356 m_partitions[slot].with_lock( [evtnumber]( Partition& p ) {
357 assert( p.eventNumber == -1 ); // or whatever value represents 'free'
358 p.eventNumber = evtnumber;
359 } );
360 }
361 return slot;
362 }
363
365 StatusCode freeStore( size_t partition ) override {
366 assert( partition < m_partitions.size() );
367 auto prev = m_partitions[partition].with_lock( []( Partition& p ) { return std::exchange( p.eventNumber, -1 ); } );
368 if ( prev == -1 ) return StatusCode::FAILURE; // double free -- should never happen!
369 m_freeSlots.push( partition );
370 return StatusCode::SUCCESS;
371 }
372
374 size_t getPartitionNumber( int eventnumber ) const override {
375 auto i = std::find_if(
376 begin( m_partitions ), end( m_partitions ),
377 Gaudi::cxx::with_lock( [eventnumber]( const Partition& p ) { return p.eventNumber == eventnumber; } ) );
378 return i != end( m_partitions ) ? std::distance( begin( m_partitions ), i ) : std::string::npos;
379 }
380
382 m_addrCreator = service( m_loader, true );
383 if ( !m_addrCreator ) {
384 error() << "Failed to retrieve data loader "
385 << "\"" << m_loader << "\"" << endmsg;
386 return StatusCode::FAILURE;
387 }
388 SmartIF<IConversionSvc> dataLoader{ service( m_loader, true ) };
389 if ( !dataLoader ) {
390 error() << MSG::ERROR << "Failed to retrieve data loader "
391 << "\"" << m_loader << "\"" << endmsg;
392 return StatusCode::FAILURE;
393 }
394 StatusCode sc = setDataLoader( dataLoader );
395 if ( !sc.isSuccess() ) {
396 error() << MSG::ERROR << "Failed to set data loader "
397 << "\"" << m_loader << "\"" << endmsg;
398 return sc;
399 }
400 return sc;
401 }
402
404 m_addrCreator.reset();
405 m_dataLoader.reset();
406 return StatusCode::SUCCESS;
407 }
408
409 //
410 //---IService implemenation---------------------------------------------------------
411 //
412
416 if ( !sc.isSuccess() ) {
417 error() << "Unable to initialize base class" << endmsg;
418 return sc;
419 }
420 if ( m_slots < (size_t)1 ) {
421 error() << "Invalid number of slots (" << m_slots << ")" << endmsg;
422 return StatusCode::FAILURE;
423 }
424
425 if ( !setNumberOfStores( m_slots ).isSuccess() ) {
426 error() << "Cannot set number of slots" << endmsg;
427 return StatusCode::FAILURE;
428 }
429
430 m_partitions = std::vector<SynchronizedPartition>( m_slots );
431 for ( size_t i = 0; i < m_slots; i++ ) {
432 DataSvc* svc = new DataSvc( name() + "_" + std::to_string( i ), serviceLocator() );
433 // Percolate properties
434 svc->setProperty( m_rootCLID ).ignore();
435 svc->setProperty( m_rootName ).ignore();
438 // make sure that CommonMessaging is initialized
441
442 sc = svc->initialize();
443 if ( !sc.isSuccess() ) {
444 error() << "Failed to instantiate DataSvc as store partition" << endmsg;
445 return sc;
446 }
447 m_partitions[i].with_lock( [&]( Partition& p ) {
448 p.dataProvider = svc;
449 p.dataManager = svc;
450 } );
451 m_freeSlots.push( i );
452 }
453 selectStore( 0 ).ignore();
454 return attachServices();
455 }
456
460 if ( !sc.isSuccess() ) {
461 error() << "Unable to reinitialize base class" << endmsg;
462 return sc;
463 }
464 detachServices().ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
465 sc = attachServices();
466 if ( !sc.isSuccess() ) {
467 error() << "Failed to attach necessary services." << endmsg;
468 return sc;
469 }
470 return StatusCode::SUCCESS;
471 }
472
474 StatusCode finalize() override {
475 setDataLoader( 0 ).ignore();
476 clearStore().ignore();
477 return Service::finalize();
478 }
479};
480
481// Instantiation of a static factory class used by clients to create
482// instances of this service
483DECLARE_COMPONENT( HiveWhiteBoard )
unsigned int CLID
Class ID definition.
Definition ClassID.h:16
TTHREAD_TLS(SynchronizedPartition *) 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 void setNumConcEvents(const std::size_t &nE)
Set the number of concurrent events (for MT).
Implementation of property with value of concrete type.
Definition Property.h:35
Data service base class.
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
std::vector< SynchronizedPartition > m_partitions
Datastore partitions.
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
void ignore() const
Allow discarding a StatusCode without warning.
Definition StatusCode.h:128
bool isSuccess() const
Definition StatusCode.h:302
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
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.