 |
ATLAS Offline Software
|
Class used for the test.
More...
|
| REventClass (xAOD::Experimental::REvent::EAuxMode mode) |
| Constructor. More...
|
|
StatusCode | loadInputObjects () |
| Function loading all interface objects of the event. More...
|
|
EAuxMode | auxMode () const |
| Get what auxiliary access mode the object was constructed with. More...
|
|
std::string | dump () |
| Function creating a user-readable dump of the current input. More...
|
|
void | printIOStats () const |
| Function printing the I/O statistics of the current process. More...
|
|
void | setPrintEventProxyWarnings (bool) |
| Function to silence warnings associated with broken element links. More...
|
|
template<typename T > |
bool | retrieve (const T *&obj, sgkey_t key=DEFAULT_KEY, bool silent=false) |
| Function retrieving an object from the event (constant version) More...
|
|
template<typename T > |
bool | retrieve (const T *&obj, const std::string &key, bool silent=false) |
| Function retrieving an object from the event (constant version) More...
|
|
template<typename T > |
void | keys (std::vector< std::string > &vkeys, bool metadata=false) const |
| provide list of all keys associated with provided type. More...
|
|
|
StatusCode | readFrom (const std::string &fileName) |
| This function takes care of connecting the event object to a new input file. More...
|
|
void | setActive () const |
| Set this event object as the currently active one. More...
|
|
void | setAuxItemList (const std::string &containerKey, const std::string &itemList) |
| Configure which dynamic variables to write out for a given store. More...
|
|
StatusCode | addListener (TVirtualIncidentListener *listener) |
| Register an incident listener object. More...
|
|
StatusCode | removeListener (TVirtualIncidentListener *listener) |
| Remove an incident listener object. More...
|
|
void | clearListeners () |
| Remove all listeners from the object. More...
|
|
StatusCode | addNameRemap (const std::string &onfile, const std::string &newName) |
| Add a name re-mapping rule. More...
|
|
void | clearNameRemap () |
| Clear the current name re-mapping. More...
|
|
void | printNameRemap () const |
| Print the current name re-mapping rules. More...
|
|
|
template<typename T > |
::Bool_t | contains (const std::string &key) |
| Function checking if an object is available from the store. More...
|
|
template<typename T > |
::Bool_t | transientContains (const std::string &key) const |
| Function checking if an object is already in memory. More...
|
|
template<typename T > |
StatusCode | retrieve (const T *&obj, const std::string &key) |
| Retrieve either an input or an output object from the event. More...
|
|
template<typename T > |
StatusCode | retrieve (T *&obj, const std::string &key) |
| Retrieve an output object from the event. More...
|
|
|
template<typename T > |
::Bool_t | containsMeta (const std::string &key) |
| Function checking if a meta-object is available from the store. More...
|
|
template<typename T > |
::Bool_t | transientContainsMeta (const std::string &key) const |
| Function checking if a meta-object is already in memory. More...
|
|
template<typename T > |
StatusCode | retrieveMetaInput (const T *&obj, const std::string &key) |
| Retrieve an input metadata object. More...
|
|
template<typename T > |
StatusCode | retrieveMetaOutput (const T *&obj, const std::string &key) |
| Retrieve an output metadata object. More...
|
|
template<typename T > |
StatusCode | recordMeta (T *obj, const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=1) |
| Add an object to the output file's metadata. More...
|
|
template<typename T > |
StatusCode | recordMeta (std::unique_ptr< T > obj, const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=1) |
| Add an object to the output file's metadata, explicitly taking ownership of it. More...
|
|
|
::Long64_t | getEntries () const |
| Get how many entries are available from the current input file(s) More...
|
|
::Int_t | getEntry (::Long64_t entry, ::Int_t getall=0) |
| Function loading a given entry of the input TTree. More...
|
|
const EventFormat * | inputEventFormat () const |
| RDS: Only valid for TChains, i.e. More...
|
|
|
StatusCode | readFrom (const std::string &fileName) |
| This function takes care of connecting the event object to a new input file. More...
|
|
void | setActive () const |
| Set this event object as the currently active one. More...
|
|
void | setAuxItemList (const std::string &containerKey, const std::string &itemList) |
| Configure which dynamic variables to write out for a given store. More...
|
|
StatusCode | addListener (TVirtualIncidentListener *listener) |
| Register an incident listener object. More...
|
|
StatusCode | removeListener (TVirtualIncidentListener *listener) |
| Remove an incident listener object. More...
|
|
void | clearListeners () |
| Remove all listeners from the object. More...
|
|
StatusCode | addNameRemap (const std::string &onfile, const std::string &newName) |
| Add a name re-mapping rule. More...
|
|
void | clearNameRemap () |
| Clear the current name re-mapping. More...
|
|
void | printNameRemap () const |
| Print the current name re-mapping rules. More...
|
|
|
template<typename T > |
::Bool_t | contains (const std::string &key) |
| Function checking if an object is available from the store. More...
|
|
template<typename T > |
::Bool_t | transientContains (const std::string &key) const |
| Function checking if an object is already in memory. More...
|
|
template<typename T > |
StatusCode | retrieve (const T *&obj, const std::string &key) |
| Retrieve either an input or an output object from the event. More...
|
|
template<typename T > |
StatusCode | retrieve (T *&obj, const std::string &key) |
| Retrieve an output object from the event. More...
|
|
|
template<typename T > |
::Bool_t | containsMeta (const std::string &key) |
| Function checking if a meta-object is available from the store. More...
|
|
template<typename T > |
::Bool_t | transientContainsMeta (const std::string &key) const |
| Function checking if a meta-object is already in memory. More...
|
|
template<typename T > |
StatusCode | retrieveMetaInput (const T *&obj, const std::string &key) |
| Retrieve an input metadata object. More...
|
|
template<typename T > |
StatusCode | retrieveMetaOutput (const T *&obj, const std::string &key) |
| Retrieve an output metadata object. More...
|
|
template<typename T > |
StatusCode | recordMeta (T *obj, const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=1) |
| Add an object to the output file's metadata. More...
|
|
template<typename T > |
StatusCode | recordMeta (std::unique_ptr< T > obj, const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=1) |
| Add an object to the output file's metadata, explicitly taking ownership of it. More...
|
|
|
::Long64_t | getEntries () const |
| Get how many entries are available from the current input file(s) More...
|
|
::Int_t | getEntry (::Long64_t entry, ::Int_t getall=0) |
| Function loading a given entry of the input TTree. More...
|
|
const EventFormat * | inputEventFormat () const |
| RDS: Only valid for TChains, i.e. More...
|
|
|
typedef std::unordered_map< std::string, TVirtualManager * > | Object_t |
| Definition of the internal data structure type. More...
|
|
typedef std::vector< TVirtualIncidentListener * > | Listener_t |
| Definition of the structure type holding on to listeners. More...
|
|
|
::Bool_t | contains (const std::string &key, const std::type_info &ti, ::Bool_t metadata=kFALSE) |
| Internal function checking if an object is in the input. More...
|
|
::Bool_t | transientContains (const std::string &key, const std::type_info &ti, ::Bool_t metadata=kFALSE) const |
| Internal function checking if an object is already in memory. More...
|
|
void * | getOutputObject (const std::string &key, const std::type_info &ti, ::Bool_t metadata=kFALSE) const |
| This function does the heavy lifting of retrieving object from the list of output objects. More...
|
|
const void * | getInputObject (const std::string &key, const std::type_info &ti, ::Bool_t silent=kFALSE, ::Bool_t metadata=kFALSE) |
| Function for retrieving an input object in a non-template way. More...
|
|
StatusCode | initStats () |
| Function to initialise the statistics for all Tree content. More...
|
|
StatusCode | connectBranch (const std::string &key, ::Bool_t silent=kFALSE) |
| Function setting up access to a particular branch. More...
|
|
StatusCode | connectMetaBranch (const std::string &key, ::Bool_t silent=kFALSE) |
| Function setting up access to a branch in the metadata tree. More...
|
|
StatusCode | connectAux (const std::string &prefix, ::Bool_t standalone) |
| Function setting up access to a set of auxiliary branches. More...
|
|
StatusCode | connectMetaAux (const std::string &prefix, ::Bool_t standalone) |
| Function setting up access to a set of auxiliary branches for a metadata object. More...
|
|
StatusCode | setUpDynamicStore (TObjectManager &mgr, ::TTree *tree) |
| Function adding dynamic variable reading capabilities to an auxiliary store object metadata still uses TTree: More...
|
|
StatusCode | setUpDynamicStore (RObjectManager &mgr, ROOT::RNTupleReader *ntupleReader) |
| event uses RNTupleReader: More...
|
|
StatusCode | setAuxStore (RObjectManager &mgr, ::Bool_t metadata=kFALSE) |
| Function connecting a DV object to its auxiliary store. More...
|
|
StatusCode | setAuxStore (TObjectManager &mgr) |
| Function connecting a DV object to its auxiliary store - using TTree, for metadata only. More...
|
|
|
SG::DataProxy * | proxy (const void *const pTransient) const override |
| get proxy for a given data object address in memory More...
|
|
SG::DataProxy * | proxy (const CLID &id, const std::string &key) const override |
| get proxy with given id and key. Returns 0 to flag failure More...
|
|
SG::DataProxy * | proxy_exact (SG::sgkey_t sgkey) const override |
| Get proxy given a hashed key+clid. More...
|
|
StatusCode | addToStore (CLID id, SG::DataProxy *proxy) override |
| Add a new proxy to the store. More...
|
|
std::vector< const SG::DataProxy * > | proxies () const override |
| return the list of all current proxies in store More...
|
|
SG::sgkey_t | stringToKey (const std::string &str, CLID clid) override |
| Find the string corresponding to a given key. More...
|
|
const std::string * | keyToString (SG::sgkey_t key) const override |
| Find the string corresponding to a given key. More...
|
|
const std::string * | keyToString (SG::sgkey_t key, CLID &clid) const override |
| Find the string and CLID corresponding to a given key. More...
|
|
void | registerKey (SG::sgkey_t key, const std::string &str, CLID clid) override |
| Remember an additional mapping from key to string/CLID. More...
|
|
SG::DataProxy * | recordObject (SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override |
| Record an object in the store. More...
|
|
const std::string & | name () const override |
| Get the name of the instance. More...
|
|
|
const xAOD::EventFormatElement * | getEventFormatElement (SG::sgkey_t sgkey) const |
| Get the metadata object for a given "SG key". More...
|
|
const BranchInfo * | getBranchInfo (SG::sgkey_t sgkey) const |
| Get the object describing one object/branch. More...
|
|
|
SG::DataProxy * | proxy (const void *const pTransient) const override |
| get proxy for a given data object address in memory More...
|
|
SG::DataProxy * | proxy (const CLID &id, const std::string &key) const override |
| get proxy with given id and key. Returns 0 to flag failure More...
|
|
SG::DataProxy * | proxy_exact (SG::sgkey_t sgkey) const override |
| Get proxy given a hashed key+clid. More...
|
|
StatusCode | addToStore (CLID id, SG::DataProxy *proxy) override |
| Add a new proxy to the store. More...
|
|
std::vector< const SG::DataProxy * > | proxies () const override |
| return the list of all current proxies in store More...
|
|
SG::sgkey_t | stringToKey (const std::string &str, CLID clid) override |
| Find the string corresponding to a given key. More...
|
|
const std::string * | keyToString (SG::sgkey_t key) const override |
| Find the string corresponding to a given key. More...
|
|
const std::string * | keyToString (SG::sgkey_t key, CLID &clid) const override |
| Find the string and CLID corresponding to a given key. More...
|
|
void | registerKey (SG::sgkey_t key, const std::string &str, CLID clid) override |
| Remember an additional mapping from key to string/CLID. More...
|
|
SG::DataProxy * | recordObject (SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override |
| Record an object in the store. More...
|
|
const std::string & | name () const override |
| Get the name of the instance. More...
|
|
|
const xAOD::EventFormatElement * | getEventFormatElement (SG::sgkey_t sgkey) const |
| Get the metadata object for a given "SG key". More...
|
|
const BranchInfo * | getBranchInfo (SG::sgkey_t sgkey) const |
| Get the object describing one object/branch. More...
|
|
Class used for the test.
Definition at line 36 of file xAODRNFileReadTest.cxx.
◆ Listener_t
Definition of the structure type holding on to listeners.
Definition at line 460 of file REvent.h.
◆ Object_t
Definition of the internal data structure type.
Definition at line 458 of file REvent.h.
◆ sgkey_t
◆ upgrade_mutex_t
Mutex and lock for multithread synchronization.
Definition at line 530 of file REvent.h.
◆ upgrading_lock_t
◆ EAuxMode
Auxiliary store "mode".
Enumerator |
---|
kBranchAccess | Access auxiliary data branch-by-branch.
|
kClassAccess | Access auxiliary data using the aux containers.
|
kAthenaAccess | Access containers/objects like Athena does.
|
kUndefinedAccess | Undefined, to be selected by the object.
|
Definition at line 118 of file REvent.h.
◆ REventClass()
◆ addListener()
Register an incident listener object.
This function works pretty much like IIncidentSvc::addListener does in Athena.
It tells the REvent object that when certain "interesting
incidents" happen, a given object should be notified about it.
- Parameters
-
listener | Pointer to the object that should be notified |
- Returns
- The usual StatusCode types
Definition at line 754 of file REvent.cxx.
758 ::Error(
"xAOD::REvent::addListener",
759 XAOD_MESSAGE(
"Received a null pointer for the listener" ) );
760 return StatusCode::FAILURE;
764 bool listenerKnown =
false;
766 if(
l == listener ) {
767 ::Warning(
"xAOD::REvent::addListener",
768 "Listener %p was added previously already",
769 static_cast< void*
>( listener ) );
770 listenerKnown =
true;
776 if( ! listenerKnown ) {
781 return StatusCode::SUCCESS;
◆ addNameRemap()
StatusCode xAOD::Experimental::REvent::addNameRemap |
( |
const std::string & |
onfile, |
|
|
const std::string & |
newName |
|
) |
| |
|
inherited |
Add a name re-mapping rule.
The names of containers can change during the lifetime of the experiment.
One such change happened after the DC14 exercise, when many containers got a new name. (Like "ElectronCollection" became simply "Electrons".)
This function allows us to create aliases with which certain containers should be accessible. So that the analyser would be able to access older files, while using the latest container name(s).
- Parameters
-
onfile | The name of the container as it was saved into the input file |
newName | The alias with which the object/container should be accessible |
- Returns
- The usual StatusCode types
Save the new name association:
Definition at line 834 of file REvent.cxx.
840 ::Error(
"xAOD::REvent::addNameRemap",
841 XAOD_MESSAGE(
"Can't use \"%s\" as the target name in the"
842 "\"%s\" -> \"%s\" remapping" ),
844 return StatusCode::FAILURE;
850 ::Warning(
"xAOD::REvent::addNameRemap",
851 "Overriding existing name remapping \"%s\" -> \"%s\"",
852 itr->second.c_str(), itr->first.c_str() );
853 ::Warning(
"xAOD::REvent::addNameRemap",
" with: \"%s\" -> \"%s\"",
854 onfile.c_str(),
newName.c_str() );
861 return StatusCode::SUCCESS;
◆ addToStore()
StatusCode xAOD::Experimental::REvent::addToStore |
( |
CLID |
clid, |
|
|
SG::DataProxy * |
proxy |
|
) |
| |
|
overrideprotectedinherited |
Add a new proxy to the store.
Smart pointers to objects that don't exist in the input event, can end up calling this function.
In this case warn the user that something fishy is happening, and take posession of the received proxy.
- Parameters
-
clid | The CLID of the type. Not taken into account. |
proxy | The proxy to take posession of. Not used for anything useful. |
Definition at line 396 of file REventProxyDict.cxx.
403 ::Warning(
"xAOD::REvent::addToStore",
404 "Function should only be called through an invalid "
412 bi.m_proxy.reset(
proxy );
414 m_branches.insert( std::make_pair(
stringToKey( uniqueKey.Data(),
419 return StatusCode::SUCCESS;
◆ auxMode()
REvent::EAuxMode xAOD::Experimental::REvent::auxMode |
( |
| ) |
const |
|
inherited |
Get what auxiliary access mode the object was constructed with.
- Returns
- The auxiliary data access mode currently in use
Definition at line 209 of file REvent.cxx.
◆ clearListeners()
void xAOD::Experimental::REvent::clearListeners |
( |
| ) |
|
|
inherited |
Remove all listeners from the object.
This function can be used to remove all the listeners from the internal list.
Should not be necessary under regular circumstances.
Definition at line 814 of file REvent.cxx.
◆ clearNameRemap()
void xAOD::Experimental::REvent::clearNameRemap |
( |
| ) |
|
|
inherited |
Clear the current name re-mapping.
This function simply clears out any existing name remapping declarations.
In case the remapping rules need to be changed in the code in some complicated way.
Definition at line 868 of file REvent.cxx.
◆ connectAux()
StatusCode xAOD::Experimental::REvent::connectAux |
( |
const std::string & |
prefix, |
|
|
::Bool_t |
standalone |
|
) |
| |
|
protectedinherited |
Function setting up access to a set of auxiliary branches.
This function is used internally to connect an auxiliary object to the input.
Based on the configuration of the object it will either use TAuxStore, or the EDM object that was used to write the auxiliary information in Athena.
- Parameters
-
prefix | The prefix (main branch name) of the auxiliary data |
standalone | Type of the auxiliary store that should be created |
- Returns
kTRUE
if the connection was successful, or kFALSE
if it was not
Definition at line 2697 of file REvent.cxx.
2702 ::Error(
"xAOD::REvent::connectAux",
2704 return StatusCode::FAILURE;
2719 return StatusCode::SUCCESS;
2728 if( !
result.isSuccess() ) {
2729 ::Error(
"xAOD::REvent::connectAux",
XAOD_MESSAGE(
"Failed to execute connectBranch : for prefix %s" ),
2737 ::Fatal(
"xAOD::REvent::connectAux",
2740 const RObjectManager* omgr =
2741 dynamic_cast< const RObjectManager*
>( mgr_itr->second );
2743 ::Fatal(
"xAOD::REvent::connectAux",
2745 return StatusCode::FAILURE;
2749 static const TClass*
const holderClass =
2751 if( ! omgr->holder()->getClass()->InheritsFrom( holderClass ) ) {
2753 return StatusCode::SUCCESS;
2760 if( ! storeHolder ) {
2761 ::Fatal(
"xAOD::REvent::connectAux",
2772 ::Error(
"xAOD::REvent::connectAux",
2774 "for: %s" ),
prefix.c_str() );
2775 ::Error(
"xAOD::REvent::connectAux",
2776 XAOD_MESSAGE(
"standalone = %s, getStoreType() = %i" ),
2779 return StatusCode::FAILURE;
2783 return StatusCode::SUCCESS;
2790 new RAuxStore(
prefix, kTRUE,
2804 return StatusCode::SUCCESS;
2808 ::Error(
"xAOD::REvent::connectAux",
2809 XAOD_MESSAGE(
"Unknown auxiliary access mode set (%i)" ),
2811 return StatusCode::FAILURE;
◆ connectBranch()
StatusCode xAOD::Experimental::REvent::connectBranch |
( |
const std::string & |
key, |
|
|
::Bool_t |
silent = kFALSE |
|
) |
| |
|
protectedinherited |
Function setting up access to a particular branch.
This is one of the more important functions of the class.
It connects the event object to a given branch of the input TTree.
The type that is read in to memory is not actually determined by the type written to the tree itself, but from the xAOD::EventFormat object. Which is there to make it possible to possibly use ROOT read rules in the future to read a different type than what's on disk.
Everything else is fairly basic ROOT stuff, the code just has to make sure that the memory management is set up correctly for the created object.
- Parameters
-
key | The name of the branch to connect to |
silent | Set to kTRUE to make the code fail silently in case the branch can't be connected to |
- Returns
kTRUE
if the connection was successful, or kFALSE
if it was not
Definition at line 2417 of file REvent.cxx.
2422 ::Error(
"xAOD::REvent::connectBranch",
2423 XAOD_MESSAGE(
"Function called on un-initialised object" ) );
2424 return StatusCode::FAILURE;
2432 return StatusCode::SUCCESS;
2437 ::Warning(
"xAOD::REvent::connectBranch",
2438 "Branch \"%s\" not available on input",
2441 return StatusCode::RECOVERABLE;
2449 auto key_to_read =
key;
2450 if (
key.rfind(
"Aux.") != std::string::npos) {
2452 std::replace(key_to_read.begin(), key_to_read.end(),
'.',
':');
2457 ::Warning(
"xAOD::REvent::connectBranch",
2458 "No metadata available for branch: %s ef key %s",
2459 key.c_str(), key_ef.c_str() );
2467 if (
m_inNtupleReader->GetDescriptor().FindFieldId(key_to_read.c_str()) == ROOT::kInvalidDescriptorId) {
2470 ::Warning(
"xAOD::REvent::connectBranch",
"Key \"%s\" not available on input",
key.c_str() );
2473 return StatusCode::RECOVERABLE;
2490 ::Error(
"xAOD::REvent::connectBranch",
2491 XAOD_MESSAGE(
"Couldn't find an appropriate type with a "
2492 "dictionary for branch \"%s\"" ),
2494 return StatusCode::FAILURE;
2497 ::TClass* realClass = ::TClass::GetClass(
className.c_str() );
2498 if( ( ( ! realClass ) || ( ! realClass->IsLoaded() ) ) &&
ef ) {
2503 realClass = ::TClass::GetClass(
className.c_str() );
2505 if( ( ! realClass ) || ( ! realClass->IsLoaded() ) ) {
2507 ::Error(
"xAOD::REvent::connectBranch",
2508 XAOD_MESSAGE(
"Couldn't find an appropriate type with a "
2509 "dictionary for branch \"%s\"" ),
2511 return StatusCode::FAILURE;
2547 ptr = realClass->New();
2551 THolder* hldr =
new THolder(
ptr, realClass );
2553 RObjectManager*
mgr =
2554 new RObjectManager(
m_inNtupleReader->GetView<
void>(key_to_read.c_str(), hldr->get()),
2566 if( !
hasAuxStore( *
mgr->holder() ) )
return StatusCode::SUCCESS;
◆ connectMetaAux()
StatusCode xAOD::Experimental::REvent::connectMetaAux |
( |
const std::string & |
prefix, |
|
|
::Bool_t |
standalone |
|
) |
| |
|
protectedinherited |
Function setting up access to a set of auxiliary branches for a metadata object.
This function is used internally to connect an auxiliary metadata object to the input.
Based on the configuration of the object it will either use TAuxStore, or the EDM object that was used to write the auxiliary information in Athena.
- Parameters
-
prefix | The prefix (main branch name) of the auxiliary data |
standalone | Type of the auxiliary store that should be created |
- Returns
- The usual StatusCode types
Definition at line 2823 of file REvent.cxx.
2828 return StatusCode::SUCCESS;
2833 ::Fatal(
"xAOD::REvent::connectMetaAux",
2835 return StatusCode::FAILURE;
2849 ::Fatal(
"xAOD::REvent::connectMetaAux",
2852 const TObjectManager* omgr =
2853 dynamic_cast< const TObjectManager*
>( mgr_itr->second );
2855 ::Fatal(
"xAOD::REvent::connectMetaAux",
2857 return StatusCode::FAILURE;
2861 static const TClass*
const holderClass =
2863 if( ! omgr->holder()->getClass()->InheritsFrom( holderClass ) ) {
2865 return StatusCode::SUCCESS;
2872 if( ! storeHolder ) {
2873 ::Fatal(
"xAOD::REvent::connectMetaAux",
2884 ::Error(
"xAOD::REvent::connectMetaAux",
2885 XAOD_MESSAGE(
"Requested store types inconsistent" ) );
2886 ::Error(
"xAOD::REvent::connectMetaAux",
2887 XAOD_MESSAGE(
"standalone = %s, getStoreType() = %i" ),
2890 return StatusCode::FAILURE;
2894 return StatusCode::SUCCESS;
2901 new TAuxStore(
prefix, kTRUE,
2907 TAuxManager*
mgr =
new TAuxManager(
store );
2915 store->getEntry( 0 );
2918 return StatusCode::SUCCESS;
2922 ::Error(
"xAOD::REvent::connectMetaAux",
2923 XAOD_MESSAGE(
"Unknown auxiliary access mode set (%i)" ),
2925 return StatusCode::FAILURE;
◆ connectMetaBranch()
StatusCode xAOD::Experimental::REvent::connectMetaBranch |
( |
const std::string & |
key, |
|
|
::Bool_t |
silent = kFALSE |
|
) |
| |
|
protectedinherited |
Function setting up access to a branch in the metadata tree.
This is the function doing the heavy lifting with creating metadata objects in memory out of the payload of the input file.
- Parameters
-
key | The key (branch name) of the metadata object to retrieve |
silent | Set to kTRUE to make the code fail silently in case the branch can't be connected to |
- Returns
- The usual StatusCode types
Definition at line 2583 of file REvent.cxx.
2588 ::Error(
"xAOD::REvent::connectMetaBranch",
2589 XAOD_MESSAGE(
"Function called on un-initialised object" ) );
2590 return StatusCode::FAILURE;
2595 return StatusCode::SUCCESS;
2602 ::Warning(
"xAOD::REvent::connectMetaBranch",
2603 "Branch \"%s\" not available on input",
2606 return StatusCode::RECOVERABLE;
2610 if( !
br->GetEntries() ) {
2612 ::Warning(
"xAOD::REvent::connectMetaBranch",
2613 "Branch \"%s\" doesn't hold any data",
2616 return StatusCode::RECOVERABLE;
2620 br->SetMakeClass( 0 );
2624 ::EDataType
dt = kOther_t;
2625 if(
br->GetExpectedType(
cl,
dt ) || ( !
cl ) ) {
2626 ::Error(
"xAOD::REvent::connectMetaBranch",
2628 "branch %s" ),
key.c_str() );
2629 return StatusCode::FAILURE;
2633 void*
ptr =
cl->New();
2634 THolder* hldr =
new THolder(
ptr,
cl );
2635 TObjectManager*
mgr =
2646 ::Error(
"xAOD::REvent::connectMetaBranch",
2647 XAOD_MESSAGE(
"Couldn't connect variable of type \"%s\" to "
2648 "input branch \"%s\". Return code: %i" ),
2651 *( hldr->getPtr() ) = 0;
2654 return StatusCode::FAILURE;
2658 if(
mgr->getEntry() < 0 ) {
2659 ::Error(
"xAOD::REvent::connectMetaBranch",
2660 XAOD_MESSAGE(
"Couldn't read in metadata object with key "
2661 "\"%s\"" ),
key.c_str() );
2662 return StatusCode::FAILURE;
2672 if( !
hasAuxStore( *
mgr->holder() ) )
return StatusCode::SUCCESS;
2684 return StatusCode::SUCCESS;
◆ contains() [1/2]
template<typename T >
::Bool_t xAOD::Experimental::REvent::contains |
( |
const std::string & |
key | ) |
|
|
inherited |
Function checking if an object is available from the store.
◆ contains() [2/2]
Bool_t xAOD::Experimental::REvent::contains |
( |
const std::string & |
key, |
|
|
const std::type_info & |
ti, |
|
|
::Bool_t |
metadata = kFALSE |
|
) |
| |
|
protectedinherited |
Internal function checking if an object is in the input.
Created a non-template version of the call internally to be able to use it from xAOD::MakeTransientTree.
- Parameters
-
key | The key to check |
ti | The type of the object to check |
metadata | Flag deciding whether we are looking for a metadata object or not |
- Returns
kTRUE
if such an object is held by the event object at the moment, kFALSE
otherwise
Definition at line 3787 of file REvent.cxx.
◆ containsMeta()
template<typename T >
::Bool_t xAOD::Experimental::REvent::containsMeta |
( |
const std::string & |
key | ) |
|
|
inherited |
Function checking if a meta-object is available from the store.
◆ dump()
std::string xAOD::Experimental::REvent::dump |
( |
| ) |
|
|
inherited |
Function creating a user-readable dump of the current input.
This function behaves exactly like StoreGateSvc::dump().
It doesn't actually print anything to the screen, it just returns a user readable dump of the contents of the current input file/chain.
It is a pretty dumb implementation for the moment. Should be made nicer later on.
- Returns
- The user-readable contents of the current input file/chain
Definition at line 223 of file REvent.cxx.
226 std::ostringstream
ost;
227 ost <<
"<<<<<<<<<<<<<<<<<<<< xAOD::REvent Dump >>>>>>>>>>>>>>>>>>>>\n";
232 for( ; ef_itr != ef_end; ++ef_itr ) {
235 std::string
typeName = ef_itr->second.className();
240 ::TClass::GetClass( ef_itr->second.className().c_str() );
241 const std::type_info* ti = (
cl ?
cl->GetTypeInfo() : nullptr );
242 if( ( !
cl ) || ( !
cl->IsLoaded() ) || ( ! ti ) ) {
243 Warning(
"xAOD::REvent::dump",
244 "Unknown type (%s) found in the event format",
245 ef_itr->second.className().c_str() );
250 if( !
contains( ef_itr->second.branchName(), *ti ) ) {
255 ost <<
" Hash: 0x" << std::setw( 8 ) << std::setfill(
'0' )
256 << std::hex << ef_itr->second.hash()
257 <<
" Key: \"" << ef_itr->second.branchName() <<
"\"\n";
262 ost <<
" isConst: " << ( isNonConst ?
"No" :
"Yes" ) <<
"\n";
270 ost <<
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";
◆ getBranchInfo()
const REvent::BranchInfo * xAOD::Experimental::REvent::getBranchInfo |
( |
SG::sgkey_t |
sgkey | ) |
const |
|
protectedinherited |
Get the object describing one object/branch.
Definition at line 279 of file REventProxyDict.cxx.
288 auto it = m_branches.find(
sgkey );
289 if(
it != m_branches.end() ) {
290 return &(
it->second );
303 static const bool SILENT =
true;
304 static const bool METADATA =
false;
316 static const std::type_info&
dummy =
typeid(
REvent );
317 nc_this->getInputObject(
name,
dummy, SILENT, METADATA );
326 const RObjectManager*
mgr =
327 dynamic_cast< const RObjectManager*
>( itr->second );
329 ::Error(
"xAOD::REvent::getBranchInfo",
333 bi.m_class =
mgr->holder()->getClass();
338 #ifndef XAOD_STANDALONE
342 new GenericAddress() );
347 *bi.m_class->GetTypeInfo());
349 loader->
setProxy (*bi.m_proxy.get());
350 #endif // not XAOD_STANDALONE
355 auto ret = m_branches.insert( std::make_pair(
sgkey, std::move( bi ) ) );
358 return &( ret.first->second );
◆ getEntries()
Long64_t xAOD::Experimental::REvent::getEntries |
( |
| ) |
const |
|
inherited |
Get how many entries are available from the current input file(s)
- Returns
- The number of events in the input file(s)
Definition at line 1137 of file REvent.cxx.
1142 ::Error(
"xAOD::REvent::getEntries",
◆ getEntry()
Int_t xAOD::Experimental::REvent::getEntry |
( |
::Long64_t |
entry, |
|
|
::Int_t |
getall = 0 |
|
) |
| |
|
inherited |
Function loading a given entry of the input TTree.
This function is used to move to looking at a new entry from the input tree.
It doesn't do any I/O operation at this point, it just remembers which entry the objects should be loaded from later on.
Unless one calls the function with getall==1
. In that case all input is force-read. This is necessary when writing out an event that was processed in a load-on-request manner.
- Parameters
-
entry | The entry from the input tree to load |
getall | Parameter deciding if partial reading should be used or not. |
- Returns
- The number of bytes read, or a negative number in case of an error
Definition at line 1163 of file REvent.cxx.
1167 ::Error(
"xAOD::REvent::getEntry",
1183 const TIncident incident( IncidentType::BeginEvent );
1186 for( ; l_itr != l_end; ++l_itr ) {
1187 ( *l_itr )->handle( incident );
1201 static const std::string dynStorePostfix =
"Aux.Dynamic";
1202 if( inObj.first.find( dynStorePostfix ) ==
1203 ( inObj.first.size() - dynStorePostfix.size() ) ) {
1217 result += inObj.second->getEntry( getall );
1222 const TIncident incident( IncidentType::BeginEvent );
1225 for( ; l_itr != l_end; ++l_itr ) {
1226 ( *l_itr )->handle( incident );
◆ getEventFormatElement()
Get the metadata object for a given "SG key".
Definition at line 362 of file REventProxyDict.cxx.
365 static const bool QUIET =
true;
374 static mutex_t
mutex;
376 if( missingSGKeys.emplace(
sgkey ).second ) {
378 ::Warning(
"xAOD::REvent::getEventFormatElement",
379 "Can't find EventFormatElement for hashed "
380 "SG key %d",
sgkey );
◆ getHash()
SG::sgkey_t xAOD::Experimental::REvent::getHash |
( |
const std::string & |
key | ) |
const |
|
overridevirtualinherited |
Function returning the hash describing an object name.
This helper function is mostly needed by the smart pointers of the xAOD EDM.
Right now it very simply just calculates the hash just based on the key given to the function. But later on it might be good to do some tests here, checking if the event format knows about the specified key or not. This is why it's not made to be a static function
- Parameters
-
key | String key to turn into a hash |
- Returns
- A hash corresponding to the specified string key
Implements xAOD::TVirtualEvent.
Definition at line 1433 of file REvent.cxx.
1436 if(
key ==
"" )
return 0;
◆ getInputObject() [1/2]
const void * xAOD::Experimental::REvent::getInputObject |
( |
const std::string & |
key, |
|
|
const std::type_info & |
ti, |
|
|
::Bool_t |
silent = kFALSE , |
|
|
::Bool_t |
metadata = kFALSE |
|
) |
| |
|
protectedinherited |
Function for retrieving an input object in a non-template way.
This is the function doing the heavy lifting to retrieve objects from the input file.
- Parameters
-
key | The key (branch name) of the object to retrieve |
ti | The type as which the object is to be retrieved |
silent | Set to kTRUE to make the code fail silently in case the object can't be retrieved |
metadata | Flag deciding whether we're looking for a metadata or event data object |
- Returns
- A pointer to the input object if successful, or a null pointer if not
Definition at line 1982 of file REvent.cxx.
1988 std::string keyToUse =
key;
1993 keyToUse = remap_itr->second;
1999 if(
store &&
store->contains( keyToUse, ti ) &&
2000 store->isConst( keyToUse, ti ) ) {
2001 const void*
result =
store->getConstObject( keyToUse, ti );
2032 ::Fatal(
"xAOD::REvent::getInputObject",
2033 XAOD_MESSAGE(
"There is an internal logic error in the "
2047 RObjectManager*
mgr =
2048 dynamic_cast< RObjectManager*
>( itr->second );
2050 if(
key == keyToUse ) {
2051 ::Error(
"xAOD::REvent::getInputObject",
2056 ::Error(
"xAOD::REvent::getInputObject",
2058 "\"%s\"/\"%s\"" ),
key.c_str(),
2065 if(
mgr->getEntry() ) {
2070 ::Error(
"xAOD::REvent::getInputObject",
2073 mgr->holder()->getClass()->GetName(),
2083 ::Warning(
"xAOD::REvent::getInputObject",
2084 "Could not retrieve object with key \"%s\" "
2085 "as \"%s\"", keyToUse.c_str(),
2097 ::Error(
"xAOD::REvent::getInputObject",
2098 XAOD_MESSAGE(
"Metadata is in RNTuple technology which is not yet implemented. key %s" ),
key.c_str() );
2103 TObjectManager*
mgr =
2104 dynamic_cast< TObjectManager*
>( itr->second );
2106 if(
key == keyToUse ) {
2107 ::Error(
"xAOD::REvent::getInputObject",
2112 ::Error(
"xAOD::REvent::getInputObject",
2114 "\"%s\"/\"%s\"" ),
key.c_str(),
2124 ::Warning(
"xAOD::REvent::getInputObject",
2125 "Could not retrieve object with key \"%s\" "
2126 "as \"%s\"", keyToUse.c_str(),
◆ getInputObject() [2/2]
|
overrideprotectedvirtualinherited |
Function for retrieving an input object in a non-template way.
This function is used by the TVirtualEvent interface to access an input object with a given hashed key.
The function looks up the string key belonging to the hash, and then calls the other GetInputObject(...) function in the class with that parameter.
- Parameters
-
key | The hashed key of the input object |
ti | The type description of the object requested |
silent | Switch for being silent about failures or not |
- Returns
- A pointer to the requested object, or a null pointer in case of failure
Implements xAOD::TVirtualEvent.
Definition at line 1731 of file REvent.cxx.
1738 Warning(
"xAOD::REvent::getInputObject",
1739 "Key 0x%08x unknown",
key );
◆ getKey()
Function returning the hash describing a known object.
This function is used by the smart pointer code to find the identifier of an object that's already in the event in some way.
- Parameters
-
obj | Pointer to the object that we want to look up |
- Returns
- The hashed identifier of the object, or 0 if the object was not found in the event
Implements xAOD::TVirtualEvent.
Definition at line 1455 of file REvent.cxx.
◆ getName() [1/2]
const std::string & xAOD::Experimental::REvent::getName |
( |
const void * |
obj | ) |
const |
|
overridevirtualinherited |
Function returning the key describing a known object.
This function is used by the smart pointer code to find the identifier of an object that's already in the event in some way.
- Parameters
-
obj | Pointer to the object that we want to look up |
- Returns
- The name of the object, or an empty string if the object was not found in the event
Implements xAOD::TVirtualEvent.
Definition at line 1468 of file REvent.cxx.
1473 for( ; obj_itr != obj_end; ++obj_itr ) {
1476 if( obj_itr->second->object() !=
obj )
continue;
1479 return obj_itr->first;
1485 for( ; obj_itr != obj_end; ++obj_itr ) {
1488 if( obj_itr->second->object() !=
obj )
continue;
1491 return obj_itr->first;
1502 ::Warning(
"xAOD::REvent::getName",
1503 "Didn't find object with pointer %p in the event",
1505 static const std::string
dummy;
◆ getName() [2/2]
const std::string & xAOD::Experimental::REvent::getName |
( |
SG::sgkey_t |
hash | ) |
const |
|
overridevirtualinherited |
Function returning the key describing a known object.
This function is used primarily when getting the string key of a smart pointer that we read in from a file, or access it in memory.
- Parameters
-
hash | The hashed key for the container/object |
- Returns
- The name of the object, or an empty string if the object was not found in the event
Implements xAOD::TVirtualEvent.
Definition at line 1673 of file REvent.cxx.
1693 static const std::string
dummy;
◆ getNames()
void xAOD::Experimental::REvent::getNames |
( |
const std::string & |
targetClassName, |
|
|
std::vector< std::string > & |
vkeys, |
|
|
bool |
metadata = false |
|
) |
| const |
|
overrideprotectedvirtualinherited |
Function determining the list keys associated with a type name.
Implements xAOD::TVirtualEvent.
Definition at line 1509 of file REvent.cxx.
1513 std::set<std::string>
keys;
1517 std::vector<TObjArray*> fullListOfBranches = {};
1521 ::Info(
"xAOD::REvent::getNames",
"scanning input objects");
1523 fullListOfBranches.push_back(
m_inMetaTree->GetListOfBranches());
1527 ::Error(
"xAOD::REvent::getNames",
"Cannot (yet) get names for event object of typename %s",
1528 targetClassName.c_str());
1559 for (
const TObjArray * in : fullListOfBranches){
1562 const TObject *
obj = in->At(
index);
1563 if ( !
obj )
continue;
1564 const TBranch * element =
dynamic_cast<const TBranch*
>(
obj);
1566 ::Error(
"xAOD::REvent::getNames",
"Failure inspecting input objects");
1569 std::string objClassName = element->GetClassName();
1570 std::string
key =
obj->GetName();
1571 ::Info(
"xAOD::REvent::getNames",
1572 "Inspecting %s / %s",
1573 objClassName.c_str(),
key.c_str());
1574 if (objClassName == targetClassName) {
1575 ::Info(
"xAOD::REvent::getNames",
1576 "Matched %s to key %s",
1577 targetClassName.c_str(),
key.c_str());
1586 ::Info(
"xAOD::REvent::getNames",
1587 "scanning input Aux objects for %s", targetClassName.c_str());
1588 for(
const auto&
object : inAux ) {
1591 TObjectManager*
mgr =
dynamic_cast< TObjectManager*
>(
object.second );
1592 if ( !
mgr )
continue;
1593 const std::string& objClassName =
mgr->holder()->getClass()->GetName();
1594 const std::string&
key =
object.first;
1595 ::Info(
"xAOD::REvent::getNames",
1596 "Inspecting %s / %s",
1597 objClassName.c_str(),
key.c_str());
1598 if (objClassName == targetClassName) {
1599 ::Info(
"xAOD::REvent::getNames",
1600 "Matched %s to key %s",
1601 targetClassName.c_str(),
key.c_str());
1610 const TObjArray *
out =
tree->GetListOfBranches();
1611 ::Info(
"xAOD::REvent::getNames",
"scanning output objects");
1615 if ( !
obj )
continue;
1616 const TBranch * element =
dynamic_cast<const TBranch*
>(
obj);
1618 ::Error(
"xAOD::REvent::getNames",
"Failure inspecting input objects");
1621 std::string objClassName = element->GetClassName();
1622 std::string
key =
obj->GetName();
1623 ::Info(
"xAOD::REvent::getNames",
1624 "Inspecting %s / %s",
1625 objClassName.c_str(),
key.c_str());
1626 if (objClassName == targetClassName) {
1627 ::Info(
"xAOD::REvent::getNames",
1628 "Matched %s to key %s",
1629 targetClassName.c_str(),
key.c_str());
1634 ::Info(
"xAOD::REvent::getNames",
"no output tree connected");
1643 ::Info(
"xAOD::REvent::getNames",
1644 "scanning output Aux objects for %s", targetClassName.c_str());
1645 for(
const auto&
object : outAux ) {
1648 TObjectManager*
mgr =
dynamic_cast< TObjectManager*
>(
object.second );
1649 if ( !
mgr )
continue;
1650 const std::string& objClassName =
mgr->holder()->getClass()->GetName();
1651 const std::string&
key =
object.first;
1652 ::Info(
"xAOD::REvent::getNames",
1653 "Inspecting %s / %s",
1654 objClassName.c_str(),
key.c_str());
1655 if (objClassName == targetClassName) {
1656 ::Info(
"xAOD::REvent::getNames",
1657 "Matched %s to key %s",
1658 targetClassName.c_str(),
key.c_str());
1663 vkeys.insert(vkeys.end(),
keys.begin(),
keys.end());
◆ getOutputObject() [1/2]
void * xAOD::Experimental::REvent::getOutputObject |
( |
const std::string & |
key, |
|
|
const std::type_info & |
ti, |
|
|
::Bool_t |
metadata = kFALSE |
|
) |
| const |
|
protectedinherited |
This function does the heavy lifting of retrieving object from the list of output objects.
While it returns a typeless pointer, that pointer can be cast directly to the type described by the second parameter in the caller code.
- Parameters
-
key | The key (branch name) of the object to retrieve |
ti | The type as which the object is to be retrieved |
metadata | Flag deciding whether we're looking for a metadata or event data object |
- Returns
- A pointer to the output object if successful, or a null pointer if not
Definition at line 1912 of file REvent.cxx.
1921 Object_t::const_iterator itr =
objects.find(
key );
1943 if( ! itr->second->isSet() ) {
1948 TObjectManager*
mgr =
1949 dynamic_cast< TObjectManager*
>( itr->second );
1951 ::Error(
"xAOD::REvent::getOutputObject",
1952 XAOD_MESSAGE(
"Object of wrong type found for key \"%s\"" ),
1958 void*
result =
mgr->holder()->getAs( ti );
1960 ::Warning(
"xAOD::REvent::getOutputObject",
1961 "Couldn't retrieve object as \"%s\"",
◆ getOutputObject() [2/2]
void * xAOD::Experimental::REvent::getOutputObject |
( |
SG::sgkey_t |
key, |
|
|
const std::type_info & |
ti |
|
) |
| |
|
overrideprotectedvirtualinherited |
This function is used by the TVirtualEvent interface to access an output object with a given hashed key.
The function looks up the string key belonging to the hash, and then calls the other GetOutputObject(...) function in the class with that parameter.
- Parameters
-
key | The hashed key of the output object |
ti | The type description of the object requested |
- Returns
- A pointer to the requested object, or a null pointer in case of failure
Implements xAOD::TVirtualEvent.
Definition at line 1707 of file REvent.cxx.
1712 if( !
name.length() ) {
◆ hasAuxStore()
Bool_t xAOD::Experimental::REvent::hasAuxStore |
( |
const THolder & |
holder | ) |
|
|
staticprotectedinherited |
RDS: for the three following methods, moving to directly take THolder rather than have one for TObjectManager and another for RObjectManager.
Since the code needs to check in a few places whether a given object has an auxiliary store, and as this check may change slightly over time, it seemed to be a good idea to outsource this check into this function.
This can eventually be moved to base class and have TEvent use this one. Function checking if a given object may have an auxiliary store
- Parameters
-
holder | The holder of the object that should be checked |
- Returns
kTRUE
if the object can have an auxiliary store, kFALSE
otherwise RDS: keep two versions for the moment for RObjectManager and TObjectManager
Definition at line 3709 of file REvent.cxx.
3713 static const TClass*
const dvClass =
3715 static const TClass*
const aeClass =
3719 return ( holder.getClass()->InheritsFrom( dvClass ) ||
3720 holder.getClass()->InheritsFrom( aeClass ) );
◆ initStats()
StatusCode xAOD::Experimental::REvent::initStats |
( |
| ) |
|
|
protectedinherited |
Function to initialise the statistics for all Tree content.
This function is used internally to initialise the reading of an input file.
It prepares the "monitoring information" in memory that gets filled while the code is running, with information about xAOD I/O.
- Returns
StatusCode::SUCCESS
if the function is successful, or StatusCode::kFaulure
if not
Definition at line 1754 of file REvent.cxx.
1758 ::Error(
"xAOD::REvent::initStats",
1761 return StatusCode::FAILURE;
1770 for( ; itr !=
end; ++itr ) {
1773 const std::string& branchName = itr->second.branchName();
1776 if( branchName.find(
"Aux." ) != std::string::npos ) {
1785 const std::string intName =
1786 branchName.substr( 0, branchName.size() - 4 );
1795 ::Bool_t auxFound = kFALSE;
1830 ::Warning(
"xAOD::REvent::initStats",
1831 "Couldn't find interface object/container "
1832 "\"%s\" belonging to branch \"%s\"",
1833 intName.c_str(), branchName.c_str() );
1840 ::TClass*
cl = ::TClass::GetClass(
el->className().c_str() );
1841 if( ( !
cl ) || ( !
cl->IsLoaded() ) ) {
1842 ::Warning(
"xAOD::REvent::initStats",
1843 "Couldn't find dictionary for type \"%s\"",
1844 el->className().c_str() );
1850 static const std::string baseName =
1852 static ::TClass*
const baseCl = ::TClass::GetClass( baseName.c_str() );
1854 ::Error(
"xAOD::REvent::initStats",
1856 "\"%s\"" ), baseName.c_str() );
1857 return StatusCode::FAILURE;
1867 static constexpr
bool TOP_STORE =
true;
1868 RAuxStore temp( branchName, TOP_STORE,
mode );
1878 stats.branch(branchName,
id);
1882 stats.setBranchNum(
stats.branchNum() + temp.getAuxIDs().size());
1897 return StatusCode::SUCCESS;
◆ inputEventFormat()
const EventFormat * xAOD::Experimental::REvent::inputEventFormat |
( |
| ) |
const |
|
inherited |
RDS: Only valid for TChains, i.e.
This function makes it possible for the user to investigate the contents of the input file that the object is currently connected to.
RNTuple doesn't (yet) have a way to specify multiple files as TChain does. Get information about the input objects
Notice that this doesn't necessarily mean that all the objects for which metadata is stored, would necessarily be part of the input TTree that this object is connected to.
- Returns
- The event format object if a file is being read, or a null pointer if no input file is connected at the moment.
Definition at line 1387 of file REvent.cxx.
1395 ::Warning(
"xAOD::REvent::inputEventFormat",
1396 "No input file is connected at the moment" );
◆ isAuxStore()
Bool_t xAOD::Experimental::REvent::isAuxStore |
( |
const THolder & |
holder | ) |
|
|
staticprotectedinherited |
Function checking if a given object may be an auxiliary store.
This function is used to decide if a given object is an auxiliary store type or not.
- Parameters
-
holder | The holder of the object that should be checked |
- Returns
kTRUE
if the object is an auxiliary store, kFALSE
if it is not
Definition at line 3730 of file REvent.cxx.
3733 static const TClass*
const storeClass =
3735 static const TClass*
const storeHolderClass =
3739 return ( holder.getClass()->InheritsFrom( storeClass ) ||
3740 holder.getClass()->InheritsFrom( storeHolderClass ) );
◆ isStandalone()
Bool_t xAOD::Experimental::REvent::isStandalone |
( |
const THolder & |
holder | ) |
|
|
staticprotectedinherited |
Function checking if an object is standalone (not a container)
This function is used to figure out while setting up the reading of the TTree in kBranchAccess mode, what to tell the underlying TAuxStore object, what kind of store it needs to be.
It's done in pretty much the same way in which hasAuxStore(...) decides if the object in question can have an auxiliary store.
- Parameters
-
holder | The holder of the object that should be checked |
- Returns
kTRUE
if the object is a standalone one, kFALSE
if it is a container
Definition at line 3753 of file REvent.cxx.
3757 static const TClass*
const dvClass =
3759 static const TClass*
const aeClass =
3763 if( holder.getClass()->InheritsFrom( aeClass ) ) {
3765 }
else if( holder.getClass()->InheritsFrom( dvClass ) ) {
3770 ::Error(
"xAOD::REvent::isStandalone",
3772 "auxiliary store" ),
3773 holder.getClass()->GetName() );
◆ keys()
template<typename T >
void xAOD::TVirtualEvent::keys |
( |
std::vector< std::string > & |
vkeys, |
|
|
bool |
metadata = false |
|
) |
| const |
|
inherited |
provide list of all keys associated with provided type.
usage: event->keys( vec_to_fill, metadata )
- Parameters
-
vkeys | will be filled with the list of keys (may be empty) |
metadata | (default false) look in metadata content if true |
◆ keyToString() [1/2]
const std::string * xAOD::Experimental::REvent::keyToString |
( |
SG::sgkey_t |
key | ) |
const |
|
overrideprotectedinherited |
◆ keyToString() [2/2]
|
overrideprotectedinherited |
◆ loadInputObjects()
StatusCode REventClass::loadInputObjects |
( |
| ) |
|
|
inline |
Function loading all interface objects of the event.
Definition at line 42 of file xAODRNFileReadTest.cxx.
46 return StatusCode::FAILURE;
49 for(
const auto & ef_itr : *
ef ) {
62 ::TClass*
cl = ::TClass::GetClass( efe.
className().c_str(), kTRUE,
65 if(
cl->InheritsFrom(
"SG::IConstAuxStore" ) ) {
69 const std::type_info* ti =
cl->GetTypeInfo();
71 ::Warning(
"REventClass::loadInputObjects",
72 "Couldn't find std::type_info object for type %s "
82 Error(
"REventClass::loadInputObjects",
85 return StatusCode::FAILURE;
89 return StatusCode::SUCCESS;
◆ name()
const std::string & xAOD::Experimental::REvent::name |
( |
| ) |
const |
|
overrideprotectedinherited |
Get the name of the instance.
Definition at line 463 of file REventProxyDict.cxx.
465 static const std::string NAME =
"xAOD::REvent";
◆ printIOStats()
void xAOD::Experimental::REvent::printIOStats |
( |
| ) |
const |
|
inherited |
Function printing the I/O statistics of the current process.
This is a convenience function for printing basic I/O information about the current job.
It can be called at the end of a job to get an overview of what the job did exactly I/O-wise.
Definition at line 278 of file REvent.cxx.
◆ printNameRemap()
void xAOD::Experimental::REvent::printNameRemap |
( |
| ) |
const |
|
inherited |
Print the current name re-mapping rules.
This function can be used for debugging, to check what container/object name remapping rules are in place for the current REvent object.
Definition at line 877 of file REvent.cxx.
880 ::Info(
"xAOD::REvent::printNameRemap",
"Name remapping rules:" );
884 ::Info(
"xAOD::REvent::printNameRemap",
" NONE" );
891 ::Info(
"xAOD::REvent::printNameRemap",
" \"%s\" -> \"%s\"",
892 itr->second.c_str(), itr->first.c_str() );
◆ proxies()
|
overrideprotectedinherited |
return the list of all current proxies in store
Definition at line 422 of file REventProxyDict.cxx.
426 std::vector< const SG::DataProxy* > ret;
427 for(
const auto&
p : m_branches ) {
430 ret.push_back(
proxy );
◆ proxy() [1/2]
|
overrideprotectedinherited |
get proxy with given id and key. Returns 0 to flag failure
Definition at line 236 of file REventProxyDict.cxx.
247 ::Warning(
"xAOD::REvent::proxy",
248 "Can't find BranchInfo for %s.",
◆ proxy() [2/2]
|
overrideprotectedinherited |
get proxy for a given data object address in memory
Definition at line 208 of file REventProxyDict.cxx.
219 static const bool QUIET =
true;
233 return bi->m_proxy.get();
◆ proxy_exact()
|
overrideprotectedinherited |
Get proxy given a hashed key+clid.
Definition at line 255 of file REventProxyDict.cxx.
261 static mutex_t
mutex;
263 if( missingSGKeys.emplace(
sgkey ).second &&
265 ::Warning(
"xAOD::REvent::proxy_exact",
266 "Can't find BranchInfo for %d.",
◆ readFrom()
StatusCode xAOD::Experimental::REvent::readFrom |
( |
const std::string & |
fileName | ) |
|
|
inherited |
This function takes care of connecting the event object to a new input file.
It reads in the metadata of the input file needed for reading the file.
- Parameters
-
fileName | name of file needed for metadata access |
Definition at line 292 of file REvent.cxx.
295 if(
fileName.size() == 0 )
return StatusCode::SUCCESS;
298 std::unique_ptr< TFile >
infile( TFile::Open(
fileName.c_str(),
"READ" ) );
300 ::Error(
"xAOD::REvent::readFrom",
302 return StatusCode::FAILURE;
308 for( ; itr !=
end; ++itr ) {
322 for( ; itr !=
end; ++itr ) {
337 ::Error(
"xAOD::REvent::readFrom",
338 XAOD_MESSAGE(
"Couldn't find metadata tree on input. Object "
340 return StatusCode::FAILURE;
346 ::Error(
"xAOD::REvent::readFrom",
347 XAOD_MESSAGE(
"Failed to load entry for metadata tree=%s" ),
349 return StatusCode::FAILURE;
354 ::Info(
"xAOD::REvent::readFrom",
355 "Was expecting a metadata tree with size 1, instead of %i.",
357 ::Info(
"xAOD::REvent::readFrom",
358 "File most probably produced by hadd..." );
364 static const std::string eventFormatTypeName =
366 ::TClass*
cl = ::TClass::GetClass( eventFormatTypeName.c_str() );
368 ::Warning(
"xAOD::REvent::readFrom",
369 "Couldn't load the EventFormat dictionary" );
373 const std::string eventFormatBranchName =
375 if( !
m_inMetaTree->GetBranch( eventFormatBranchName.c_str() ) ) {
379 ::Info(
"xAOD::REvent::readFrom",
"Input file provides no event or "
382 return StatusCode::SUCCESS;
388 m_inMetaTree->SetBranchAddress( eventFormatBranchName.c_str(),
391 ::Error(
"xAOD::REvent::readFrom",
392 XAOD_MESSAGE(
"Failed to connect to EventFormat object" ) );
393 return StatusCode::FAILURE;
410 std::set<std::string> lOtherMetaTreeNames = {};
411 TList *lKeys =
infile->GetListOfKeys();
414 for (
int iKey = 0; iKey < lKeys->GetEntries() ; iKey++){
416 std::string
keyName = lKeys->At(iKey)->GetName();
421 && (
keyName.find(
"MetaData") != std::string::npos)
422 && !(
keyName.find(
"MetaDataHdr") != std::string::npos)){
424 const char *
className = ((::TKey*)lKeys->At(iKey))->GetClassName();
425 static constexpr Bool_t LOAD = kFALSE;
426 static constexpr Bool_t
SILENT = kTRUE;
427 ::TClass*
cl = ::TClass::GetClass(
className, LOAD, SILENT);
428 if ((
cl !=
nullptr) &&
cl->InheritsFrom(::TTree::Class())){
429 lOtherMetaTreeNames.insert(
keyName);
435 ::Info(
"xAOD::REvent::readFrom",
XAOD_MESSAGE(
"no keys found"));
439 for (
const std::string & metaTreeName : lOtherMetaTreeNames){
440 TTree *tmpMetaTree =
dynamic_cast< ::TTree*
>(
infile->Get( metaTreeName.c_str() ) );
444 ::Warning(
"xAOD::REvent::readFrom",
"Could not read metadata tree=%s",metaTreeName.c_str());
450 if ( tmpMetaTree->LoadTree(0) < 0 ){
451 ::Error(
"xAOD::REvent::readFrom",
452 XAOD_MESSAGE(
"Failed to load entry for metadata tree=%s" ),
453 tmpMetaTree->GetName() );
454 return StatusCode::FAILURE;
458 const std::string tmpEventFormatBranchName =
460 if( ! tmpMetaTree->GetBranch( tmpEventFormatBranchName.c_str() ) ) {
462 ::Warning(
"xAOD::REvent::readFrom",
"No EventFormat branch found in metadata tree=%s",tmpMetaTree->GetName() );
468 tmpMetaTree->SetBranchAddress( tmpEventFormatBranchName.c_str(),
469 &tmpFormat, &tmpBr );
471 ::Error(
"xAOD::REvent::readFrom",
472 XAOD_MESSAGE(
"Failed to connect to EventFormat object for metadata tree = %s"), tmpMetaTree->GetName() );
473 return StatusCode::FAILURE;
476 tmpBr->GetEntry( 0 );
478 for (
const std::pair<const std::string, xAOD::EventFormatElement> &evtElem : *tmpFormat){
496 return StatusCode::FAILURE;
510 const TIncident beginIncident( IncidentType::BeginInputFile );
511 for( TVirtualIncidentListener* listener :
m_listeners ) {
512 listener->handle( beginIncident );
519 const TIncident endIncident( IncidentType::EndInputFile );
520 for( TVirtualIncidentListener* listener :
m_listeners ) {
521 listener->handle( endIncident );
525 return StatusCode::SUCCESS;
◆ record()
StatusCode xAOD::Experimental::REvent::record |
( |
void * |
obj, |
|
|
const std::string & |
typeName, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Internal function for recording an object into the output.
Definition at line 2139 of file REvent.cxx.
2142 return StatusCode::SUCCESS;
◆ recordMeta() [1/2]
template<typename T >
StatusCode xAOD::Experimental::REvent::recordMeta |
( |
std::unique_ptr< T > |
obj, |
|
|
const std::string & |
key, |
|
|
::Int_t |
basketSize = 32000 , |
|
|
::Int_t |
splitLevel = 1 |
|
) |
| |
|
inherited |
Add an object to the output file's metadata, explicitly taking ownership of it.
◆ recordMeta() [2/2]
template<typename T >
StatusCode xAOD::Experimental::REvent::recordMeta |
( |
T * |
obj, |
|
|
const std::string & |
key, |
|
|
::Int_t |
basketSize = 32000 , |
|
|
::Int_t |
splitLevel = 1 |
|
) |
| |
|
inherited |
Add an object to the output file's metadata.
◆ recordObject()
|
overrideprotectedinherited |
Record an object in the store.
Definition at line 456 of file REventProxyDict.cxx.
459 throw std::runtime_error(
"xAOD::REvent::recordObject is not "
◆ registerKey()
void xAOD::Experimental::REvent::registerKey |
( |
SG::sgkey_t |
key, |
|
|
const std::string & |
str, |
|
|
CLID |
clid |
|
) |
| |
|
overrideprotectedinherited |
◆ removeListener()
Remove an incident listener object.
This function allows us to remove a listener when for instance a metadata tool is deleted during a job.
- Parameters
-
listener | Pointer to the listener that should be removed |
- Returns
- The usual StatusCode types
Definition at line 790 of file REvent.cxx.
798 ::Error(
"xAOD::REvent::removeListener",
800 static_cast< void*
>( listener ) );
801 return StatusCode::FAILURE;
808 return StatusCode::SUCCESS;
◆ retrieve() [1/4]
template<typename T >
StatusCode xAOD::Experimental::REvent::retrieve |
( |
const T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Retrieve either an input or an output object from the event.
◆ retrieve() [2/4]
template<typename T >
bool xAOD::TVirtualEvent::retrieve |
( |
const T *& |
obj, |
|
|
const std::string & |
key, |
|
|
bool |
silent = false |
|
) |
| |
|
inherited |
Function retrieving an object from the event (constant version)
◆ retrieve() [3/4]
Function retrieving an object from the event (constant version)
◆ retrieve() [4/4]
template<typename T >
StatusCode xAOD::Experimental::REvent::retrieve |
( |
T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Retrieve an output object from the event.
◆ retrieveMetaInput()
template<typename T >
StatusCode xAOD::Experimental::REvent::retrieveMetaInput |
( |
const T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Retrieve an input metadata object.
◆ retrieveMetaOutput()
template<typename T >
StatusCode xAOD::Experimental::REvent::retrieveMetaOutput |
( |
const T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Retrieve an output metadata object.
◆ setActive()
void xAOD::Experimental::REvent::setActive |
( |
| ) |
const |
|
inherited |
Set this event object as the currently active one.
Setting REvent objects happens automatically when reading a file, but when writing a file from scratch, the code doesn't necessarily know which REvent object a given smart pointer should "belong to".
This function helps the user with setting this up.
Definition at line 704 of file REvent.cxx.
711 #ifndef XAOD_STANDALONE
713 #endif // not XAOD_STANDALONE
◆ setAuxItemList()
void xAOD::Experimental::REvent::setAuxItemList |
( |
const std::string & |
containerKey, |
|
|
const std::string & |
itemList |
|
) |
| |
|
inherited |
Configure which dynamic variables to write out for a given store.
This function receives the rules for selecting which dynamic auxiliary branches should be written for a given container, in the exact same format in which we need to set it in the Athena output ItemList.
- Parameters
-
containerKey | The name of the auxiliary container in question |
itemList | The variable list according to the ... formatting rules |
Definition at line 726 of file REvent.cxx.
736 while( std::getline(
ss, attr,
'.' ) ) {
◆ setAuxStore() [1/2]
StatusCode xAOD::Experimental::REvent::setAuxStore |
( |
RObjectManager & |
mgr, |
|
|
::Bool_t |
metadata = kFALSE |
|
) |
| |
|
protectedinherited |
Function connecting a DV object to its auxiliary store.
Every time a DataVector is read in from the input for a new TTree entry, one needs to re-connect it with its auxiliary store.
This function takes care of this.
- Parameters
-
mgr | The manager object of the DV container |
metadata | Flag specifying whether we're dealing with a metadata or event data object |
- Returns
kTRUE
if the setup was successful, or kFALSE
if it was not
Definition at line 3106 of file REvent.cxx.
3111 return StatusCode::SUCCESS;
3115 const std::string
key =
mgr.fieldName();
3123 TVirtualManager* auxMgr =
nullptr;
3133 return StatusCode::SUCCESS;
3135 auxMgr = itr->second;
3137 auxKey =
key +
"Aux:";
3142 ::Int_t readBytes = auxMgr->getEntry(
m_entry);
3146 const std::string dynAuxKey = auxKey +
"Dynamic";
3147 auto dynAuxMgr =
objects.find( dynAuxKey );
3149 if( ( dynAuxMgr !=
objects.end() ) &&
3151 ( auxMgr == &
mgr ) ) ) {
3157 dynAuxMgr->second->getEntry();
3168 RObjectManager& auxMgrRef =
3169 dynamic_cast< RObjectManager&
>( *auxMgr );
3175 auto dynAuxMgr =
objects.find( dynAuxKey );
3176 if( dynAuxMgr ==
objects.end() ) {
3177 ::Error(
"xAOD::REvent::setAuxStore",
3179 return StatusCode::FAILURE;
3181 dynAuxMgr->second->getEntry();
3187 if( auxMgr == &
mgr ) {
3188 return StatusCode::SUCCESS;
3194 switch(
mgr.holder()->typeKind() ) {
3213 if(
vec && ( !
vec->trackIndices() ) ) {
3214 forceTrackIndices( *
vec );
3218 if( ( !
vec ) && ( ! aux ) ) {
3219 ::Fatal(
"xAOD::REvent::setAuxStore",
3221 "SG::AuxVectorBase or SG::AuxElement" ),
3222 mgr.holder()->getClass()->GetName() );
3229 TAuxManager* amgr =
dynamic_cast< TAuxManager*
>( auxMgr );
3231 ::Fatal(
"xAOD::REvent::setAuxStore",
3232 XAOD_MESSAGE(
"Auxiliary manager for \"%s\" is not of the "
3233 "right type" ), auxKey.c_str() );
3234 return StatusCode::FAILURE;
3236 store = amgr->getConstStore();
3242 amgr->getStore()->setStructMode(
mode );
3247 RObjectManager* omgr =
3248 dynamic_cast< RObjectManager*
>( auxMgr );
3250 ::Fatal(
"xAOD::REvent::setAuxStore",
3251 XAOD_MESSAGE(
"Auxiliary manager for \"%s\" is not of the "
3252 "right type" ), auxKey.c_str() );
3253 return StatusCode::FAILURE;
3260 ::Fatal(
"xAOD::REvent::setAuxStore",
3270 ::Fatal(
"xAOD::REvent::setAuxStore",
3275 return StatusCode::SUCCESS;
◆ setAuxStore() [2/2]
StatusCode xAOD::Experimental::REvent::setAuxStore |
( |
TObjectManager & |
mgr | ) |
|
|
protectedinherited |
Function connecting a DV object to its auxiliary store - using TTree, for metadata only.
For metadata from a file with a TTree implementation, for each new file, one needs to re-connect it with its auxiliary store.
This function takes care of this.
- Parameters
-
mgr | The manager object of the DV container |
- Returns
kTRUE
if the setup was successful, or kFALSE
if it was not
Definition at line 3286 of file REvent.cxx.
3290 return StatusCode::SUCCESS;
3294 const std::string
key =
mgr.branch()->GetName();
3301 TVirtualManager* auxMgr =
nullptr;
3311 return StatusCode::SUCCESS;
3313 auxMgr = itr->second;
3314 auxKey =
key +
"Aux.";
3359 if( auxMgr == &
mgr ) {
3360 return StatusCode::SUCCESS;
3366 switch(
mgr.holder()->typeKind() ) {
3385 if(
vec && ( !
vec->trackIndices() ) ) {
3386 forceTrackIndices( *
vec );
3390 if( ( !
vec ) && ( ! aux ) ) {
3391 ::Fatal(
"xAOD::REvent::setAuxStore",
3393 "SG::AuxVectorBase or SG::AuxElement" ),
3394 mgr.holder()->getClass()->GetName() );
3401 TAuxManager* amgr =
dynamic_cast< TAuxManager*
>( auxMgr );
3403 ::Fatal(
"xAOD::REvent::setAuxStore",
3404 XAOD_MESSAGE(
"Auxiliary manager for \"%s\" is not of the "
3405 "right type" ), auxKey.c_str() );
3406 return StatusCode::FAILURE;
3408 store = amgr->getConstStore();
3414 amgr->getStore()->setStructMode(
mode );
3418 TObjectManager* omgr =
3419 dynamic_cast< TObjectManager*
>( auxMgr );
3421 ::Fatal(
"xAOD::REvent::setAuxStore",
3422 XAOD_MESSAGE(
"Auxiliary manager for \"%s\" is not of the "
3423 "right type" ), auxKey.c_str() );
3424 return StatusCode::FAILURE;
3430 ::Fatal(
"xAOD::REvent::setAuxStore",
3440 ::Fatal(
"xAOD::REvent::setAuxStore",
3445 return StatusCode::SUCCESS;
◆ setPrintEventProxyWarnings()
void xAOD::Experimental::REvent::setPrintEventProxyWarnings |
( |
bool |
print | ) |
|
|
inherited |
Function to silence warnings associated with broken element links.
These appear harmless so long as you don't actually try to access the links (which will cause other errors).
Definition at line 3813 of file REvent.cxx.
◆ setUpDynamicStore() [1/2]
StatusCode xAOD::Experimental::REvent::setUpDynamicStore |
( |
RObjectManager & |
mgr, |
|
|
ROOT::RNTupleReader * |
ntupleReader |
|
) |
| |
|
protectedinherited |
event uses RNTupleReader:
This function is used by connectBranch(...) to set up auxiliary store type objects correctly for accessing dynamic variables from the input file.
- Parameters
-
mgr | The object manager of the auxiliary store object |
ntupleReader | The ntupleReader to read dynamic variables from |
- Returns
- The usual
StatusCode
types
RDS: for RAuxStore changing ( 0 ) to ( 0, 0 ) - for entry, all. Not sure if this is correct?
Definition at line 2937 of file REvent.cxx.
2940 ::TMethodCall setNameCall;
2944 setNameCall.InitWithPrototype(
mgr.holder()->getClass(),
2945 "setName",
"const char*" );
2946 if( setNameCall.IsValid() ) {
2951 const char* charParams =
params.Data();
2952 setNameCall.Execute(
mgr.holder()->get(), charParams );
2955 ::Warning(
"xAOD::REvent::setUpDynamicStore",
2956 "Couldn't find setName(...) function for container %s "
2958 mgr.fieldName().c_str(),
2959 mgr.holder()->getClass()->GetName() );
2964 static const TClass*
const holderClass =
2966 if( !
mgr.holder()->getClass()->InheritsFrom( holderClass ) ) {
2968 return StatusCode::SUCCESS;
2975 if( ! storeHolder ) {
2976 ::Fatal(
"xAOD::REvent::setUpDynamicStore",
2978 return StatusCode::FAILURE;
2986 new RAuxStore(
mgr.fieldName(), kFALSE,
2994 RAuxManager* amgr =
new RAuxManager(
store,
m_entry, kFALSE );
2997 RETURN_CHECK(
"xAOD::REvent::setUpDynamicStore",
store->readFrom( *ntupleReader ) );
3009 return StatusCode::SUCCESS;
◆ setUpDynamicStore() [2/2]
StatusCode xAOD::Experimental::REvent::setUpDynamicStore |
( |
TObjectManager & |
mgr, |
|
|
::TTree * |
tree |
|
) |
| |
|
protectedinherited |
Function adding dynamic variable reading capabilities to an auxiliary store object metadata still uses TTree:
This function is used by connectMetaBranch(...) to set up auxiliary store type objects correctly for accessing dynamic variables from the input file.
- Parameters
-
mgr | The object manager of the auxiliary store object |
tree | The tree to read dynamic variables from |
- Returns
- The usual
StatusCode
types
Definition at line 3022 of file REvent.cxx.
3025 ::TMethodCall setNameCall;
3029 setNameCall.InitWithPrototype(
mgr.holder()->getClass(),
3030 "setName",
"const char*" );
3031 if( setNameCall.IsValid() ) {
3036 const char* charParams =
params.Data();
3037 setNameCall.Execute(
mgr.holder()->get(), charParams );
3040 ::Warning(
"xAOD::REvent::setUpDynamicStore",
3041 "Couldn't find setName(...) function for container %s "
3043 mgr.branch()->GetName(),
3044 mgr.holder()->getClass()->GetName() );
3049 static const TClass*
const holderClass =
3051 if( !
mgr.holder()->getClass()->InheritsFrom( holderClass ) ) {
3053 return StatusCode::SUCCESS;
3060 if( ! storeHolder ) {
3061 ::Fatal(
"xAOD::REvent::setUpDynamicStore",
3063 return StatusCode::FAILURE;
3071 new TAuxStore(
mgr.branch()->GetName(), kFALSE,
3079 TAuxManager* amgr =
new TAuxManager(
store, kFALSE );
3087 store->getEntry( 0 );
3093 return StatusCode::SUCCESS;
◆ stringToKey()
|
overrideprotectedinherited |
◆ transientContains() [1/2]
template<typename T >
::Bool_t xAOD::Experimental::REvent::transientContains |
( |
const std::string & |
key | ) |
const |
|
inherited |
Function checking if an object is already in memory.
◆ transientContains() [2/2]
Bool_t xAOD::Experimental::REvent::transientContains |
( |
const std::string & |
key, |
|
|
const std::type_info & |
ti, |
|
|
::Bool_t |
metadata = kFALSE |
|
) |
| const |
|
protectedinherited |
Internal function checking if an object is already in memory.
Internal function checking if an object of a given type, with a given key is held in memory by the event object.
It's this function doing the heavy lifting for the public template function.
- Parameters
-
key | The key/branch name of the object |
ti | The type description of the object |
metadata | Flag deciding whether we are looking for a metadata object or not |
- Returns
kTRUE
if such a modifiable object is held by the event object at the moment, kFALSE
otherwise
Definition at line 3806 of file REvent.cxx.
◆ transientContainsMeta()
template<typename T >
::Bool_t xAOD::Experimental::REvent::transientContainsMeta |
( |
const std::string & |
key | ) |
const |
|
inherited |
Function checking if a meta-object is already in memory.
◆ ATLAS_THREAD_SAFE
|
mutableprotectedinherited |
Map from hashed sgkey to BranchInfo.
Definition at line 535 of file REvent.h.
◆ CACHE_SIZE
const ::Int_t xAOD::Experimental::REvent::CACHE_SIZE = -1 |
|
staticprotectedinherited |
Size of a possible TTreeCache (30 MB)
Definition at line 463 of file REvent.h.
◆ DEFAULT_KEY
constexpr sgkey_t xAOD::TVirtualEvent::DEFAULT_KEY = ~static_cast<sgkey_t>(0) |
|
staticconstexprinherited |
Key for retrieving the "default" object of a given type.
Definition at line 41 of file TVirtualEvent.h.
◆ EVENT_RNTUPLE_NAME
const char *const xAOD::Experimental::REvent::EVENT_RNTUPLE_NAME = "EventData" |
|
staticprotectedinherited |
Name of the event tree.
Definition at line 465 of file REvent.h.
◆ KEY_MASK
Mask for the keys, used mostly internally.
Definition at line 43 of file TVirtualEvent.h.
◆ m_auxItemList
std::unordered_map< std::string, std::set< std::string > > xAOD::Experimental::REvent::m_auxItemList |
|
protectedinherited |
Rules for selecting which auxiliary branches to write.
Definition at line 507 of file REvent.h.
◆ m_auxMode
EAuxMode xAOD::Experimental::REvent::m_auxMode |
|
protectedinherited |
The auxiliary access mode.
Definition at line 470 of file REvent.h.
◆ m_branchesMutex
|
mutableprotectedinherited |
◆ m_entry
::Long64_t xAOD::Experimental::REvent::m_entry |
|
protectedinherited |
The entry to look at from the input tree.
Definition at line 482 of file REvent.h.
◆ m_inMetaTree
::TTree* xAOD::Experimental::REvent::m_inMetaTree |
|
protectedinherited |
Pointer to the metadata tree in the input file.
Definition at line 476 of file REvent.h.
◆ m_inMetaTreeIsTTree
::Bool_t xAOD::Experimental::REvent::m_inMetaTreeIsTTree |
|
protectedinherited |
Boolean indicating the technology of the metadata tree, i.e. TTree of RNTuple.
Definition at line 479 of file REvent.h.
◆ m_inNtupleReader
std::unique_ptr<ROOT::RNTupleReader> xAOD::Experimental::REvent::m_inNtupleReader |
|
protectedinherited |
The main event reader: RNTupleReader.
Definition at line 473 of file REvent.h.
◆ m_inputEventFormat
EventFormat xAOD::Experimental::REvent::m_inputEventFormat |
|
protectedinherited |
Format of the current input file.
Definition at line 502 of file REvent.h.
◆ m_inputMetaObjects
Object_t xAOD::Experimental::REvent::m_inputMetaObjects |
|
protectedinherited |
Collection of all the managed input meta-objects.
Definition at line 497 of file REvent.h.
◆ m_inputMissingObjects
std::set< std::string > xAOD::Experimental::REvent::m_inputMissingObjects |
|
protectedinherited |
Objects that have been asked for, but were found to be missing in the current input.
Definition at line 492 of file REvent.h.
◆ m_inputObjects
Object_t xAOD::Experimental::REvent::m_inputObjects |
|
protectedinherited |
Collection of all the managed input objects.
Definition at line 488 of file REvent.h.
◆ m_listeners
Listener_t xAOD::Experimental::REvent::m_listeners |
|
protectedinherited |
Listeners who should be notified when certain incidents happen.
Definition at line 510 of file REvent.h.
◆ m_nameRemapping
std::unordered_map< std::string, std::string > xAOD::Experimental::REvent::m_nameRemapping |
|
protectedinherited |
Container name re-mapping rules.
Definition at line 513 of file REvent.h.
◆ m_outputEventFormat
EventFormat* xAOD::Experimental::REvent::m_outputEventFormat |
|
protectedinherited |
Format of the current output file.
Definition at line 504 of file REvent.h.
◆ m_outputMetaObjects
Object_t xAOD::Experimental::REvent::m_outputMetaObjects |
|
protectedinherited |
Collection of all the managed output meta-objects.
Definition at line 499 of file REvent.h.
◆ m_outputObjects
Object_t xAOD::Experimental::REvent::m_outputObjects |
|
protectedinherited |
Collection of all the managed output object.
Definition at line 494 of file REvent.h.
◆ m_outTree
::TTree* xAOD::Experimental::REvent::m_outTree |
|
protectedinherited |
The tree that we are writing to.
Definition at line 485 of file REvent.h.
◆ m_printEventProxyWarnings
Bool_t xAOD::Experimental::REvent::m_printEventProxyWarnings = true |
|
protectedinherited |
Option to silence common warnings that seem to be harmless.
Definition at line 516 of file REvent.h.
◆ METADATA_TREE_NAME
const char *const xAOD::Experimental::REvent::METADATA_TREE_NAME = "MetaData" |
|
staticprotectedinherited |
Name of the metadata tree.
Definition at line 467 of file REvent.h.
The documentation for this class was generated from the following file:
std::set< std::string > m_inputMissingObjects
Objects that have been asked for, but were found to be missing in the current input.
JetConstituentVector::iterator iterator
::Bool_t transientContains(const std::string &key) const
Function checking if an object is already in memory.
std::string replace(std::string s, const std::string &s2, const std::string &s3)
@ kBranchAccess
Access auxiliary data branch-by-branch.
Object_t m_outputObjects
Collection of all the managed output object.
@ AUXELEMENT
A type inheriting from SG::AuxElement.
#define RETURN_CHECK(CONTEXT, EXP)
Helper macro for checking return codes in a compact form in the code.
Tool for accessing xAOD files outside of Athena, version RNTuple.
virtual AuxStoreType getStoreType() const =0
Return the type of the store object.
::Bool_t contains(const std::string &key)
Function checking if an object is available from the store.
std::string find(const std::string &s)
return a remapped string
upgrade_mutex_t m_branchesMutex
ReadStats & stats()
Access the object belonging to the current thread.
std::unordered_map< std::string, TVirtualManager * > Object_t
Definition of the internal data structure type.
@ SILENT
don't print anything and return success
void * getOutputObject(SG::sgkey_t key, const std::type_info &ti) override
This function is used by the TVirtualEvent interface to access an output object with a given hashed k...
static void setEvent(TVirtualEvent *ptr)
Set the active event pointer.
const BranchInfo * getBranchInfo(SG::sgkey_t sgkey) const
Get the object describing one object/branch.
std::string normalizedTypeinfoName(const std::type_info &info)
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
Base class for elements of a container that can have aux data.
@ DATAVECTOR
A DataVector container.
void Print(::Option_t *option="") const
Print information about the collected statistics.
EStructMode
"Structural" modes of the object
static IProxyDict * setStore(IProxyDict *store)
Set the current store.
static TStore * store()
Access the currently active TStore object.
std::vector< size_t > vec
@ kObjectStore
The object describes a single object.
@ kContainerStore
The object describes an entire container.
Manage index tracking and synchronization of auxiliary data.
void nextEvent()
Function incrementing the processed event counter.
static const char *const METADATA_TREE_NAME
Name of the metadata tree.
const xAOD::EventFormatElement * getEventFormatElement(SG::sgkey_t sgkey) const
Get the metadata object for a given "SG key".
std::unordered_map< std::string, std::string > m_nameRemapping
Container name re-mapping rules.
size_t auxid_t
Identifier for a particular aux data item.
StatusCode connectMetaBranch(const std::string &key, ::Bool_t silent=kFALSE)
Function setting up access to a branch in the metadata tree.
const void * getInputObject(SG::sgkey_t key, const std::type_info &ti, bool silent=false) override
Function for retrieving an input object in a non-template way.
::Bool_t hasAuxStore(const THolder &holder)
RDS: for the three following methods, moving to directly take THolder rather than have one for TObjec...
std::string getTypeName(const std::type_info &ti)
This function is necessary in order to create type names that ROOT can understand.
@ kAthenaAccess
Access containers/objects like Athena does.
void setStore(const SG::IConstAuxStore *store)
Set the store associated with this object.
Object_t m_inputObjects
Collection of all the managed input objects.
::Bool_t isStandalone(const THolder &holder)
Function checking if an object is standalone (not a container)
SG::sgkey_t getHash(const std::string &key) const override
Function returning the hash describing an object name.
void setBranchNum(::Int_t num)
Set the total number of branches on the input.
@ kUndefinedAccess
Undefined, to be selected by the object.
::TTree * m_outTree
The tree that we are writing to.
StatusCode connectBranch(const std::string &key, ::Bool_t silent=kFALSE)
Function setting up access to a particular branch.
StatusCode setAuxStore(RObjectManager &mgr, ::Bool_t metadata=kFALSE)
Function connecting a DV object to its auxiliary store.
std::unique_ptr< ROOT::RNTupleReader > m_inNtupleReader
The main event reader: RNTupleReader.
static IOStats & instance()
Singleton object accessor.
EventFormat m_inputEventFormat
Format of the current input file.
void setActive() const
Set this event object as the currently active one.
StatusCode connectMetaAux(const std::string &prefix, ::Bool_t standalone)
Function setting up access to a set of auxiliary branches for a metadata object.
Listener_t m_listeners
Listeners who should be notified when certain incidents happen.
virtual void setStore(IAuxStore *store)=0
Give an auxiliary store object to the holder object.
void print(char *figname, TCanvas *c1)
void keys(std::vector< std::string > &vkeys, bool metadata=false) const
provide list of all keys associated with provided type.
EAuxMode m_auxMode
The auxiliary access mode.
std::unordered_set< sgkey_t > SGKeySet
A set of sgkey_t values.
REvent(EAuxMode mode=kUndefinedAccess)
Default constructor.
StatusCode setUpDynamicStore(TObjectManager &mgr, ::TTree *tree)
Function adding dynamic variable reading capabilities to an auxiliary store object metadata still use...
SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
Get proxy given a hashed key+clid.
void readContainer(const std::string &name)
Function incrementing the read counter on a specific container.
Manager for EDM objects created by ROOT.
SG::SGKeyMap< BranchInfo > m_branches ATLAS_THREAD_SAFE
Map from hashed sgkey to BranchInfo.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
::Long64_t m_entry
The entry to look at from the input tree.
def silent(func)
Redirect stdout/err to /dev/null Useful wrapper to get rid of ROOT verbosity...
std::unordered_map< std::string, std::set< std::string > > m_auxItemList
Rules for selecting which auxiliary branches to write.
Bool_t m_printEventProxyWarnings
Option to silence common warnings that seem to be harmless.
std::string getFirstBranchMatch(TTree *tree, const std::string &pre)
This function is used to search for a branch in a TTree that contains a given substring.
EventFormat_v1 EventFormat
Definition of the current event format version.
void setSGKey(sgkey_t sgkey)
check if it is a transient ID (primary or symLinked):
::Bool_t m_inMetaTreeIsTTree
Boolean indicating the technology of the metadata tree, i.e. TTree of RNTuple.
static const char *const EVENT_RNTUPLE_NAME
Name of the event tree.
@ kClassAccess
Access auxiliary data using the aux containers.
::Bool_t isAuxStore(const THolder &holder)
Function checking if a given object may be an auxiliary store.
@ kUndefinedStore
The structure mode is not defined.
Error
The different types of error that can be flagged in the L1TopoRDO.
StatusCode initStats()
Function to initialise the statistics for all Tree content.
const EventFormat * inputEventFormat() const
RDS: Only valid for TChains, i.e.
EventFormat * m_outputEventFormat
Format of the current output file.
Object_t m_inputMetaObjects
Collection of all the managed input meta-objects.
AthContainers_detail::upgrading_lock< upgrade_mutex_t > upgrading_lock_t
Class describing the access statistics of a collection of branches.
Interface for const operations on an auxiliary store.
const std::string & getName(const void *obj) const override
Function returning the key describing a known object.
@ AST_ObjectStore
The store describes a single object.
Interface for objects taking part in direct ROOT I/O.
SG::sgkey_t hash(const std::string &name)
This function provides a hashed version of the key (branch) names used in the xAOD file,...
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
const std::string & name() const override
Get the name of the instance.
::TTree * m_inMetaTree
Pointer to the metadata tree in the input file.
Object_t m_outputMetaObjects
Collection of all the managed output meta-objects.
SG::DataProxy * proxy(const void *const pTransient) const override
get proxy for a given data object address in memory
StatusCode connectAux(const std::string &prefix, ::Bool_t standalone)
Function setting up access to a set of auxiliary branches.
void setProxy(SG::DataProxy &proxy)
@ AST_ContainerStore
The store describes a container.
SG::sgkey_t stringToKey(const std::string &str, CLID clid) override
Find the string corresponding to a given key.