 |
ATLAS Offline Software
|
Tool for accessing xAOD files outside of Athena, version RNTuple.
More...
#include <REvent.h>
|
| bool | contains (const std::string &key, const std::type_info &ti, bool metadata) |
| | Internal function checking if an object is in the input. More...
|
| |
| bool | transientContains (const std::string &key, const std::type_info &ti, bool metadata) const |
| | Internal function checking if an object is already in memory. More...
|
| |
| void * | getOutputObject (const std::string &key, const std::type_info &ti, bool metadata) const |
| | Function for retrieving an output object in a non-template way. More...
|
| |
| const void * | getInputObject (const std::string &key, const std::type_info &ti, bool silent, bool metadata) |
| | Function for retrieving an input object in a non-template way. More...
|
| |
| StatusCode | recordTypeless (void *obj, const std::string &typeName, const std::string &key, bool overwrite=false, bool metadata=true, bool isOwner=true) |
| | Internal function for recording an object into the output. More...
|
| |
Tool for accessing xAOD files outside of Athena, version RNTuple.
Proper access to xAOD files in ROOT (outside of Athena) needs to be done through such an object. It takes care of reading and writing xAOD files together with their file format metadata, setting up smart pointers correctly, etc.
Definition at line 28 of file REvent.h.
◆ Object_t
Definition of the internal data structure type.
Definition at line 304 of file Event.h.
◆ sgkey_t
◆ upgrade_mutex_t
Mutex type for multithread synchronization.
Definition at line 349 of file Event.h.
◆ upgrading_lock_t
Lock type for multithread synchronization.
Definition at line 351 of file Event.h.
◆ REvent()
| xAOD::Experimental::REvent::REvent |
( |
| ) |
|
◆ ~REvent()
| xAOD::Experimental::REvent::~REvent |
( |
| ) |
|
|
virtual |
◆ addListener()
Register an incident listener object.
This function works pretty much like IIncidentSvc::addListener does in Athena.
It tells the TEvent 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 97 of file EventCore.cxx.
100 if (listener ==
nullptr) {
102 return StatusCode::FAILURE;
109 <<
" is already registered");
110 return StatusCode::SUCCESS;
117 return StatusCode::SUCCESS;
◆ addNameRemap()
| StatusCode Event::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 162 of file EventCore.cxx.
169 << onfile <<
"\" -> \"" <<
newName
171 return StatusCode::FAILURE;
178 << itr->second <<
"\" -> \"" << itr->first <<
"\" with: \""
179 << onfile <<
"\" -> \"" <<
newName <<
"\"");
186 return StatusCode::SUCCESS;
◆ addToStore()
|
|
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 249 of file EventIProxyDict.cxx.
257 "Function should only be called through an invalid ElementLink");
261 const ::TString uniqueKey =
264 bi.m_proxy.reset(
proxy);
267 std::make_pair(
stringToKey(uniqueKey.Data(), clid), std::move(bi)));
270 return StatusCode::SUCCESS;
◆ clearListeners()
| void Event::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 143 of file EventCore.cxx.
◆ clearNameRemap()
| void Event::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 193 of file EventCore.cxx.
◆ connectAux()
| StatusCode xAOD::Experimental::REvent::connectAux |
( |
const std::string & |
prefix, |
|
|
bool |
standalone |
|
) |
| |
|
overrideprivatevirtual |
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
Implements xAOD::Event.
Definition at line 576 of file REvent.cxx.
581 return StatusCode::FAILURE;
586 return StatusCode::SUCCESS;
590 static constexpr
bool SILENT =
false;
597 return StatusCode::FAILURE;
599 const Details::IObjectManager* omgr =
600 dynamic_cast<const RObjectManager*
>(mgr_itr->second.get());
601 if (omgr ==
nullptr) {
603 return StatusCode::FAILURE;
607 static const TClass*
const holderClass =
609 if (omgr->holder()->getClass()->InheritsFrom(holderClass) ==
false) {
611 return StatusCode::SUCCESS;
619 return StatusCode::FAILURE;
632 return StatusCode::FAILURE;
636 return StatusCode::SUCCESS;
◆ connectMetaAux()
| StatusCode xAOD::Experimental::REvent::connectMetaAux |
( |
const std::string & |
prefix, |
|
|
bool |
standalone |
|
) |
| |
|
overrideprivatevirtual |
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
Implements xAOD::Event.
Definition at line 648 of file REvent.cxx.
654 return StatusCode::FAILURE;
659 return StatusCode::SUCCESS;
663 static constexpr
bool SILENT =
false;
670 return StatusCode::FAILURE;
672 const Details::IObjectManager* omgr =
673 dynamic_cast<const RObjectManager*
>(mgr_itr->second.get());
674 if (omgr ==
nullptr) {
676 return StatusCode::FAILURE;
680 static const TClass*
const holderClass =
682 if (omgr->holder()->getClass()->InheritsFrom(holderClass) ==
false) {
684 return StatusCode::SUCCESS;
692 return StatusCode::FAILURE;
705 return StatusCode::FAILURE;
709 return StatusCode::SUCCESS;
◆ connectMetaObject()
| StatusCode xAOD::Experimental::REvent::connectMetaObject |
( |
const std::string & |
key, |
|
|
bool |
silent |
|
) |
| |
|
overrideprivatevirtual |
Function setting up access to a particular metadata object.
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
Implements xAOD::Event.
Definition at line 490 of file REvent.cxx.
495 return StatusCode::FAILURE;
500 return StatusCode::SUCCESS;
504 std::string key_to_read =
key;
505 if (
key.ends_with(
"Aux.")) {
506 key_to_read.replace(key_to_read.size() - 1, 1,
":");
510 if (
m_metaReader->GetDescriptor().FindFieldId(key_to_read.c_str()) ==
511 ROOT::kInvalidDescriptorId) {
514 ATH_MSG_WARNING(
"Field \"" << key_to_read <<
"\" not available on input");
516 return StatusCode::RECOVERABLE;
524 ROOT::RNTupleView<void>
view =
525 m_metaReader->GetView<
void>(key_to_read.c_str(),
nullptr);
529 "Couldn't find an appropriate type with a dictionary for field \""
530 << key_to_read <<
"\"");
531 return StatusCode::FAILURE;
533 ::TClass* realClass = ::TClass::GetClass(
className.c_str());
534 if ((!realClass) || (!realClass->IsLoaded())) {
537 "Couldn't find an appropriate type with a dictionary for field \""
538 << key_to_read <<
"\"");
539 return StatusCode::FAILURE;
543 void*
ptr = realClass->New();
544 static const ::Long64_t FIRST_ENTRY = 0;
545 auto mgr = std::make_unique<RObjectManager>(
547 std::make_unique<THolder>(
ptr, realClass));
548 RObjectManager* mgrPtr =
mgr.get();
563 return StatusCode::SUCCESS;
◆ connectObject()
| StatusCode xAOD::Experimental::REvent::connectObject |
( |
const std::string & |
key, |
|
|
bool |
silent |
|
) |
| |
|
overrideprivatevirtual |
Function setting up access to a particular object.
This is one of the more important functions of the class.
It connects the event object to a given field of the input RNTuple.
The type that is read in to memory is not actually determined by the type written to the ntuple itself, but from the xAOD::EventFormat object. Which is there to make it possible to possibly use ROOT read rules 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 true to make the code fail silently in case the field can't be connected to |
- Returns
- The usual
StatusCode values
Implements xAOD::Event.
Definition at line 352 of file REvent.cxx.
357 return StatusCode::FAILURE;
365 return StatusCode::SUCCESS;
372 return StatusCode::RECOVERABLE;
382 std::string key_to_read =
key;
383 if (
key.ends_with(
"Aux.")) {
384 key_to_read.replace(key_to_read.size() - 1, 1,
":");
396 if (
m_eventReader->GetDescriptor().FindFieldId(key_to_read.c_str()) ==
397 ROOT::kInvalidDescriptorId) {
400 ATH_MSG_WARNING(
"Field \"" << key_to_read <<
"\" not available on input");
403 return StatusCode::RECOVERABLE;
411 ROOT::RNTupleView<void>
view =
421 "Couldn't find an appropriate type with a dictionary for field \""
422 << key_to_read <<
"\"");
423 return StatusCode::FAILURE;
426 ::TClass* realClass = ::TClass::GetClass(
className.c_str());
427 if (((!realClass) || (!realClass->IsLoaded())) &&
ef) {
432 realClass = ::TClass::GetClass(
className.c_str());
434 if ((!realClass) || (!realClass->IsLoaded())) {
437 "Couldn't find an appropriate type with a dictionary for field \""
438 << key_to_read <<
"\"");
439 return StatusCode::FAILURE;
456 if (
ptr ==
nullptr) {
457 ptr = realClass->New();
461 auto mgr = std::make_unique<RObjectManager>(
463 std::make_unique<THolder>(
ptr, realClass));
464 RObjectManager* mgrPtr =
mgr.get();
479 return StatusCode::SUCCESS;
◆ contains() [1/2]
template<typename T >
| bool xAOD::Event::contains |
( |
const std::string & |
key | ) |
|
|
inherited |
Function checking if an object is available from the store.
◆ contains() [2/2]
| bool xAOD::Event::contains |
( |
const std::string & |
key, |
|
|
const std::type_info & |
ti, |
|
|
bool |
metadata |
|
) |
| |
|
protectedinherited |
Internal function checking if an object is in the input.
◆ containsMeta()
template<typename T >
| bool xAOD::Event::containsMeta |
( |
const std::string & |
key | ) |
|
|
inherited |
Function checking if a meta-object is available from the store.
◆ copy()
| StatusCode Event::copy |
( |
const std::string & |
pattern = ".*" | ) |
|
|
inherited |
Copy an object directly from the input to the output.
This function can be used to easily copy a given (set of) object/container(s) to the output, without modifying the contents of it/them.
It only needs to be called on the interface object/container(s), the copying of the auxiliary data is done automatically, and is steered by the xAOD::Event::setAuxItemList function.
- Parameters
-
| pattern | Regular expression for the key(s)/name(s) of the object(s)/container(s) to copy |
Definition at line 28 of file EventIO.cxx.
32 <<
"\" to the output");
35 std::set<std::string>
keys;
47 if (std::regex_match(
key,
re) ==
false) {
51 static const bool SILENT =
true;
56 if (
key.ends_with(
"Aux.")) {
60 if (efe.parentName() !=
"") {
75 if (std::regex_match(
newname,
re) ==
false) {
79 static const bool SILENT =
true;
89 for (
const std::string&
key :
keys) {
92 std::string keyToUse =
key;
97 keyToUse = remap_itr->second;
101 static const bool SILENT =
false;
108 return StatusCode::FAILURE;
110 Details::IObjectManager* objMgr =
111 dynamic_cast<Details::IObjectManager*
>(vobjMgr->second.get());
112 if (objMgr ==
nullptr) {
114 return StatusCode::FAILURE;
116 static const bool METADATA =
false;
117 if (
getInputObject(keyToUse, *(objMgr->holder()->getClass()->GetTypeInfo()),
118 SILENT, METADATA) ==
nullptr) {
120 return StatusCode::FAILURE;
125 static const bool IS_OWNER =
true;
126 ATH_CHECK(
record(objMgr->object(), objMgr->holder()->getClass()->GetName(),
127 key, OVERWRITE, METADATA, IS_OWNER));
131 const std::string auxKey = keyToUse +
"Aux.";
139 return StatusCode::SUCCESS;
◆ dump()
| std::string Event::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 250 of file EventCore.cxx.
253 std::ostringstream
ost;
254 ost <<
"<<<<<<<<<<<<<<<<<<<< xAOD::TEvent Dump >>>>>>>>>>>>>>>>>>>>\n";
260 ::TClass*
cl = ::TClass::GetClass(element.className().c_str());
261 const std::type_info* ti = (
cl ?
cl->GetTypeInfo() :
nullptr);
262 if ((
cl ==
nullptr) || (
cl->IsLoaded() ==
false) || (ti ==
nullptr)) {
264 <<
") found in the event format");
269 static const bool METADATA =
false;
270 if (!
contains(element.branchName(), *ti, METADATA)) {
275 ost <<
" Hash: 0x" << std::setw(8) << std::setfill(
'0') << std::hex
276 << element.hash() <<
" Key: \"" << element.branchName() <<
"\"\n";
278 ost <<
" type: " << element.className() <<
"\n";
279 const bool isNonConst =
281 ost <<
" isConst: " << (isNonConst ?
"No" :
"Yes") <<
"\n";
282 static const bool SILENT =
false;
291 ost <<
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";
◆ getBranchInfo()
Get the object describing one object/branch.
Definition at line 345 of file EventIProxyDict.cxx.
354 auto it = m_branches.find(
sgkey);
355 if (
it != m_branches.end()) {
356 return &(
it->second);
369 static const bool SILENT =
true;
370 static const bool METADATA =
false;
382 static const std::type_info&
dummy =
typeid(
Event);
383 nc_this->getInputObject(
name,
dummy, SILENT, METADATA);
392 const Details::IObjectManager*
mgr =
393 dynamic_cast<const Details::IObjectManager*
>(itr->second.get());
398 bi.m_class =
mgr->holder()->getClass();
403 #ifndef XAOD_STANDALONE
406 CLID_NULL, efe->
branchName(),
new GenericAddress());
411 loader->
setProxy(*bi.m_proxy.get());
412 #endif // not XAOD_STANDALONE
417 auto ret = m_branches.insert(std::make_pair(
sgkey, std::move(bi)));
420 return &(ret.first->second);
◆ getEntries()
| Long64_t xAOD::Experimental::REvent::getEntries |
( |
| ) |
const |
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 252 of file REvent.cxx.
◆ getEntry()
| Int_t xAOD::Experimental::REvent::getEntry |
( |
::Long64_t |
entry, |
|
|
::Int_t |
getall = 0 |
|
) |
| |
Function loading a given entry of the input TTree.
This function is used to move to looking at a new entry from the input ntuple.
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 278 of file REvent.cxx.
303 result += inObj->getEntry(getall);
308 const TIncident incident(IncidentType::BeginEvent);
309 for (TVirtualIncidentListener* listener :
m_listeners) {
310 listener->handle(incident);
◆ getEventFormatElement()
Get the metadata object for a given "SG key".
Definition at line 319 of file EventIProxyDict.cxx.
323 static const bool QUIET =
true;
334 if (missingSGKeys.emplace(
sgkey).second) {
337 "Can't find EventFormatElement for hashed SG key: " <<
sgkey);
◆ getHash()
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 27 of file EventTVirtualEvent.cxx.
◆ getInputObject() [1/2]
| const void * Event::getInputObject |
( |
const std::string & |
key, |
|
|
const std::type_info & |
ti, |
|
|
bool |
silent, |
|
|
bool |
metadata |
|
) |
| |
|
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 218 of file EventIO.cxx.
223 std::string keyToUse =
key;
228 keyToUse = remap_itr->second;
234 if (
store &&
store->contains(keyToUse, ti) &&
store->isConst(keyToUse, ti)) {
235 const void*
result =
store->getConstObject(keyToUse, ti);
250 if (
sc.isSuccess() ==
false) {
258 auto itr =
objects.find(keyToUse);
260 ATH_MSG_FATAL(
"There is an internal logic error in the code...");
265 Details::IObjectManager*
mgr =
266 dynamic_cast<Details::IObjectManager*
>(itr->second.get());
267 if (
mgr ==
nullptr) {
268 if (
key == keyToUse) {
272 <<
key <<
"\"/\"" << keyToUse <<
"\"");
279 const Int_t readBytes =
mgr->getEntry();
284 static const bool IS_METADATA =
false;
287 <<
mgr->holder()->getClass()->GetName() <<
"/"
291 }
else if (readBytes < 0) {
293 <<
mgr->holder()->getClass()->GetName() <<
"/" << keyToUse);
303 << keyToUse <<
"\" as \""
◆ 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 162 of file EventTVirtualEvent.cxx.
173 static const bool METADATA =
false;
◆ 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 51 of file EventTVirtualEvent.cxx.
◆ getName() [1/2]
| const std::string & Event::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 64 of file EventTVirtualEvent.cxx.
93 <<
"\" in the event");
94 static const std::string
dummy;
◆ getName() [2/2]
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 105 of file EventTVirtualEvent.cxx.
124 static const std::string
dummy;
◆ getNames()
| StatusCode xAOD::Experimental::REvent::getNames |
( |
const std::string & |
targetClassName, |
|
|
std::vector< std::string > & |
vkeys, |
|
|
bool |
metadata |
|
) |
| const |
|
overrideprivatevirtual |
Function determining the list keys associated with a type name.
Implements xAOD::Event.
Definition at line 327 of file REvent.cxx.
332 return StatusCode::FAILURE;
◆ getOutputObject() [1/2]
| void * Event::getOutputObject |
( |
const std::string & |
key, |
|
|
const std::type_info & |
ti, |
|
|
bool |
metadata |
|
) |
| const |
|
protectedinherited |
Function for retrieving an output object in a non-template way.
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 154 of file EventIO.cxx.
182 if (itr->second->isSet() ==
false) {
187 Details::IObjectManager*
mgr =
188 dynamic_cast<Details::IObjectManager*
>(itr->second.get());
189 if (
mgr ==
nullptr) {
◆ getOutputObject() [2/2]
|
|
overrideprotectedvirtualinherited |
Function for retrieving an output object in a non-template way.
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 138 of file EventTVirtualEvent.cxx.
147 static const bool METADATA =
false;
◆ hasInput()
| bool xAOD::Experimental::REvent::hasInput |
( |
| ) |
const |
|
overrideprivatevirtual |
◆ hasOutput()
| bool xAOD::Experimental::REvent::hasOutput |
( |
| ) |
const |
|
overrideprivatevirtual |
◆ initMessaging()
| void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ initStats()
| StatusCode xAOD::Experimental::REvent::initStats |
( |
| ) |
|
|
private |
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
- The usual
StatusCode values
Definition at line 850 of file REvent.cxx.
855 return StatusCode::FAILURE;
865 <<
format.className() <<
"\"");
868 if (
key.ends_with(
"Aux.")) {
873 TClass*
cl = TClass::GetClass(
format.className().c_str());
874 if ((
cl ==
nullptr) || (
cl->IsLoaded() ==
false)) {
876 "Couldn't find the dictionary for type: " <<
format.className());
882 static TClass*
const auxContCl = TClass::GetClass(
884 static TClass*
const auxInfoCl = TClass::GetClass(
886 if ((auxContCl ==
nullptr) || (auxInfoCl ==
nullptr)) {
888 "Couldn't get dictionary for xAOD::AuxContainerBase or "
889 "xAOD::AuxInfoBase");
890 return StatusCode::FAILURE;
892 const bool isContainer =
cl->InheritsFrom(auxContCl);
893 const bool isInfo =
cl->InheritsFrom(auxInfoCl);
894 if ((isContainer ==
false) && (isInfo ==
false)) {
897 <<
"\" is of an unknown type: " <<
format.className());
901 <<
", isInfo = " << isInfo);
908 static constexpr
bool TOP_STORE =
true;
919 stats.setBranchNum(
stats.branchNum() + temp.getAuxIDs().size());
925 ROOT::kInvalidDescriptorId) {
932 return StatusCode::SUCCESS;
◆ inputEventFormat()
Get information about the input objects.
Definition at line 228 of file EventCore.cxx.
◆ keys()
template<typename T >
| StatusCode xAOD::Event::keys |
( |
std::vector< std::string > & |
vkeys, |
|
|
bool |
metadata |
|
) |
| const |
|
inherited |
Provide a list of all data object keys associated with a specific type.
◆ keyToString() [1/2]
|
|
overrideprotectedinherited |
◆ keyToString() [2/2]
|
|
overrideprotectedinherited |
◆ metaKeys()
template<typename T >
| StatusCode xAOD::Event::metaKeys |
( |
std::vector< std::string > & |
vkeys | ) |
const |
|
inherited |
Provide a list of all metadata object keys associated with a specific type.
◆ msg() [1/2]
| MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
50 #ifndef XAOD_STANDALONE
52 #else // not XAOD_STANDALONE
54 #endif // not XAOD_STANDALONE
◆ msg() [2/2]
| MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
| lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
63 #endif // not XAOD_STANDALONE
◆ msgLvl()
| bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
| lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
42 #ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44 #else // not XAOD_STANDALONE
45 return m_msg.msgLevel( lvl );
46 #endif // not XAOD_STANDALONE
◆ name()
| const std::string & Event::name |
( |
| ) |
const |
|
overrideprotectedinherited |
◆ outputEventFormat()
Get information about the output objects.
Definition at line 236 of file EventCore.cxx.
◆ printIOStats()
| void Event::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 298 of file EventCore.cxx.
◆ printNameRemap()
| void Event::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 TEvent object.
Definition at line 201 of file EventCore.cxx.
◆ printProxyWarnings()
| void Event::printProxyWarnings |
( |
bool |
value = true | ) |
|
|
inherited |
Enable 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 anyway.
- Parameters
-
| value | The new value for the option |
Definition at line 223 of file EventCore.cxx.
◆ proxies()
|
|
overrideprotectedinherited |
return the list of all current proxies in store
Definition at line 273 of file EventIProxyDict.cxx.
277 std::vector<const SG::DataProxy*> ret;
278 for (
const auto&
p : m_branches) {
281 ret.push_back(
proxy);
◆ proxy() [1/2]
|
|
overrideprotectedinherited |
get proxy with given id and key. Returns 0 to flag failure
Definition at line 211 of file EventIProxyDict.cxx.
◆ proxy() [2/2]
|
|
overrideprotectedinherited |
get proxy for a given data object address in memory
Definition at line 183 of file EventIProxyDict.cxx.
194 static const bool QUIET =
true;
208 return bi->m_proxy.get();
◆ proxy_exact()
|
|
overrideprotectedinherited |
◆ readFrom()
| StatusCode xAOD::Experimental::REvent::readFrom |
( |
std::string_view |
fileName | ) |
|
Set up the reading of an input file.
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 90 of file REvent.cxx.
114 <<
"\" tree in input file: " <<
fileName);
115 return StatusCode::FAILURE;
117 ATH_MSG_DEBUG(
"Created RNTupleReader for \"" << METADATA_NTUPLE_NAME
123 static const std::string eventFormatTypeName =
125 if (::TClass::GetClass(eventFormatTypeName.c_str()) ==
nullptr) {
132 auto readEventFormatMetadata = [&](std::string_view tupleName) ->
StatusCode {
135 auto metaReader = ROOT::RNTupleReader::Open(tupleName,
fileName);
138 << tupleName <<
"\" ntuple in input file: " <<
fileName);
139 return StatusCode::FAILURE;
142 << tupleName <<
"\" in file: " <<
fileName);
145 const std::string eventFormatFieldName =
150 for (
const auto& [
key, element] :
ef(0
u)) {
153 }
catch (
const ROOT::RException&) {
155 return StatusCode::RECOVERABLE;
161 return StatusCode::SUCCESS;
165 const StatusCode sc = readEventFormatMetadata(METADATA_NTUPLE_NAME);
166 if (
sc.isRecoverable()) {
168 return StatusCode::SUCCESS;
175 std::set<std::string> lOtherMetaTupleNames;
177 std::unique_ptr<TFile>
inFile(TFile::Open(
fileName.data(),
"READ"));
178 TList* lKeys =
inFile->GetListOfKeys();
179 if (lKeys ==
nullptr) {
181 return StatusCode::FAILURE;
183 for (
const TObject*
obj : *lKeys) {
188 if ((
keyName != METADATA_NTUPLE_NAME) &&
189 (
keyName.find(
"MetaData") != std::string::npos) &&
190 (
keyName.find(
"MetaDataHdr") == std::string::npos)) {
192 const TKey*
key =
dynamic_cast<const TKey*
>(
obj);
193 if (
key ==
nullptr) {
196 <<
"\" is not a TKey?");
197 return StatusCode::FAILURE;
200 static constexpr
bool LOAD = kFALSE;
201 static constexpr
bool SILENT = kTRUE;
202 ::TClass*
cl = ::TClass::GetClass(
className, LOAD, SILENT);
203 if ((
cl !=
nullptr) &&
cl->InheritsFrom(ROOT::RNTuple::Class())) {
204 lOtherMetaTupleNames.insert(
keyName);
211 for (
const std::string& tupleName : lOtherMetaTupleNames) {
212 ATH_CHECK(readEventFormatMetadata(tupleName));
218 ATH_MSG_ERROR(
"Couldn't access RNTuple \"" << EVENT_NTUPLE_NAME
220 return StatusCode::FAILURE;
222 ATH_MSG_DEBUG(
"Created RNTupleReader for \"" << EVENT_NTUPLE_NAME
232 const TIncident beginIncident(IncidentType::BeginInputFile);
233 for (TVirtualIncidentListener* listener :
m_listeners) {
234 listener->handle(beginIncident);
241 const TIncident endIncident(IncidentType::EndInputFile);
242 for (TVirtualIncidentListener* listener :
m_listeners) {
243 listener->handle(endIncident);
247 return StatusCode::SUCCESS;
◆ record() [1/3]
template<typename T >
| StatusCode xAOD::Event::record |
( |
std::unique_ptr< T > |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Add an output object to the event, explicitly taking ownership of it.
◆ record() [2/3]
template<typename T >
| StatusCode xAOD::Event::record |
( |
T * |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Add an output object to the event.
◆ record() [3/3]
| StatusCode xAOD::Experimental::REvent::record |
( |
void * |
obj, |
|
|
const std::string & |
typeName, |
|
|
const std::string & |
key, |
|
|
bool |
overwrite, |
|
|
bool |
metadata, |
|
|
bool |
isOwner |
|
) |
| |
|
overrideprivatevirtual |
◆ recordAux()
Record an auxiliary store into a connected output file.
Implements xAOD::Event.
Definition at line 838 of file REvent.cxx.
840 ATH_MSG_ERROR(
"xAOD::REvent::recordAux not yet implemented");
841 return StatusCode::FAILURE;
◆ recordMeta() [1/2]
template<typename T >
| StatusCode xAOD::Event::recordMeta |
( |
std::unique_ptr< T > |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Add an object to the output file's metadata, explicitly taking ownership of it.
◆ recordMeta() [2/2]
template<typename T >
| StatusCode xAOD::Event::recordMeta |
( |
T * |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Add an object to the output file's metadata.
◆ recordObject()
|
|
overrideprotectedinherited |
Record an object in the store.
Definition at line 307 of file EventIProxyDict.cxx.
310 throw std::runtime_error(
"xAOD::Event::recordObject is not implemented");
◆ recordTypeless()
| StatusCode xAOD::Event::recordTypeless |
( |
void * |
obj, |
|
|
const std::string & |
typeName, |
|
|
const std::string & |
key, |
|
|
bool |
overwrite = false, |
|
|
bool |
metadata = true, |
|
|
bool |
isOwner = true |
|
) |
| |
|
protectedinherited |
Internal function for recording an object into the output.
◆ registerKey()
|
|
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 126 of file EventCore.cxx.
131 ATH_MSG_ERROR(
"Listener " <<
static_cast<void*
>(listener) <<
" not known");
132 return StatusCode::FAILURE;
137 return StatusCode::SUCCESS;
◆ retrieve() [1/4]
template<typename T >
| StatusCode xAOD::Event::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::Event::retrieve |
( |
T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Retrieve an output object from the event.
◆ retrieveMetaInput()
template<typename T >
| StatusCode xAOD::Event::retrieveMetaInput |
( |
const T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Retrieve an input metadata object.
◆ retrieveMetaOutput() [1/2]
template<typename T >
| StatusCode xAOD::Event::retrieveMetaOutput |
( |
const T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Retrieve an output metadata object.
◆ retrieveMetaOutput() [2/2]
template<typename T >
| StatusCode xAOD::Event::retrieveMetaOutput |
( |
T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
|
inherited |
Retrieve an output metadata object.
◆ setActive()
| void Event::setActive |
( |
| ) |
const |
|
inherited |
Set this event object as the currently active one.
Definition at line 54 of file EventCore.cxx.
59 #ifndef XAOD_STANDALONE
61 #endif // not XAOD_STANDALONE
◆ setAuxItemList()
| void Event::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 71 of file EventCore.cxx.
81 while (std::getline(
ss, attr,
'.')) {
◆ setAuxStore()
Function connecting a DV object to its auxiliary store.
Every time a DataVector is read in from the input for a new RNTuple entry, one needs to re-connect it with its auxiliary store.
This function takes care of this.
- Parameters
-
| key | The key (field name) of the object whose auxiliary store should be set up |
| mgr | The manager object of the DV container |
| metadata | Flag specifying whether we're dealing with a metadata or event data object |
- Returns
- The usual
StatusCode types
Implements xAOD::Event.
Definition at line 723 of file REvent.cxx.
729 return StatusCode::SUCCESS;
736 TVirtualManager* auxMgr =
nullptr;
746 return StatusCode::SUCCESS;
748 auxMgr = itr->second.get();
749 auxKey =
key +
"Aux:";
754 ::Int_t readBytes = auxMgr->getEntry();
758 const std::string dynAuxKey = auxKey +
"Dynamic";
759 auto dynAuxMgr =
objects.find(dynAuxKey);
760 if ((dynAuxMgr !=
objects.end()) && (readBytes || (auxMgr == &
mgr))) {
763 dynAuxMgr->second->getEntry();
768 if (auxMgr == &
mgr) {
769 return StatusCode::SUCCESS;
775 switch (
mgr.holder()->typeKind()) {
790 if (
vec && (!
vec->trackIndices())) {
791 Details::forceTrackIndices(*
vec);
795 if ((!
vec) && (!aux)) {
797 <<
mgr.holder()->getClass()->GetName()
798 <<
"\" as SG::AuxVectorBase or SG::AuxElement");
799 return StatusCode::FAILURE;
803 RObjectManager* omgr =
dynamic_cast<RObjectManager*
>(auxMgr);
806 <<
"\" is not of the right type");
807 return StatusCode::FAILURE;
812 if (
store ==
nullptr) {
814 return StatusCode::FAILURE;
824 return StatusCode::FAILURE;
828 return StatusCode::SUCCESS;
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ setUpDynamicStore()
| StatusCode xAOD::Experimental::REvent::setUpDynamicStore |
( |
RObjectManager & |
mgr, |
|
|
ROOT::RNTupleReader & |
reader |
|
) |
| |
|
private |
event uses RNTupleReader:
This function is used by connectObject(...) and connectMetaObject(...) 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 |
| reader | The RNTuple reader to read dynamic variables from |
- Returns
- The usual
StatusCode types
Definition at line 943 of file REvent.cxx.
947 const std::string
fieldName =
mgr.field().GetField().GetFieldName();
950 ::TMethodCall setNameCall;
951 setNameCall.InitWithPrototype(
mgr.holder()->getClass(),
"setName",
953 if (setNameCall.IsValid()) {
957 const char* charParams =
params.Data();
958 setNameCall.Execute(
mgr.holder()->get(), charParams);
963 <<
mgr.holder()->getClass()->GetName() <<
")");
967 static const TClass*
const holderClass =
969 if (!
mgr.holder()->getClass()->InheritsFrom(holderClass)) {
971 return StatusCode::SUCCESS;
979 return StatusCode::FAILURE;
986 static constexpr
bool TOP_STORE =
false;
987 auto store = std::make_unique<RAuxStore>(
1004 static constexpr
bool SHARED_OWNER =
false;
1006 std::make_unique<RAuxManager>(
store.get(),
m_entry, SHARED_OWNER);
1012 return StatusCode::SUCCESS;
◆ stringToKey()
|
|
overrideprotectedinherited |
◆ transientContains() [1/2]
template<typename T >
| bool xAOD::Event::transientContains |
( |
const std::string & |
key | ) |
const |
|
inherited |
Function checking if an object is already in memory.
◆ transientContains() [2/2]
| bool xAOD::Event::transientContains |
( |
const std::string & |
key, |
|
|
const std::type_info & |
ti, |
|
|
bool |
metadata |
|
) |
| const |
|
protectedinherited |
Internal function checking if an object is already in memory.
◆ transientContainsMeta()
template<typename T >
| bool xAOD::Event::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 358 of file Event.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 35 of file TVirtualEvent.h.
◆ KEY_MASK
Mask for the keys, used mostly internally.
Definition at line 37 of file TVirtualEvent.h.
◆ m_auxItemList
| std::unordered_map<std::string, std::set<std::string> > xAOD::Event::m_auxItemList |
|
protectedinherited |
Rules for selecting which auxiliary branches to write.
Definition at line 326 of file Event.h.
◆ m_branchesMutex
|
|
mutableprotectedinherited |
Mutex for multithread synchronization.
Definition at line 354 of file Event.h.
◆ m_entry
| ::Long64_t xAOD::Experimental::REvent::m_entry |
|
private |
The entry to look at from the input tree.
Definition at line 109 of file REvent.h.
◆ m_eventReader
| std::unique_ptr<ROOT::RNTupleReader> xAOD::Experimental::REvent::m_eventReader |
|
private |
The main event data reader.
Definition at line 102 of file REvent.h.
◆ m_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_inputEventFormat
Format of the current input file.
Definition at line 321 of file Event.h.
◆ m_inputMetaObjects
| Object_t xAOD::Event::m_inputMetaObjects |
|
protectedinherited |
Collection of all the managed input meta-objects.
Definition at line 316 of file Event.h.
◆ m_inputMissingObjects
| std::set<std::string> xAOD::Event::m_inputMissingObjects |
|
protectedinherited |
Objects that have been asked for, but were found to be missing in the current input.
Definition at line 311 of file Event.h.
◆ m_inputNTupleIsMissing
| bool xAOD::Experimental::REvent::m_inputNTupleIsMissing = false |
|
private |
Whether the input has an event RNTuple or not.
Definition at line 104 of file REvent.h.
◆ m_inputObjects
Collection of all the managed input objects.
Definition at line 308 of file Event.h.
◆ m_listeners
Listeners who should be notified when certain incidents happen.
Definition at line 329 of file Event.h.
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_metaReader
| std::unique_ptr<ROOT::RNTupleReader> xAOD::Experimental::REvent::m_metaReader |
|
private |
The metadata reader.
Definition at line 106 of file REvent.h.
◆ m_msg_tls
| boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nameRemapping
| std::unordered_map<std::string, std::string> xAOD::Event::m_nameRemapping |
|
protectedinherited |
Container name re-mapping rules.
Definition at line 332 of file Event.h.
◆ m_nm
| std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_outputEventFormat
| EventFormat* xAOD::Event::m_outputEventFormat = nullptr |
|
protectedinherited |
Format of the current output file.
Definition at line 323 of file Event.h.
◆ m_outputMetaObjects
| Object_t xAOD::Event::m_outputMetaObjects |
|
protectedinherited |
Collection of all the managed output meta-objects.
Definition at line 318 of file Event.h.
◆ m_outputObjects
Collection of all the managed output object.
Definition at line 313 of file Event.h.
◆ m_printEventProxyWarnings
| bool xAOD::Event::m_printEventProxyWarnings = false |
|
protectedinherited |
Option to silence common warnings that seem to be harmless.
Definition at line 335 of file Event.h.
The documentation for this class was generated from the following files:
Common base class for auxiliary info objects.
StatusCode keys(std::vector< std::string > &vkeys, bool metadata) const
Provide a list of all data object keys associated with a specific type.
std::atomic< MSG::Level > m_lvl
Current logging level.
const xAOD::EventFormatElement * getEventFormatElement(SG::sgkey_t sgkey) const
Get the metadata object for a given "SG key".
@ AUXELEMENT
A type inheriting from SG::AuxElement.
StatusCode connectObject(const std::string &key, bool silent) override
Function setting up access to a particular object.
SG::SGKeyMap< BranchInfo > m_branches ATLAS_THREAD_SAFE
Map from hashed sgkey to BranchInfo.
virtual AuxStoreType getStoreType() const =0
Return the type of the store object.
virtual StatusCode setAuxStore(const std::string &key, Details::IObjectManager &mgr, bool metadata)=0
Function connecting a DV object to its auxiliary store.
StatusCode connectMetaAux(const std::string &prefix, bool standalone) override
Function setting up access to a set of auxiliary branches for a metadata object.
std::string find(const std::string &s)
return a remapped string
ReadStats & stats()
Access the object belonging to the current thread.
const std::string & name() const override
Get the name of the instance.
StatusCode connectMetaObject(const std::string &key, bool silent) override
Function setting up access to a particular metadata object.
@ SILENT
don't print anything and return success
static void setEvent(TVirtualEvent *ptr)
Set the active event pointer.
Object_t m_inputObjects
Collection of all the managed input objects.
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...
Object_t m_outputMetaObjects
Collection of all the managed output meta-objects.
EventFormat m_inputEventFormat
Format of the current input file.
Base class for elements of a container that can have aux data.
@ DATAVECTOR
A DataVector container.
void setActive() const
Set this event object as the currently active one.
void setProxy(SG::DataProxy &proxy)
Event(std::string_view name)
Constructor with a name.
void Print(::Option_t *option="") const
Print information about the collected statistics.
EStructMode
"Structural" modes of the object
Common base class for the auxiliary containers.
static IProxyDict * setStore(IProxyDict *store)
Set the current store.
static TStore * store()
Access the currently active TStore object.
BranchStats * container(const std::string &name)
Access the description of a container. Creating it if necessary.
SG::sgkey_t stringToKey(const std::string &str, CLID clid) override
Find the string corresponding to a given key.
std::vector< size_t > vec
std::unordered_map< std::string, std::string > m_nameRemapping
Container name re-mapping rules.
bool m_inputNTupleIsMissing
Whether the input has an event RNTuple or not.
#define ATH_MSG_VERBOSE(x)
StatusCode connectAux(const std::string &prefix, bool standalone) override
Function setting up access to a set of auxiliary branches.
@ kObjectStore
The object describes a single object.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::vector< TVirtualIncidentListener * > m_listeners
Listeners who should be notified when certain incidents happen.
@ kContainerStore
The object describes an entire container.
@ u
Enums for curvilinear frames.
Manage index tracking and synchronization of auxiliary data.
IMessageSvc * getMessageSvc(bool quiet=false)
std::unordered_map< std::string, std::unique_ptr< TVirtualManager > > Object_t
Definition of the internal data structure type.
Object_t m_inputMetaObjects
Collection of all the managed input meta-objects.
void nextEvent()
Function incrementing the processed event counter.
const std::string & getName(const void *obj) const override
Function returning the key describing a known object.
size_t auxid_t
Identifier for a particular aux data item.
bool m_printEventProxyWarnings
Option to silence common warnings that seem to be harmless.
std::unordered_map< std::string, std::set< std::string > > m_auxItemList
Rules for selecting which auxiliary branches to write.
std::string getTypeName(const std::type_info &ti)
This function is necessary in order to create type names that ROOT can understand.
void setStore(const SG::IConstAuxStore *store)
Set the store associated with this object.
AthContainers_detail::lock_guard< mutex_t > guard_t
Guard type for multithreaded synchronisation.
virtual StatusCode connectMetaObject(const std::string &key, bool silent)=0
Function setting up access to a particular metadata object.
::StatusCode StatusCode
StatusCode definition for legacy code.
upgrade_mutex_t m_branchesMutex
Mutex for multithread synchronization.
void * getOutputObject(SG::sgkey_t key, const std::type_info &ti) override
Function for retrieving an output object in a non-template way.
virtual StatusCode recordAux(TVirtualManager &mgr, const std::string &key, bool metadata)=0
Record an auxiliary store into a connected output file.
bool isStandalone(const TClass &cl)
Helper function deciding if a given type "is a standalone object".
SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
Get proxy given a hashed key+clid.
void setBranchNum(::Int_t num)
Set the total number of branches on the input.
StatusCode setUpDynamicStore(RObjectManager &mgr, ROOT::RNTupleReader &ntupleReader)
event uses RNTupleReader:
static IOStats & instance()
Singleton object accessor.
const void * getInputObject(SG::sgkey_t key, const std::type_info &ti, bool silent) override
Function for retrieving an input object in a non-template way.
virtual bool hasInput() const =0
Check if an input file is connected to the object.
@ OVERWRITE
create the directory as is, removing existing directories if needed
StatusCode record(T *obj, const std::string &key)
Add an output object to the event.
virtual void setStore(IAuxStore *store)=0
Give an auxiliary store object to the holder object.
std::set< std::string > m_inputMissingObjects
Objects that have been asked for, but were found to be missing in the current input.
Object_t m_outputObjects
Collection of all the managed output object.
AthContainers_detail::upgrading_lock< upgrade_mutex_t > upgrading_lock_t
Lock type for multithread synchronization.
std::unordered_set< sgkey_t > SGKeySet
A set of sgkey_t values.
virtual StatusCode connectObject(const std::string &key, bool silent)=0
Function setting up access to a particular object.
void readContainer(const std::string &name)
Function incrementing the read counter on a specific container.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
bool contains(const std::string &key)
Function checking if an object is available from the store.
::Long64_t m_entry
The entry to look at from the input tree.
EventFormat * m_outputEventFormat
Format of the current output file.
def silent(func)
Redirect stdout/err to /dev/null Useful wrapper to get rid of ROOT verbosity...
#define ATH_MSG_WARNING(x)
AthContainers_detail::mutex mutex_t
Mutex type for multithread synchronization.
std::string m_nm
Message source name.
EventFormat_v1 EventFormat
Definition of the current event format version.
const boost::regex re(r_e)
void setSGKey(sgkey_t sgkey)
check if it is a transient ID (primary or symLinked):
std::unique_ptr< ROOT::RNTupleReader > m_metaReader
The metadata reader.
SG::DataProxy * proxy(const void *const pTransient) const override
get proxy for a given data object address in memory
SG::sgkey_t getHash(const std::string &key) const override
Function returning the hash describing an object name.
bool hasAuxStore(const TClass &cl)
Helper function deciding if a given type "has an auxiliary store".
StatusCode initStats()
Function to initialise the statistics for all Tree content.
const BranchInfo * getBranchInfo(SG::sgkey_t sgkey) const
Get the object describing one object/branch.
reader
read the goodrunslist xml file(s)
Class describing the access statistics of a collection of branches.
Interface for const operations on an auxiliary store.
@ AST_ObjectStore
The store describes a single object.
Interface for objects taking part in direct ROOT I/O.
std::unique_ptr< ROOT::RNTupleReader > m_eventReader
The main event data reader.
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()) ]
bool transientContains(const std::string &key) const
Function checking if an object is already in memory.
@ AST_ContainerStore
The store describes a container.
bool isAuxStore(const TClass &cl)
Helper function deciding if a given type "is an auxiliary store".