ATLAS Offline Software
|
Manager for EDM objects created by ROOT. More...
#include <TObjectManager.h>
Public Member Functions | |
TObjectManager (::TBranch *br=0, THolder *holder=0, ::Bool_t renewOnRead=kFALSE) | |
Constructor, getting hold of the created objects. More... | |
TObjectManager (const TObjectManager &parent) | |
Copy constructor. More... | |
~TObjectManager () | |
Destructor. More... | |
TObjectManager & | operator= (const TObjectManager &parent) |
Assignment operator. More... | |
::TBranch * | branch () |
Accessor to the branch. More... | |
::TBranch ** | branchPtr () |
Pointer to the branch's pointer. More... | |
const THolder * | holder () const |
Accessor to the Holder object. More... | |
THolder * | holder () |
Accessor to the Holder object. More... | |
virtual ::Int_t | getEntry (::Int_t getall=0) override |
Function for updating the object in memory if needed. More... | |
virtual const void * | object () const override |
Function getting a const pointer to the object being handled. More... | |
virtual void * | object () override |
Function getting a pointer to the object being handled. More... | |
virtual void | setObject (void *obj) override |
Function replacing the object being handled. More... | |
virtual ::Bool_t | create () override |
Create the object for the current event. More... | |
virtual ::Bool_t | isSet () const override |
Check if the object was set for the current event. More... | |
virtual void | reset () override |
Reset the object at the end of processing of an event. More... | |
Private Attributes | |
::TBranch * | m_branch |
Pointer keeping track of the branch. More... | |
THolder * | m_holder |
Holder object for the EDM object. More... | |
::Long64_t | m_entry |
The last entry that was loaded for this branch. More... | |
::Bool_t | m_isSet |
Was the object set for the current event? More... | |
::Bool_t | m_renewOnRead |
Should the object be recreated on each read? More... | |
Manager for EDM objects created by ROOT.
This class is used when an EDM object is meant to be created by ROOT's schema evolution system, behind the scenes.
Definition at line 29 of file TObjectManager.h.
xAOD::TObjectManager::TObjectManager | ( | ::TBranch * | br = 0 , |
THolder * | holder = 0 , |
||
::Bool_t | renewOnRead = kFALSE |
||
) |
Constructor, getting hold of the created objects.
Definition at line 18 of file TObjectManager.cxx.
xAOD::TObjectManager::TObjectManager | ( | const TObjectManager & | parent | ) |
Copy constructor.
Definition at line 24 of file TObjectManager.cxx.
xAOD::TObjectManager::~TObjectManager | ( | ) |
Destructor.
Definition at line 34 of file TObjectManager.cxx.
TBranch * xAOD::TObjectManager::branch | ( | ) |
Accessor to the branch.
Definition at line 64 of file TObjectManager.cxx.
TBranch ** xAOD::TObjectManager::branchPtr | ( | ) |
Pointer to the branch's pointer.
This sort of access to the internal TBranch object is needed when connecting to the input tree.
One has to make sure that the correct pointer is being pointed to by the input tree.
Definition at line 75 of file TObjectManager.cxx.
|
overridevirtual |
Create the object for the current event.
Dummy implementation as full objects can't be missing.
Implements xAOD::TVirtualManager.
Definition at line 198 of file TObjectManager.cxx.
|
overridevirtual |
Function for updating the object in memory if needed.
This function is used to load the contents of a branch only when it needs to be done.
It keeps track of which entry was already loaded for a branch/object, and only asks the branch to load an entry when it really has to be done.
Implements xAOD::TVirtualManager.
Definition at line 101 of file TObjectManager.cxx.
THolder * xAOD::TObjectManager::holder | ( | ) |
Accessor to the Holder object.
Definition at line 89 of file TObjectManager.cxx.
Accessor to the Holder object.
Definition at line 82 of file TObjectManager.cxx.
|
overridevirtual |
Check if the object was set for the current event.
kTRUE
if the object for this event was set, kFALSE
otherwise Implements xAOD::TVirtualManager.
Definition at line 206 of file TObjectManager.cxx.
|
overridevirtual |
Function getting a const pointer to the object being handled.
This function gives an easy access to the object managed by this object.
Implements xAOD::TVirtualManager.
Definition at line 175 of file TObjectManager.cxx.
|
overridevirtual |
Function getting a pointer to the object being handled.
Implements xAOD::TVirtualManager.
Definition at line 180 of file TObjectManager.cxx.
TObjectManager & xAOD::TObjectManager::operator= | ( | const TObjectManager & | parent | ) |
|
overridevirtual |
Reset the object at the end of processing of an event.
This function needs to be called after an event was filled into the output TTree.
It tells the manager object that it needs to wait for another object to be set up for the upcoming event.
Implements xAOD::TVirtualManager.
Definition at line 215 of file TObjectManager.cxx.
|
overridevirtual |
Function replacing the object being handled.
This is just a convenient way of calling THolder::Set from TEvent.
obj | The object to replace the previously managed one |
Implements xAOD::TVirtualManager.
Definition at line 189 of file TObjectManager.cxx.
|
private |
Pointer keeping track of the branch.
Definition at line 71 of file TObjectManager.h.
|
private |
The last entry that was loaded for this branch.
Definition at line 75 of file TObjectManager.h.
|
private |
Holder object for the EDM object.
Definition at line 73 of file TObjectManager.h.
|
private |
Was the object set for the current event?
Definition at line 77 of file TObjectManager.h.
|
private |
Should the object be recreated on each read?
Definition at line 79 of file TObjectManager.h.