#include <InternalOnline.h>
Definition at line 27 of file InternalOnline.h.
◆ deleter_f
| typedef void EventContainers::I_InternalIDC::deleter_f(const void *p) |
|
inherited |
◆ hashPair
◆ InternalConstItr
◆ InternalOnline()
Definition at line 16 of file InternalOnline.cxx.
17 m_mask(
cache->fullSize()), m_waitNeeded(
false) {}
EventContainers::IdentifiableCacheBase * m_cacheLink
const IIntersectionCache * cache() const
Retrieve the associated cache block, if it exists.
◆ ~InternalOnline()
| virtual EventContainers::InternalOnline::~InternalOnline |
( |
| ) |
|
|
virtualdefault |
◆ addLock()
Implements EventContainers::I_InternalIDC.
Definition at line 146 of file InternalOnline.cxx.
146 {
147 std::pair<bool, const void*> added =
m_cacheLink->addLock(hashId, ptr);
149 throw std::runtime_error("IDC WARNING Deletion shouldn't occur in addLock paradigm");
150 }
151 m_mask.set(hashId);
152 m_waitNeeded.store(true, std::memory_order_relaxed);
153 return StatusCode::SUCCESS;
154}
◆ cbegin()
◆ cend()
◆ cleanUp()
◆ destructor()
| void InternalOnline::destructor |
( |
deleter_f * | | ) |
|
|
overridevirtualnoexcept |
◆ fetchOrCreate() [1/2]
◆ fetchOrCreate() [2/2]
◆ findIndexPtr()
Implements EventContainers::I_InternalIDC.
Definition at line 138 of file InternalOnline.cxx.
138 {
139 if(hashId < m_mask.size() and m_mask.test(hashId)) {
141 return cacheLink->findWait(hashId);
142 }
143 return nullptr;
144}
std::vector< IdentifierHash > m_waitlist ATLAS_THREAD_SAFE
◆ fullSize()
| virtual size_t EventContainers::InternalOnline::fullSize |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
◆ getAllCurrentHashes()
| std::vector< IdentifierHash > InternalOnline::getAllCurrentHashes |
( |
| ) |
const |
|
overridevirtual |
◆ getAllHashPtrPair()
◆ indexFind()
Implements EventContainers::I_InternalIDC.
Definition at line 37 of file InternalOnline.cxx.
37 {
38 if(m_waitNeeded.load(std::memory_order_acquire))
wait();
40 if(itr!=
m_map.end() && itr->first==hashId)
return itr;
42}
EventContainers::hashPair< void > hashPair
constexpr value_type value() const
◆ insert()
◆ numberOfCollections()
| size_t InternalOnline::numberOfCollections |
( |
| ) |
const |
|
overridevirtual |
◆ removeCollection()
◆ resetMask()
| void InternalOnline::resetMask |
( |
| ) |
|
Definition at line 109 of file InternalOnline.cxx.
109 {
110 if(m_waitNeeded.load(std::memory_order_relaxed))
wait();
111 m_mask.clear();
113 m_waitNeeded.store(true, std::memory_order_relaxed);
114}
◆ tryAddFromCache() [1/2]
◆ tryAddFromCache() [2/2]
Implements EventContainers::I_InternalIDC.
Definition at line 69 of file InternalOnline.cxx.
69 {
71
72 if(!m_waitlist.empty()) m_waitNeeded.store(true, std::memory_order_relaxed);
73 if(flag > 0) {
74 if(flag!=3){
75 m_mask.set(hashId);
76 m_waitNeeded.store(true, std::memory_order_relaxed);
77 }
78 return true;
79 }
80 return false;
81}
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
◆ wait()
| void InternalOnline::wait |
( |
| ) |
const |
|
overridevirtual |
Implements EventContainers::I_InternalIDC.
Definition at line 44 of file InternalOnline.cxx.
44 {
45
46 std::scoped_lock
lock (m_waitMutex);
47 if(m_waitNeeded.load(std::memory_order_acquire) == false) return;
48 using namespace EventContainers;
50 while(!m_waitlist.empty()) {
51 IdentifierHash
hash = m_waitlist.back();
53 const void*
ptr = cacheLink->waitFor(hash);
54 if(ptr == ABORTstate) {
55 m_mask.unset(hash);
56 }
57 m_waitlist.pop_back();
58 }
60 m_mask.forEachSetBit([this](size_t index) {
62 m_map.emplace_back(index, ptr);
63 });
64
65
66 m_waitNeeded.store(false, std::memory_order_seq_cst);
67}
static constexpr uintptr_t ABORTEDflag
◆ ATLAS_THREAD_SAFE [1/5]
| std::atomic<bool> m_waitNeeded EventContainers::InternalOnline::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [2/5]
| IdentifierMask m_mask EventContainers::InternalOnline::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [3/5]
| std::mutex m_waitMutex EventContainers::InternalOnline::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [4/5]
◆ ATLAS_THREAD_SAFE [5/5]
| std::vector< IdentifierHash > m_waitlist EventContainers::InternalOnline::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ m_cacheLink
The documentation for this class was generated from the following files: