ATLAS Offline Software
Loading...
Searching...
No Matches
TAuxManager.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
14namespace 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;
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
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:
91 if( m_storePtr->structMode() ==
93 m_storePtr->resize( 0 );
94 m_storePtr->reset();
95 }
96
97 return;
98 }
99
101
102 return m_storePtr;
103 }
104
106
107 return m_storePtr;
108 }
109
110} // namespace xAOD
Interface for const operations on an auxiliary store.
TAuxManager(TAuxStore *store, ::Bool_t sharedOwner=kTRUE)
Constructor getting hold of an auxiliary store object.
virtual void reset() override
Reset the object at the end of processing of an event.
virtual::Bool_t create() override
Create the object for the current event.
TAuxStore * m_storePtr
Pointer to the auxiliary store object.
Definition TAuxManager.h:70
TAuxStore * getStore()
Get a type-specific pointer to the managed object.
virtual::Int_t getEntry(::Int_t getall=0) override
Function for updating the object in memory if needed.
virtual::Bool_t isSet() const override
Check if the object was set for the current event.
virtual void setObject(void *obj) override
Function replacing the object being handled.
TAuxManager & operator=(const TAuxManager &rhs)
Assignment operator.
std::shared_ptr< TAuxStore > m_store
The auxiliary store object.
Definition TAuxManager.h:68
const SG::IConstAuxStore * getConstStore() const
Get a convenience pointer to the managed object.
virtual const void * object() const override
Function getting a const pointer to the object being handled.
"ROOT @c TTree implementation" of IAuxStore
Definition TAuxStore.h:30
@ kContainerStore
The object describes an entire container.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.