ATLAS Offline Software
IdentifiableContainerBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #ifndef EVENTCONTAINERS_IDENTIFIABLECONTAINERBASE_H
7 #define EVENTCONTAINERS_IDENTIFIABLECONTAINERBASE_H
10 
11 
12 namespace EventContainers{ class IdentifiableCacheBase;
15 public:
17 
18  typedef std::vector<IdentifierHash> Hash_Container;
23 protected:
26  std::unique_ptr<I_InternalIDC> m_link;
27  std::vector<IdentifierHash> GetAllCurrentHashes() const { return m_link->getAllCurrentHashes(); }
28  bool insert(IdentifierHash hashId, const void* ptr) { return m_link->insert(hashId, ptr); }
29  void Wait() const { m_link->wait(); }
31  return m_link->tryAddFromCache(hashId, lock); }
32  bool tryAddFromCache(IdentifierHash hashId){ return m_link->tryAddFromCache(hashId); }
33  void cleanup(deleter_f* deleter);
34  size_t numberOfCollections() const { return m_link->numberOfCollections(); }
35  void ResetMask();
36  StatusCode fetchOrCreate(IdentifierHash hashId){ return m_link->fetchOrCreate(hashId); }
37  StatusCode fetchOrCreate(const std::vector<IdentifierHash> &hashIds) { return m_link->fetchOrCreate(hashIds); }
38  const void* indexFindPtr( IdentifierHash hashId ) const { return m_link->findIndexPtr(hashId); }
39 };
40 
41 }
42 
43 
44 #endif
EventContainers::IdentifiableContainerBase::Hash_Container
std::vector< IdentifierHash > Hash_Container
Definition: IdentifiableContainerBase.h:18
EventContainers::IdentifiableCacheBase
Definition: IdentifiableCacheBase.h:26
EventContainers::IdentifiableContainerBase::IdentifiableContainerBase
IdentifiableContainerBase(EventContainers::IdentifiableCacheBase *cache)
Definition: IdentifiableContainerBase.cxx:15
EventContainers::Mode::OfflineMap
@ OfflineMap
EventContainers::IdentifiableContainerBase::indexFindPtr
const void * indexFindPtr(IdentifierHash hashId) const
Definition: IdentifiableContainerBase.h:38
EventContainers::IdentifiableContainerBase::fetchOrCreate
StatusCode fetchOrCreate(const std::vector< IdentifierHash > &hashIds)
Definition: IdentifiableContainerBase.h:37
EventContainers::Mode::OfflineLowMemory
@ OfflineLowMemory
EventContainers
Definition: T_AthenaPoolCreateFuncs.h:33
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
EventContainers::IdentifiableContainerBase::m_link
std::unique_ptr< I_InternalIDC > m_link
Definition: IdentifiableContainerBase.h:26
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EventContainers::IdentifiableContainerBase::Wait
void Wait() const
Definition: IdentifiableContainerBase.h:29
deleter_f
void deleter_f(const void *p)
Definition: deleter.h:12
Preparation.mode
mode
Definition: Preparation.py:94
EventContainers::IdentifiableContainerBase::fetchOrCreate
StatusCode fetchOrCreate(IdentifierHash hashId)
Definition: IdentifiableContainerBase.h:36
EventContainers::IdentifiableContainerBase::IdentifiableCacheBase
EventContainers::IdentifiableCacheBase IdentifiableCacheBase
Definition: IdentifiableContainerBase.h:25
python.TriggerConfigAccess.maxsize
maxsize
Definition: TriggerConfigAccess.py:51
EventContainers::IdentifiableContainerBase
Definition: IdentifiableContainerBase.h:14
EventContainers::IdentifiableContainerBase::numberOfCollections
size_t numberOfCollections() const
Definition: IdentifiableContainerBase.h:34
EventContainers::Mode
Mode
Definition: IdentifiableContainerBase.h:13
EventContainers::Mode::OfflineFast
@ OfflineFast
EventContainers::IdentifiableContainerBase::tryAddFromCache
bool tryAddFromCache(IdentifierHash hashId)
Definition: IdentifiableContainerBase.h:32
EventContainers::IdentifiableContainerBase::tryAddFromCache
bool tryAddFromCache(IdentifierHash hashId, EventContainers::IDC_WriteHandleBase &lock)
Definition: IdentifiableContainerBase.h:30
EventContainers::IdentifiableContainerBase::ResetMask
void ResetMask()
EventContainers::IdentifiableContainerBase::insert
bool insert(IdentifierHash hashId, const void *ptr)
Definition: IdentifiableContainerBase.h:28
EventContainers::IDC_WriteHandleBase
Definition: IDC_WriteHandleBase.h:13
EventContainers::IdentifiableContainerBase::~IdentifiableContainerBase
~IdentifiableContainerBase()=default
deleter.h
EventContainers::IdentifiableContainerBase::m_OnlineMode
bool m_OnlineMode
Definition: IdentifiableContainerBase.h:24
I_InternalIDC.h
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
checker_macros.h
Define macros for attributes used to control the static checker.
EventContainers::IdentifiableContainerBase::cleanup
void cleanup(deleter_f *deleter)
Definition: IdentifiableContainerBase.cxx:38
EventContainers::IdentifiableContainerBase::GetAllCurrentHashes
std::vector< IdentifierHash > GetAllCurrentHashes() const
Definition: IdentifiableContainerBase.h:27