ATLAS Offline Software
TObjectManager.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2023 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):
11 #include "TVirtualManager.h"
12 
13 // Forward declaration(s):
14 class TBranch;
15 
16 namespace xAOD {
17 
18  // Forward declaration(s):
19  class THolder;
20 
30 
31  public:
33  TObjectManager( ::TBranch* br = 0, THolder* holder = 0,
34  ::Bool_t renewOnRead = kFALSE );
39 
42 
44  ::TBranch* branch();
46  ::TBranch** branchPtr();
48  const THolder* holder() const;
50  THolder* holder();
51 
53  virtual ::Int_t getEntry( ::Int_t getall = 0 ) override;
54 
56  virtual const void* object() const override;
58  virtual void* object() override;
60  virtual void setObject( void* obj ) override;
61 
63  virtual ::Bool_t create() override;
65  virtual ::Bool_t isSet() const override;
67  virtual void reset() override;
68 
69  private:
71  ::TBranch* m_branch;
75  ::Long64_t m_entry;
77  ::Bool_t m_isSet;
79  ::Bool_t m_renewOnRead;
80 
81  }; // class TObjectManager
82 
83 } // namespace xAOD
84 
85 #endif // XAODROOTACCESS_TOOLS_TOBJECTMANAGER_H
xAOD::TObjectManager::create
virtual ::Bool_t create() override
Create the object for the current event.
Definition: TObjectManager.cxx:198
xAOD::TObjectManager::m_branch
::TBranch * m_branch
Pointer keeping track of the branch.
Definition: TObjectManager.h:71
xAOD::THolder
This class takes care of holding EDM objects in memory.
Definition: THolder.h:35
xAOD::TObjectManager::branchPtr
::TBranch ** branchPtr()
Pointer to the branch's pointer.
Definition: TObjectManager.cxx:75
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TObjectManager::~TObjectManager
~TObjectManager()
Destructor.
Definition: TObjectManager.cxx:34
xAOD::TVirtualManager
Interface class for the "manager classes".
Definition: TVirtualManager.h:24
xAOD::TObjectManager::m_entry
::Long64_t m_entry
The last entry that was loaded for this branch.
Definition: TObjectManager.h:75
xAOD::TObjectManager::operator=
TObjectManager & operator=(const TObjectManager &parent)
Assignment operator.
Definition: TObjectManager.cxx:42
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::TObjectManager::m_isSet
::Bool_t m_isSet
Was the object set for the current event?
Definition: TObjectManager.h:77
xAOD::TObjectManager::m_renewOnRead
::Bool_t m_renewOnRead
Should the object be recreated on each read?
Definition: TObjectManager.h:79
xAOD::TObjectManager::isSet
virtual ::Bool_t isSet() const override
Check if the object was set for the current event.
Definition: TObjectManager.cxx:206
xAOD::TObjectManager
Manager for EDM objects created by ROOT.
Definition: TObjectManager.h:29
TVirtualManager.h
xAOD::TObjectManager::getEntry
virtual ::Int_t getEntry(::Int_t getall=0) override
Function for updating the object in memory if needed.
Definition: TObjectManager.cxx:101
xAOD::TObjectManager::holder
const THolder * holder() const
Accessor to the Holder object.
Definition: TObjectManager.cxx:82
xAOD::TObjectManager::reset
virtual void reset() override
Reset the object at the end of processing of an event.
Definition: TObjectManager.cxx:215
xAOD::TObjectManager::TObjectManager
TObjectManager(::TBranch *br=0, THolder *holder=0, ::Bool_t renewOnRead=kFALSE)
Constructor, getting hold of the created objects.
Definition: TObjectManager.cxx:18
xAOD::TObjectManager::branch
::TBranch * branch()
Accessor to the branch.
Definition: TObjectManager.cxx:64
python.PyAthena.obj
obj
Definition: PyAthena.py:132
xAOD::TObjectManager::setObject
virtual void setObject(void *obj) override
Function replacing the object being handled.
Definition: TObjectManager.cxx:189
xAOD::TObjectManager::object
virtual const void * object() const override
Function getting a const pointer to the object being handled.
Definition: TObjectManager.cxx:175
PlotCalibFromCool.br
br
Definition: PlotCalibFromCool.py:355
xAOD::TObjectManager::m_holder
THolder * m_holder
Holder object for the EDM object.
Definition: TObjectManager.h:73