ATLAS Offline Software
Loading...
Searching...
No Matches
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):
15
16namespace xAOD::Experimental {
17
18ROutObjManager::ROutObjManager( std::string_view key, std::unique_ptr<THolder> holder )
19 :
21 m_key( key ),
22 m_isSet( kTRUE ) {}
23
25
27const 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
51const void* ROutObjManager::object() const {
52
53 return holder()->get();
54}
55
57
58 return holder()->get();
59}
60
65void ROutObjManager::setObject( void* obj ) {
66
67 holder()->set( obj );
68 m_isSet = kTRUE;
69 return;
70}
71
75
76 return m_isSet;
77}
78
82::Bool_t ROutObjManager::isSet() const {
83
84 return m_isSet;
85}
86
92
93 m_isSet = kFALSE;
94 return;
95}
96
97} // namespace xAOD::Experimental
IObjectManager(std::unique_ptr< THolder > holder)
Constructor.
const THolder * holder() const
Accessor to the Holder object.
::Bool_t m_isSet
Was the object set for the current event?
virtual void setObject(void *obj) override
Function replacing the object being handled.
virtual::Bool_t isSet() const override
Check if the object was set for the current event.
ROutObjManager(std::string_view key, std::unique_ptr< THolder > holder)
Constructor, getting hold of the created objects.
virtual const void * object() const override
Function getting a const pointer to the object being handled.
virtual::Bool_t create() override
Create the object for the current event.
virtual void reset() override
Reset the object at the end of processing of an event.
virtual::Int_t getEntry(::Int_t getall=0) override
Function for updating the object in memory if needed.
std::string m_key
The name of the (SG) key.
virtual void set(void *obj)
Replace the managed object.
Definition THolder.cxx:231
const void * get() const
Return a typeless const pointer to the held object.
Definition THolder.cxx:216
STL namespace.