ATLAS Offline Software
Loading...
Searching...
No Matches
EventIDFromStore.h File Reference
Include dependency graph for EventIDFromStore.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const EventIDBase * EventIDFromStore (IProxyDict *store)
 Retrieve the EventID from EventContext saved in store STORE.
const EventIDBase * EventIDFromStore (const ServiceHandle< StoreGateSvc > &storeH)
StatusCode EventIDFromStore (IProxyDict *store, const EventIDBase *&evid)

Function Documentation

◆ EventIDFromStore() [1/3]

const EventIDBase * EventIDFromStore ( const ServiceHandle< StoreGateSvc > & storeH)

Definition at line 31 of file EventIDFromStore.h.

32{
33 return EventIDFromStore( &*storeH );
34}
const EventIDBase * EventIDFromStore(IProxyDict *store)
Retrieve the EventID from EventContext saved in store STORE.

◆ EventIDFromStore() [2/3]

const EventIDBase * EventIDFromStore ( IProxyDict * store)

Retrieve the EventID from EventContext saved in store STORE.

Parameters
storeThe store from which to retrieve the EventID, or nullptr.

If there is no context recorded in the store, return nullptr

Definition at line 15 of file EventIDFromStore.cxx.

16{
17 if( store ) {
18 //MN: FIX: is this OK to have it static in case of multiple Stores?
19 static const SG::sgkey_t ctxkey = store->stringToKey( "EventContext", ClassID_traits<EventContext>::ID() );
21 if( proxy && proxy->object() ) {
22 return & SG::DataProxy_cast<EventContext>( proxy )->eventID();
23 }
24
25 // Check for EventInfo
27 if( proxy && proxy->object() ) {
28 return SG::DataProxy_cast<EventInfo>( proxy )->event_ID();
29 }
30
31 }
32 return nullptr;
33}
virtual sgkey_t stringToKey(const std::string &str, CLID clid) override
virtual SG::DataProxy * proxy(const void *const pTransient) const override
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
TestStore store
Definition TestStore.cxx:23
DATA * DataProxy_cast(DataProxy *proxy)
cast the proxy into the concrete data object it proxies
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition sgkey_t.h:32

◆ EventIDFromStore() [3/3]

StatusCode EventIDFromStore ( IProxyDict * store,
const EventIDBase *& evid )

Definition at line 38 of file EventIDFromStore.h.

39{
40 evid = EventIDFromStore( store );
41 return evid? StatusCode::SUCCESS : StatusCode::FAILURE;
42}