5#ifndef ViewAlgs_IDCCacheCreatorBase_h
6#define ViewAlgs_IDCCacheCreatorBase_h
20 template<
bool checkKey = true,
typename T>
22 template<
bool checkKey = true,
typename T,
typename X>
30template<
bool checkKey,
typename T>
32 static_assert(std::is_base_of<EventContainers::IdentifiableCacheBase, T>::value,
"Expects a IdentifiableCache Class" );
33 if constexpr (checkKey){
34 if(containerKey.
key().empty()){
35 ATH_MSG_DEBUG(
"Creation of container "<< containerKey.
key() <<
" is disabled (no name specified)");
36 return StatusCode::SUCCESS;
41 ATH_MSG_DEBUG(
"Container "<< containerKey.
key() <<
" created to hold " << size );
42 return StatusCode::SUCCESS;
45template<
bool checkKey,
typename T,
typename X>
47 static_assert(std::is_base_of<IdentifiableValueCache<X>, T>::value,
"Expects a IdentifiableValueCache Class" );
48 if constexpr (checkKey){
49 if(containerKey.
key().empty()){
50 ATH_MSG_DEBUG(
"Creation of container "<< containerKey.
key() <<
" is disabled (no name specified)");
51 return StatusCode::SUCCESS;
56 ATH_MSG_DEBUG(
"ValueContainer "<< containerKey.
key() <<
" created to hold " << size );
57 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
An algorithm that can be simultaneously executed in multiple threads.
StatusCode createValueContainer(const SG::WriteHandleKey< T > &, long unsigned int, const EventContext &, const X &defaultValue) const
std::atomic_flag m_disableWarningCheck ATLAS_THREAD_SAFE
IDCCacheCreatorBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
StatusCode checkInsideViewOnce(const EventContext &) const
bool isInsideView(const EventContext &) const
virtual ~IDCCacheCreatorBase()=default
Destructor.
StatusCode createContainer(const SG::WriteHandleKey< T > &, long unsigned int, const EventContext &) const
This is a "hash" representation of an Identifier.
const std::string & key() const
Return the StoreGate ID for the referenced object.
Property holding a SG store/key/clid from which a WriteHandle is made.
StatusCode recordNonConst(std::unique_ptr< T > data)
Record a non-const object to the store.