ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
xAODRootAccess
Root
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):
10
#include "
xAODRootAccess/tools/TAuxManager.h
"
11
#include "
xAODRootAccess/tools/Message.h
"
12
#include "
xAODRootAccess/TAuxStore.h
"
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
24
TAuxManager::TAuxManager
(
const
TAuxManager
& parent )
25
:
m_store
( parent.
m_store
),
m_storePtr
( parent.
m_storePtr
) {
26
27
}
28
29
TAuxManager
&
TAuxManager::operator=
(
const
TAuxManager
& rhs ) {
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
53
void
*
TAuxManager::object
() {
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
88
void
TAuxManager::reset
() {
89
90
// Clear the store if it's a container store:
91
if
(
m_storePtr
->structMode() ==
92
TAuxStore::EStructMode::kContainerStore
) {
93
m_storePtr
->resize( 0 );
94
m_storePtr
->reset();
95
}
96
97
return
;
98
}
99
100
TAuxStore
*
TAuxManager::getStore
() {
101
102
return
m_storePtr
;
103
}
104
105
const
SG::IConstAuxStore*
TAuxManager::getConstStore
()
const
{
106
107
return
m_storePtr
;
108
}
109
110
}
// namespace xAOD
Message.h
TAuxManager.h
TAuxStore.h
xAOD::TAuxManager::TAuxManager
TAuxManager(TAuxStore *store, ::Bool_t sharedOwner=kTRUE)
Constructor getting hold of an auxiliary store object.
Definition
TAuxManager.cxx:16
xAOD::TAuxManager::reset
virtual void reset() override
Reset the object at the end of processing of an event.
Definition
TAuxManager.cxx:88
xAOD::TAuxManager::create
virtual::Bool_t create() override
Create the object for the current event.
Definition
TAuxManager.cxx:70
xAOD::TAuxManager::m_storePtr
TAuxStore * m_storePtr
Pointer to the auxiliary store object.
Definition
TAuxManager.h:70
xAOD::TAuxManager::getStore
TAuxStore * getStore()
Get a type-specific pointer to the managed object.
Definition
TAuxManager.cxx:100
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::isSet
virtual::Bool_t isSet() const override
Check if the object was set for the current event.
Definition
TAuxManager.cxx:79
xAOD::TAuxManager::setObject
virtual void setObject(void *obj) override
Function replacing the object being handled.
Definition
TAuxManager.cxx:58
xAOD::TAuxManager::operator=
TAuxManager & operator=(const TAuxManager &rhs)
Assignment operator.
Definition
TAuxManager.cxx:29
xAOD::TAuxManager::m_store
std::shared_ptr< TAuxStore > m_store
The auxiliary store object.
Definition
TAuxManager.h:68
xAOD::TAuxManager::getConstStore
const SG::IConstAuxStore * getConstStore() const
Get a convenience pointer to the managed object.
Definition
TAuxManager.cxx:105
xAOD::TAuxManager::object
virtual const void * object() const override
Function getting a const pointer to the object being handled.
Definition
TAuxManager.cxx:48
xAOD::TAuxStore
"ROOT @c TTree implementation" of IAuxStore
Definition
TAuxStore.h:31
xAOD::details::AuxStoreBase::EStructMode::kContainerStore
@ kContainerStore
The object describes an entire container.
Definition
AuxStoreBase.h:32
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
Generated on
for ATLAS Offline Software by
1.17.0