ATLAS Offline Software
Loading...
Searching...
No Matches
TObjectManager.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef XAODROOTACCESS_TOOLS_TOBJECTMANAGER_H
8#define XAODROOTACCESS_TOOLS_TOBJECTMANAGER_H
9
10// Local include(s):
13
14// System include(s).
15#include <memory>
16
17// Forward declaration(s):
18class TBranch;
19
20namespace xAOD {
21
30
31 public:
33 TObjectManager( ::TBranch* br = 0,
34 std::unique_ptr<THolder> holder = nullptr,
35 ::Bool_t renewOnRead = kFALSE );
37 TObjectManager( const TObjectManager& parent );
40
42 TObjectManager& operator=( const TObjectManager& parent );
43
45 ::TBranch* branch();
47 ::TBranch** branchPtr();
48
50 virtual ::Int_t getEntry( ::Int_t getall = 0 ) override;
51
53 virtual const void* object() const override;
55 virtual void* object() override;
57 virtual void setObject( void* obj ) override;
58
60 virtual ::Bool_t create() override;
62 virtual ::Bool_t isSet() const override;
64 virtual void reset() override;
65
66 private:
68 ::TBranch* m_branch;
70 ::Long64_t m_entry;
72 ::Bool_t m_isSet;
74 ::Bool_t m_renewOnRead;
75
76 }; // class TObjectManager
77
78} // namespace xAOD
79
80#endif // XAODROOTACCESS_TOOLS_TOBJECTMANAGER_H
Manager for EDM objects created by ROOT.
const THolder * holder() const
Accessor to the Holder object.
::TBranch ** branchPtr()
Pointer to the branch's pointer.
virtual void setObject(void *obj) override
Function replacing the object being handled.
::TBranch * m_branch
Pointer keeping track of the branch.
virtual::Int_t getEntry(::Int_t getall=0) override
Function for updating the object in memory if needed.
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::Bool_t isSet() const override
Check if the object was set for the current event.
~TObjectManager()
Destructor.
::Bool_t m_isSet
Was the object set for the current event?
::Bool_t m_renewOnRead
Should the object be recreated on each read?
TObjectManager(::TBranch *br=0, std::unique_ptr< THolder > holder=nullptr, ::Bool_t renewOnRead=kFALSE)
Constructor, getting hold of the created objects.
::Long64_t m_entry
The last entry that was loaded for this branch.
TObjectManager & operator=(const TObjectManager &parent)
Assignment operator.
::TBranch * branch()
Accessor to the branch.
virtual void reset() override
Reset the object at the end of processing of an event.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.