ATLAS Offline Software
TAuxManager.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 // ROOT include(s):
7 #include <TError.h>
8 
9 // Local include(s):
13 
14 namespace xAOD {
15 
16  TAuxManager::TAuxManager( TAuxStore* store, ::Bool_t sharedOwner )
17  : m_store(), m_storePtr( store ) {
18 
19  if( sharedOwner ) {
20  m_store.reset( store );
21  }
22  }
23 
25  : m_store( parent.m_store ), m_storePtr( parent.m_storePtr ) {
26 
27  }
28 
30 
31  // Check if anything needs to be done:
32  if( this == &rhs ) {
33  return *this;
34  }
35 
36  // Do the assignment:
37  m_store = rhs.m_store;
38  m_storePtr = rhs.m_storePtr;
39 
40  return *this;
41  }
42 
43  ::Int_t TAuxManager::getEntry( ::Int_t getall ) {
44 
45  return m_storePtr->getEntry( getall );
46  }
47 
48  const void* TAuxManager::object() const {
49 
50  return m_storePtr;
51  }
52 
54 
55  return m_storePtr;
56  }
57 
58  void TAuxManager::setObject( void* ptr ) {
59 
60  if( m_store.get() ) {
61  m_store.reset( reinterpret_cast< TAuxStore* >( ptr ) );
62  }
63  m_storePtr = reinterpret_cast< TAuxStore* >( ptr );
64 
65  return;
66  }
67 
70  ::Bool_t TAuxManager::create() {
71 
72  return kTRUE;
73  }
74 
79  ::Bool_t TAuxManager::isSet() const {
80 
81  return kTRUE;
82  }
83 
89 
90  // Clear the store if it's a container store:
92  m_storePtr->resize( 0 );
93  m_storePtr->reset();
94  }
95 
96  return;
97  }
98 
100 
101  return m_storePtr;
102  }
103 
105 
106  return m_storePtr;
107  }
108 
109 } // namespace xAOD
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:71
xAOD::TAuxManager::setObject
virtual void setObject(void *obj) override
Function replacing the object being handled.
Definition: TAuxManager.cxx:58
xAOD::TAuxManager::getStore
TAuxStore * getStore()
Get a type-specific pointer to the managed object.
Definition: TAuxManager.cxx:99
xAOD::TAuxStore::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition: TAuxStore.cxx:611
xAOD::TAuxManager::getConstStore
const SG::IConstAuxStore * getConstStore() const
Get a convenience pointer to the managed object.
Definition: TAuxManager.cxx:104
xAOD::TAuxStore
"ROOT implementation" of IAuxStore
Definition: TAuxStore.h:46
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TAuxManager::reset
virtual void reset() override
Reset the object at the end of processing of an event.
Definition: TAuxManager.cxx:88
xAOD::TAuxManager::object
virtual const void * object() const override
Function getting a const pointer to the object being handled.
Definition: TAuxManager.cxx:48
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
xAOD::TAuxManager::operator=
TAuxManager & operator=(const TAuxManager &rhs)
Assignment operator.
Definition: TAuxManager.cxx:29
xAOD::TAuxStore::reset
void reset()
Tell the object that all branches will need to be re-read.
Definition: TAuxStore.cxx:274
xAOD::TAuxManager::isSet
virtual ::Bool_t isSet() const override
Check if the object was set for the current event.
Definition: TAuxManager.cxx:79
TAuxStore.h
Message.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::TAuxStore::getEntry
Int_t getEntry(Int_t getall=0)
Read the values from the TTree entry that was loaded with TTree::LoadTree()
Definition: TAuxStore.cxx:228
xAOD::TAuxManager::create
virtual ::Bool_t create() override
Create the object for the current event.
Definition: TAuxManager.cxx:70
xAOD::TAuxStore::kContainerStore
@ kContainerStore
The object describes an entire container.
Definition: TAuxStore.h:55
TAuxManager.h
xAOD::TAuxManager::getEntry
virtual ::Int_t getEntry(::Int_t getall=0) override
Function for updating the object in memory if needed.
Definition: TAuxManager.cxx:43
xAOD::TAuxManager
Manager for TAuxStore objects.
Definition: TAuxManager.h:33
xAOD::TAuxManager::TAuxManager
TAuxManager(TAuxStore *store, ::Bool_t sharedOwner=kTRUE)
Constructor getting hold of an auxiliary store object.
Definition: TAuxManager.cxx:16
xAOD::TAuxManager::m_storePtr
TAuxStore * m_storePtr
Pointer to the auxiliary store object.
Definition: TAuxManager.h:70
xAOD::TAuxStore::structMode
EStructMode structMode() const
Get what structure mode the object was constructed with.
Definition: TAuxStore.cxx:88
xAOD::TAuxManager::m_store
std::shared_ptr< TAuxStore > m_store
The auxiliary store object.
Definition: TAuxManager.h:68
SG::IConstAuxStore
Interface for const operations on an auxiliary store.
Definition: IConstAuxStore.h:64