ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
xAODRootAccess
Root
ROutObjManager.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
// ROOT include(s):
7
#include <TBranch.h>
8
#include <TTree.h>
9
#include <TError.h>
10
11
// Local include(s):
12
#include "
xAODRootAccess/tools/ROutObjManager.h
"
13
#include "
xAODRootAccess/tools/THolder.h
"
14
#include "
xAODRootAccess/tools/Message.h
"
15
16
namespace
xAOD::Experimental
{
17
18
ROutObjManager::ROutObjManager
( std::string_view
key
, std::unique_ptr<THolder>
holder
)
19
:
20
IObjectManager
(
std
::move(
holder
)),
21
m_key
(
key
),
22
m_isSet
( kTRUE ) {}
23
24
ROutObjManager::~ROutObjManager
() =
default
;
25
27
const
std::string&
ROutObjManager::key
() {
28
return
m_key
;
29
}
30
32
40
::Int_t
ROutObjManager::getEntry
( ::Int_t
/*getall*/
) {
41
42
return
0;
43
}
44
45
51
const
void
*
ROutObjManager::object
()
const
{
52
53
return
holder
()->
get
();
54
}
55
56
void
*
ROutObjManager::object
() {
57
58
return
holder
()->
get
();
59
}
60
65
void
ROutObjManager::setObject
(
void
* obj ) {
66
67
holder
()->
set
( obj );
68
m_isSet
= kTRUE;
69
return
;
70
}
71
74
::Bool_t
ROutObjManager::create
() {
75
76
return
m_isSet
;
77
}
78
82
::Bool_t
ROutObjManager::isSet
()
const
{
83
84
return
m_isSet
;
85
}
86
91
void
ROutObjManager::reset
() {
92
93
m_isSet
= kFALSE;
94
return
;
95
}
96
97
}
// namespace xAOD::Experimental
Message.h
ROutObjManager.h
THolder.h
xAOD::Details::IObjectManager::IObjectManager
IObjectManager(std::unique_ptr< THolder > holder)
Constructor.
Definition
IObjectManager.cxx:8
xAOD::Details::IObjectManager::holder
const THolder * holder() const
Accessor to the Holder object.
Definition
IObjectManager.cxx:43
xAOD::Experimental::ROutObjManager::m_isSet
::Bool_t m_isSet
Was the object set for the current event?
Definition
ROutObjManager.h:60
xAOD::Experimental::ROutObjManager::setObject
virtual void setObject(void *obj) override
Function replacing the object being handled.
Definition
ROutObjManager.cxx:65
xAOD::Experimental::ROutObjManager::isSet
virtual::Bool_t isSet() const override
Check if the object was set for the current event.
Definition
ROutObjManager.cxx:82
xAOD::Experimental::ROutObjManager::ROutObjManager
ROutObjManager(std::string_view key, std::unique_ptr< THolder > holder)
Constructor, getting hold of the created objects.
Definition
ROutObjManager.cxx:18
xAOD::Experimental::ROutObjManager::object
virtual const void * object() const override
Function getting a const pointer to the object being handled.
Definition
ROutObjManager.cxx:51
xAOD::Experimental::ROutObjManager::create
virtual::Bool_t create() override
Create the object for the current event.
Definition
ROutObjManager.cxx:74
xAOD::Experimental::ROutObjManager::key
const std::string & key()
Definition
ROutObjManager.cxx:27
xAOD::Experimental::ROutObjManager::reset
virtual void reset() override
Reset the object at the end of processing of an event.
Definition
ROutObjManager.cxx:91
xAOD::Experimental::ROutObjManager::getEntry
virtual::Int_t getEntry(::Int_t getall=0) override
Function for updating the object in memory if needed.
Definition
ROutObjManager.cxx:40
xAOD::Experimental::ROutObjManager::~ROutObjManager
~ROutObjManager()
Destructor.
xAOD::Experimental::ROutObjManager::m_key
std::string m_key
The name of the (SG) key.
Definition
ROutObjManager.h:58
xAOD::THolder::set
virtual void set(void *obj)
Replace the managed object.
Definition
THolder.cxx:231
xAOD::THolder::get
const void * get() const
Return a typeless const pointer to the held object.
Definition
THolder.cxx:216
std
STL namespace.
xAOD::Experimental
Definition
RAuxFieldManager.cxx:16
Generated on
for ATLAS Offline Software by
1.17.0