 |
ATLAS Offline Software
|
Base class for the event (xAOD::TEvent and xAOD::REvent) classes.
More...
#include <Event.h>
|
| 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...
|
| |
| 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...
|
| |
| 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...
|
| |
|
| virtual bool | hasInput () const =0 |
| | Check if an input file is connected to the object. More...
|
| |
| virtual bool | hasOutput () const =0 |
| | Check if an output file is connected to the object. More...
|
| |
| virtual StatusCode | getNames (const std::string &targetClassName, std::vector< std::string > &vkeys, bool metadata=false) const =0 |
| | Function determining the list keys associated with a type name. More...
|
| |
| virtual StatusCode | connectObject (const std::string &key, bool silent)=0 |
| | Function setting up access to a particular object. More...
|
| |
| virtual StatusCode | connectMetaObject (const std::string &key, bool silent)=0 |
| | Function setting up access to a particular metadata object. More...
|
| |
| virtual StatusCode | connectAux (const std::string &prefix, bool standalone)=0 |
| | Function setting up access to a set of auxiliary branches. More...
|
| |
| virtual StatusCode | connectMetaAux (const std::string &prefix, bool standalone)=0 |
| | Function setting up access to a set of auxiliary branches for a metadata object. More...
|
| |
| virtual StatusCode | setAuxStore (const std::string &key, Details::IObjectManager &mgr, bool metadata)=0 |
| | Function connecting a DV object to its auxiliary store. More...
|
| |
| virtual StatusCode | record (void *obj, const std::string &typeName, const std::string &key, bool overwrite, bool metadata, bool isOwner)=0 |
| | Record an object into a connected output file. More...
|
| |
| virtual StatusCode | recordAux (TVirtualManager &mgr, const std::string &key, bool metadata)=0 |
| | Record an auxiliary store into a connected output file. More...
|
| |
|
| std::string | m_nm |
| | Message source name. More...
|
| |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| | MsgStream instance (a std::cout like with print-out levels) More...
|
| |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| | MessageSvc pointer. More...
|
| |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| | Current logging level. More...
|
| |
Base class for the event (xAOD::TEvent and xAOD::REvent) classes.
It implements all the common functionality used by the different storage technologies. Leaving just the technology specific parts to the derived classes.
Definition at line 57 of file Event.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.
◆ Event()
| Event::Event |
( |
std::string_view |
name | ) |
|
Constructor with a name.
- Parameters
-
| name | Name to use in printed messages |
Definition at line 27 of file EventCore.cxx.
◆ ~Event()
Virtual destructor.
Definition at line 39 of file EventCore.cxx.
47 #ifndef XAOD_STANDALONE
51 #endif // not XAOD_STANDALONE
◆ 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;
106 if (
m_listeners.insert(listener).second ==
false) {
108 <<
" was added previously already");
112 return StatusCode::SUCCESS;
◆ addNameRemap()
| StatusCode Event::addNameRemap |
( |
const std::string & |
onfile, |
|
|
const std::string & |
newName |
|
) |
| |
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 155 of file EventCore.cxx.
162 << onfile <<
"\" -> \"" <<
newName
164 return StatusCode::FAILURE;
171 << itr->second <<
"\" -> \"" << itr->first <<
"\" with: \""
172 << onfile <<
"\" -> \"" <<
newName <<
"\"");
179 return StatusCode::SUCCESS;
◆ addToStore()
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 |
( |
| ) |
|
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 136 of file EventCore.cxx.
◆ clearNameRemap()
| void Event::clearNameRemap |
( |
| ) |
|
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 186 of file EventCore.cxx.
◆ connectAux()
| virtual StatusCode xAOD::Event::connectAux |
( |
const std::string & |
prefix, |
|
|
bool |
standalone |
|
) |
| |
|
protectedpure virtual |
◆ connectMetaAux()
| virtual StatusCode xAOD::Event::connectMetaAux |
( |
const std::string & |
prefix, |
|
|
bool |
standalone |
|
) |
| |
|
protectedpure virtual |
◆ connectMetaObject()
| virtual StatusCode xAOD::Event::connectMetaObject |
( |
const std::string & |
key, |
|
|
bool |
silent |
|
) |
| |
|
protectedpure virtual |
◆ connectObject()
| virtual StatusCode xAOD::Event::connectObject |
( |
const std::string & |
key, |
|
|
bool |
silent |
|
) |
| |
|
protectedpure virtual |
◆ contains() [1/2]
template<typename T >
| bool xAOD::Event::contains |
( |
const std::string & |
key | ) |
|
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 |
|
) |
| |
|
protected |
Internal function checking if an object is in the input.
◆ containsMeta()
template<typename T >
| bool xAOD::Event::containsMeta |
( |
const std::string & |
key | ) |
|
Function checking if a meta-object is available from the store.
◆ copy()
| StatusCode Event::copy |
( |
const std::string & |
pattern = ".*" | ) |
|
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 |
( |
| ) |
|
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 243 of file EventCore.cxx.
246 std::ostringstream
ost;
247 ost <<
"<<<<<<<<<<<<<<<<<<<< xAOD::TEvent Dump >>>>>>>>>>>>>>>>>>>>\n";
253 ::TClass*
cl = ::TClass::GetClass(element.className().c_str());
254 const std::type_info* ti = (
cl ?
cl->GetTypeInfo() :
nullptr);
255 if ((
cl ==
nullptr) || (
cl->IsLoaded() ==
false) || (ti ==
nullptr)) {
257 <<
") found in the event format");
262 static const bool METADATA =
false;
263 if (!
contains(element.branchName(), *ti, METADATA)) {
268 ost <<
" Hash: 0x" << std::setw(8) << std::setfill(
'0') << std::hex
269 << element.hash() <<
" Key: \"" << element.branchName() <<
"\"\n";
271 ost <<
" type: " << element.className() <<
"\n";
272 const bool isNonConst =
274 ost <<
" isConst: " << (isNonConst ?
"No" :
"Yes") <<
"\n";
275 static const bool SILENT =
false;
284 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);
◆ 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 |
|
) |
| |
|
protected |
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]
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 |
|
overridevirtual |
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()
| virtual StatusCode xAOD::Event::getNames |
( |
const std::string & |
targetClassName, |
|
|
std::vector< std::string > & |
vkeys, |
|
|
bool |
metadata = false |
|
) |
| const |
|
protectedpure virtual |
◆ getOutputObject() [1/2]
| void * Event::getOutputObject |
( |
const std::string & |
key, |
|
|
const std::type_info & |
ti, |
|
|
bool |
metadata |
|
) |
| const |
|
protected |
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]
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()
| virtual bool xAOD::Event::hasInput |
( |
| ) |
const |
|
protectedpure virtual |
◆ hasOutput()
| virtual bool xAOD::Event::hasOutput |
( |
| ) |
const |
|
protectedpure virtual |
◆ 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.
◆ inputEventFormat()
Get information about the input objects.
Definition at line 221 of file EventCore.cxx.
◆ keys()
template<typename T >
| StatusCode xAOD::Event::keys |
( |
std::vector< std::string > & |
vkeys, |
|
|
bool |
metadata |
|
) |
| const |
Provide a list of all data object keys associated with a specific type.
◆ keyToString() [1/2]
◆ keyToString() [2/2]
◆ metaKeys()
template<typename T >
| StatusCode xAOD::Event::metaKeys |
( |
std::vector< std::string > & |
vkeys | ) |
const |
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 |
|
overrideprotected |
◆ outputEventFormat()
Get information about the output objects.
Definition at line 229 of file EventCore.cxx.
◆ printIOStats()
| void Event::printIOStats |
( |
| ) |
const |
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 291 of file EventCore.cxx.
◆ printNameRemap()
| void Event::printNameRemap |
( |
| ) |
const |
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 194 of file EventCore.cxx.
◆ printProxyWarnings()
| void Event::printProxyWarnings |
( |
bool |
value = true | ) |
|
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 216 of file EventCore.cxx.
◆ proxies()
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]
get proxy with given id and key. Returns 0 to flag failure
Definition at line 211 of file EventIProxyDict.cxx.
◆ proxy() [2/2]
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()
◆ record() [1/3]
template<typename T >
| StatusCode xAOD::Event::record |
( |
std::unique_ptr< T > |
obj, |
|
|
const std::string & |
key |
|
) |
| |
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 |
|
) |
| |
Add an output object to the event.
◆ record() [3/3]
| virtual StatusCode xAOD::Event::record |
( |
void * |
obj, |
|
|
const std::string & |
typeName, |
|
|
const std::string & |
key, |
|
|
bool |
overwrite, |
|
|
bool |
metadata, |
|
|
bool |
isOwner |
|
) |
| |
|
protectedpure virtual |
◆ recordAux()
◆ recordMeta() [1/2]
template<typename T >
| StatusCode xAOD::Event::recordMeta |
( |
std::unique_ptr< T > |
obj, |
|
|
const std::string & |
key |
|
) |
| |
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 |
|
) |
| |
Add an object to the output file's metadata.
◆ recordObject()
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 |
|
) |
| |
|
protected |
Internal function for recording an object into the output.
◆ registerKey()
◆ 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 121 of file EventCore.cxx.
125 ATH_MSG_ERROR(
"Listener " <<
static_cast<void*
>(listener) <<
" not known");
126 return StatusCode::FAILURE;
130 return StatusCode::SUCCESS;
◆ retrieve() [1/4]
template<typename T >
| StatusCode xAOD::Event::retrieve |
( |
const T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
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 |
|
) |
| |
Retrieve an output object from the event.
◆ retrieveMetaInput()
template<typename T >
| StatusCode xAOD::Event::retrieveMetaInput |
( |
const T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
Retrieve an input metadata object.
◆ retrieveMetaOutput() [1/2]
template<typename T >
| StatusCode xAOD::Event::retrieveMetaOutput |
( |
const T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
Retrieve an output metadata object.
◆ retrieveMetaOutput() [2/2]
template<typename T >
| StatusCode xAOD::Event::retrieveMetaOutput |
( |
T *& |
obj, |
|
|
const std::string & |
key |
|
) |
| |
Retrieve an output metadata object.
◆ setActive()
| void Event::setActive |
( |
| ) |
const |
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 |
|
) |
| |
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()
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ stringToKey()
◆ transientContains() [1/2]
template<typename T >
| bool xAOD::Event::transientContains |
( |
const std::string & |
key | ) |
const |
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 |
|
protected |
Internal function checking if an object is already in memory.
◆ transientContainsMeta()
template<typename T >
| bool xAOD::Event::transientContainsMeta |
( |
const std::string & |
key | ) |
const |
Function checking if a meta-object is already in memory.
◆ xAODPrivate::HolderBucket
◆ xAODPrivate::Loader
◆ ATLAS_THREAD_SAFE
◆ 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 |
|
protected |
Rules for selecting which auxiliary branches to write.
Definition at line 326 of file Event.h.
◆ m_branchesMutex
Mutex for multithread synchronization.
Definition at line 354 of file Event.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 |
|
protected |
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 |
|
protected |
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_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_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 |
|
protected |
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 |
|
protected |
Format of the current output file.
Definition at line 323 of file Event.h.
◆ m_outputMetaObjects
| Object_t xAOD::Event::m_outputMetaObjects |
|
protected |
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 |
|
protected |
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:
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".
SG::SGKeyMap< BranchInfo > m_branches ATLAS_THREAD_SAFE
Map from hashed sgkey to BranchInfo.
virtual StatusCode setAuxStore(const std::string &key, Details::IObjectManager &mgr, bool metadata)=0
Function connecting a DV object to its auxiliary store.
ReadStats & stats()
Access the object belonging to the current thread.
const std::string & name() const override
Get the name of the instance.
@ 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.
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.
static IProxyDict * setStore(IProxyDict *store)
Set the current store.
static TStore * store()
Access the currently active TStore object.
static IProxyDict * store()
Fetch the current store.
SG::sgkey_t stringToKey(const std::string &str, CLID clid) override
Find the string corresponding to a given key.
std::unordered_map< std::string, std::string > m_nameRemapping
Container name re-mapping rules.
#define ATH_MSG_VERBOSE(x)
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
@ u
Enums for curvilinear frames.
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.
const std::string & getName(const void *obj) const override
Function returning the key describing a known object.
static TVirtualEvent * event()
Access the currently active TVirtualEvent object.
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.
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.
SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
Get proxy given a hashed key+clid.
static IOStats & instance()
Singleton object accessor.
implements< IProxyDict > IProxyDictBase
IProxyDict base class to use in a specific build environment
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.
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.
Class mimicking the AthMessaging class from the offline software.
virtual StatusCode connectObject(const std::string &key, bool silent)=0
Function setting up access to a particular object.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
static PerfStats & instance()
Function accessing the singleton instance.
std::set< TVirtualIncidentListener * > m_listeners
Listeners who should be notified when certain incidents happen.
bool contains(const std::string &key)
Function checking if an object is available from the store.
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.
const boost::regex re(r_e)
void setSGKey(sgkey_t sgkey)
check if it is a transient ID (primary or symLinked):
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.
const BranchInfo * getBranchInfo(SG::sgkey_t sgkey) const
Get the object describing one object/branch.
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.