![]() |
ATLAS Offline Software
|
Manager for EDM objects created by ROOT. More...
#include <TObjectManager.h>
Public Member Functions | |
| TObjectManager (::TBranch *br=0, std::unique_ptr< THolder > holder=nullptr, ::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... | |
| 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... | |
| const THolder * | holder () const |
| Accessor to the Holder object. More... | |
| THolder * | holder () |
| Accessor to the Holder object. More... | |
Private Attributes | |
| ::TBranch * | m_branch |
| Pointer keeping track of the branch. 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... | |
| std::unique_ptr< THolder > | m_holder |
| Object holding onto an EDM object in memory. 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, |
| std::unique_ptr< THolder > | holder = nullptr, |
||
| ::Bool_t | renewOnRead = kFALSE |
||
| ) |
| xAOD::TObjectManager::TObjectManager | ( | const TObjectManager & | parent | ) |
|
default |
Destructor.
| TBranch * xAOD::TObjectManager::branch | ( | ) |
Accessor to the branch.
Definition at line 51 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 62 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 171 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 74 of file TObjectManager.cxx.
|
inherited |
Accessor to the Holder object.
Definition at line 48 of file IObjectManager.cxx.
Accessor to the Holder object.
Definition at line 43 of file IObjectManager.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 179 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 148 of file TObjectManager.cxx.
|
overridevirtual |
Function getting a pointer to the object being handled.
Implements xAOD::TVirtualManager.
Definition at line 153 of file TObjectManager.cxx.
| TObjectManager & xAOD::TObjectManager::operator= | ( | const TObjectManager & | parent | ) |
Assignment operator.
Definition at line 35 of file TObjectManager.cxx.
|
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 188 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 162 of file TObjectManager.cxx.
|
private |
Pointer keeping track of the branch.
Definition at line 68 of file TObjectManager.h.
|
private |
The last entry that was loaded for this branch.
Definition at line 70 of file TObjectManager.h.
|
privateinherited |
Object holding onto an EDM object in memory.
Definition at line 44 of file IObjectManager.h.
|
private |
Was the object set for the current event?
Definition at line 72 of file TObjectManager.h.
|
private |
Should the object be recreated on each read?
Definition at line 74 of file TObjectManager.h.
1.8.18