![]() |
ATLAS Offline Software
|
Manager for EDM objects created by ROOT. More...
#include <RObjectManager.h>
Public Member Functions | |
| RObjectManager (ROOT::RNTupleView< void > field, const ::Long64_t &entry, std::unique_ptr< THolder > holder) | |
| Constructor. More... | |
| ~RObjectManager () | |
| Destructor. More... | |
| ROOT::RNTupleView< void > & | field () |
| Accessor to the field (non-const) More... | |
| const ROOT::RNTupleView< void > & | field () const |
| Accessor to the field (const) 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 | |
| ROOT::RNTupleView< void > | m_field |
| The typeless object taking care of reading the field. More... | |
| std::unique_ptr< THolder > | m_holder |
| Holder object for the EDM object. More... | |
| std::reference_wrapper< const ::Long64_t > | m_entryToLoad |
| Entry number to load next. More... | |
| ::Long64_t | m_entry |
| The last entry that was loaded for this field. More... | |
| ::Bool_t | m_isSet |
| Was the object set for the current event? 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 30 of file RObjectManager.h.
| xAOD::Experimental::RObjectManager::RObjectManager | ( | ROOT::RNTupleView< void > | field, |
| const ::Long64_t & | entry, | ||
| std::unique_ptr< THolder > | holder | ||
| ) |
|
default |
Destructor.
|
overridevirtual |
Create the object for the current event.
Dummy implementation as full objects can't be missing.
Implements xAOD::TVirtualManager.
Definition at line 100 of file RObjectManager.cxx.
| ROOT::RNTupleView< void > & xAOD::Experimental::RObjectManager::field | ( | ) |
Accessor to the field (non-const)
Definition at line 27 of file RObjectManager.cxx.
| const ROOT::RNTupleView< void > & xAOD::Experimental::RObjectManager::field | ( | ) | const |
Accessor to the field (const)
Definition at line 32 of file RObjectManager.cxx.
|
overridevirtual |
Function for updating the object in memory if needed.
This function is used to load the contents of a field only when it needs to be done.
It keeps track of which entry was already loaded for a field/object, and only asks the RNTupleView for the field to load an entry when it really has to be done. The next entry to load (m_entryToLoad) is managed by the owning Event object, set in this object's constructor.
Implements xAOD::TVirtualManager.
Definition at line 45 of file RObjectManager.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 108 of file RObjectManager.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 77 of file RObjectManager.cxx.
|
overridevirtual |
Function getting a pointer to the object being handled.
Implements xAOD::TVirtualManager.
Definition at line 82 of file RObjectManager.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 117 of file RObjectManager.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 91 of file RObjectManager.cxx.
|
private |
The last entry that was loaded for this field.
Definition at line 69 of file RObjectManager.h.
|
private |
Entry number to load next.
Definition at line 67 of file RObjectManager.h.
|
private |
The typeless object taking care of reading the field.
Definition at line 63 of file RObjectManager.h.
|
private |
Holder object for the EDM object.
Definition at line 65 of file RObjectManager.h.
|
private |
Was the object set for the current event?
Definition at line 71 of file RObjectManager.h.
1.8.18