19 std::unique_ptr<THolder>
holder,
20 ::Bool_t renewOnRead )
38 if(
this == &parent ) {
43 IObjectManager::operator=(parent);
79 Error(
"xAOD::TObjectManager::getEntry",
80 XAOD_MESSAGE(
"Branch=%s is not associated to any tree while reading of branches within this class relies on that"),
90 ::Long64_t entry =
m_branch->GetTree()->GetReadEntry();
98 Error(
"xAOD::TObjectManager::getEntry",
99 XAOD_MESSAGE(
"Entry to read is not set for branch=%s from tree=%s. "
100 "It is either because TTree::LoadTree(entry) was not called "
101 "beforehand in the TEvent class OR "
102 "the entry requested to be read for the main tree is not corresponding to an event for the friend tree" ),
109 if( entry ==
m_entry )
return 0;
122 const ::Int_t nbytes =
m_branch->GetEntry( entry, getall );
IObjectManager(std::unique_ptr< THolder > holder)
Constructor.
const THolder * holder() const
Accessor to the Holder object.
virtual void set(void *obj)
Replace the managed object.
void renew()
Renew the object in memory.
const void * get() const
Return a typeless const pointer to the held 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.