34 if( parent.m_holder ) {
35 m_holder = new THolder( *parent.m_holder );
37 if( parent.m_vector ) {
38 m_vector = SG::AuxTypeRegistry::instance().makeVector( m_auxId, (size_t)0, (size_t)0 ).release();
39 m_vector->resize( 1 );
109 Error(
"xAOD::TPrimitiveAuxBranchManager::getEntry",
110 XAOD_MESSAGE(
"Branch=%s is not associated to any tree while reading of branches within this class relies on that"),
120 ::Long64_t entry =
m_branch->GetTree()->GetReadEntry();
128 Error(
"xAOD::TPrimitiveAuxBranchManager::getEntry",
129 XAOD_MESSAGE(
"Entry to read is not set for branch=%s from tree=%s. "
130 "It is either because TTree::LoadTree(entry) was not called "
131 "beforehand in the TEvent class OR "
132 "the entry requested to be read for the main tree is not corresponding to an event for the friend tree" ),
139 if( entry ==
m_entry )
return 0;
142 const ::Int_t nbytes =
m_branch->GetEntry( entry, getall );
154 return std::as_const(*m_holder).get();
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
std::unique_ptr< IAuxTypeVector > makeVector(SG::auxid_t auxid, size_t size, size_t capacity) const
Construct a new vector to hold an aux item.
This class takes care of holding EDM objects in memory.
Manager for primitive auxiliary branches created dynamically.
SG::IAuxTypeVector * m_vector
Dummy auxiliary variable for the empty events.
::Long64_t m_entry
The last entry that was loaded for this branch.
const THolder * holder() const
Accessor to the Holder object (constant version)
SG::auxid_t auxid_t
Definition of the auxiliary ID type.
::Bool_t m_isSet
Was the variable set for the current event?
::TBranch * branch()
Accessor to the branch.
~TPrimitiveAuxBranchManager()
Destructor.
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::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.
THolder * m_holder
Holder object for the EDM object.
auxid_t m_auxId
Auxiliary variable type.
::TBranch ** branchPtr()
Pointer to the branch's pointer.
TPrimitiveAuxBranchManager & operator=(const TPrimitiveAuxBranchManager &rhs)
Assignment operator.
virtual const void * object() const override
Function getting a const pointer to the object being handled.
virtual::Bool_t isSet() const override
Check if the object was set for the current event.
TPrimitiveAuxBranchManager(auxid_t auxid, ::TBranch *br=0, THolder *holder=0)
Constructor getting hold of a possible branch.
Interface class for the "manager classes".
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.