ATLAS Offline Software
Loading...
Searching...
No Matches
RAuxManager.cxx
Go to the documentation of this file.
1// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3// Local include(s):
5
7
8
9namespace xAOD {
10
11RAuxManager::RAuxManager(RAuxStore* store, ::Long64_t& entry,
12 ::Bool_t sharedOwner)
13 : m_store(), m_storePtr(store), m_entry(entry) {
14
15 if (sharedOwner) {
16 m_store.reset(store);
17 }
18}
19
20::Int_t RAuxManager::getEntry(::Int_t getall) {
21
22 if (m_storePtr->getEntry(m_entry.get(), getall).isFailure()) {
23 return -1;
24 } else {
25 return 0;
26 }
27}
28
29const void* RAuxManager::object() const {
30
31 return m_storePtr;
32}
33
35
36 return m_storePtr;
37}
38
39void RAuxManager::setObject(void* ptr) {
40
41 if (m_store.get()) {
42 m_store.reset(reinterpret_cast<RAuxStore*>(ptr));
43 }
44 m_storePtr = reinterpret_cast<RAuxStore*>(ptr);
45
46 return;
47}
48
52
53 return kTRUE;
54}
55
60::Bool_t RAuxManager::isSet() const {
61
62 return kTRUE;
63}
64
70
71 // Clear the store if it's a container store:
73 m_storePtr->resize(0);
74 m_storePtr->reset();
75 }
76
77 return;
78}
79
84
86
87 return m_storePtr;
88}
89
90} // namespace xAOD
Interface for const operations on an auxiliary store.
const SG::IConstAuxStore * getConstStore() const
Get a convenience pointer to the managed object.
virtual::Bool_t isSet() const override
Check if the object was set for the current event.
virtual::Bool_t create() override
Create the object for the current event.
virtual::Int_t getEntry(::Int_t getall=0) override
Function for updating the object in memory if needed.
virtual void setObject(void *obj) override
Function replacing the object being handled.
RAuxManager(RAuxStore *store, ::Long64_t &entry, ::Bool_t sharedOwner=kTRUE)
Constructor getting hold of an auxiliary store object.
RAuxStore * getStore()
Get a type-specific pointer to the managed object.
std::reference_wrapper<::Long64_t > m_entry
Entry number.
Definition RAuxManager.h:62
virtual const void * object() const override
Function getting a const pointer to the object being handled.
std::shared_ptr< RAuxStore > m_store
The auxiliary store object.
Definition RAuxManager.h:58
virtual void reset() override
Reset the object at the end of processing of an event.
RAuxStore * m_storePtr
Pointer to the auxiliary store object.
Definition RAuxManager.h:60
"ROOT @c RNTuple implementation" of IAuxStore
Definition RAuxStore.h:38
@ kContainerStore
The object describes an entire container.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.