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. | |
TObjectManager (const TObjectManager &parent) | |
Copy constructor. | |
~TObjectManager () | |
Destructor. | |
TObjectManager & | operator= (const TObjectManager &parent) |
Assignment operator. | |
::TBranch * | branch () const |
Accessor to the branch. | |
::TBranch ** | branchPtr () |
Pointer to the branch's pointer. | |
const THolder * | holder () const |
Accessor to the Holder object. | |
THolder * | holder () |
Accessor to the Holder object. | |
virtual ::Int_t | getEntry (::Long64_t entry,::Int_t getall=0) |
Function for updating the object in memory if needed. | |
virtual void * | object () const |
Function getting a pointer to the object being handled. | |
virtual void | setObject (void *obj) |
Function replacing the object being handled. | |
virtual ::Bool_t | isSet (::Bool_t forceSet=kTRUE) const |
Check if the object was set for the current event. | |
virtual void | reset () |
Reset the object at the end of processing of an event. |
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.
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.
Int_t xAOD::TObjectManager::getEntry | ( | ::Long64_t | entry, | |
::Int_t | getall = 0 | |||
) | [virtual] |
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.
entry | The entry to load for the held object |
Implements xAOD::TVirtualManager.
THolder * xAOD::TObjectManager::holder | ( | ) |
Accessor to the Holder object.
const THolder * xAOD::TObjectManager::holder | ( | ) | const |
Accessor to the Holder object.
void * xAOD::TObjectManager::object | ( | ) | const [virtual] |
Function getting a pointer to the object being handled.
This function gives an easy access to the object managed by this object.
Implements xAOD::TVirtualManager.
void xAOD::TObjectManager::reset | ( | ) | [virtual] |
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.
void xAOD::TObjectManager::setObject | ( | void * | obj | ) | [virtual] |
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.