13#ifndef XAOD_STANDALONE
30 [[maybe_unused]]
const EventContext* ctx )
39#ifndef XAOD_STANDALONE
57#ifndef XAOD_STANDALONE
59 SG::CurrentEventStore::setStore(
nullptr);
70#ifndef XAOD_STANDALONE
71 SG::CurrentEventStore::setStore(nc_this);
84 const std::string& itemList) {
87 std::set<std::string> attributes;
90 if (itemList.size()) {
91 std::istringstream
ss(itemList);
93 while (std::getline(
ss, attr,
'.')) {
94 attributes.insert(attr);
112 if (listener ==
nullptr) {
114 return StatusCode::FAILURE;
121 <<
" is already registered");
122 return StatusCode::SUCCESS;
129 return StatusCode::SUCCESS;
143 ATH_MSG_ERROR(
"Listener " <<
static_cast<void*
>(listener) <<
" not known");
144 return StatusCode::FAILURE;
149 return StatusCode::SUCCESS;
175 const std::string& newName) {
180 ATH_MSG_ERROR(
"Can't use \"" << newName <<
"\" as the target name in the \""
181 << onfile <<
"\" -> \"" << newName
183 return StatusCode::FAILURE;
190 << itr->second <<
"\" -> \"" << itr->first <<
"\" with: \""
191 << onfile <<
"\" -> \"" << newName <<
"\"");
198 return StatusCode::SUCCESS;
226 ATH_MSG_INFO(
" \"" << newName <<
"\" -> \"" << onfile <<
"\"");
265 std::ostringstream ost;
266 ost <<
"<<<<<<<<<<<<<<<<<<<< xAOD::TEvent Dump >>>>>>>>>>>>>>>>>>>>\n";
272 ::TClass* cl = ::TClass::GetClass(element.className().c_str());
273 const std::type_info* ti = (cl ? cl->GetTypeInfo() :
nullptr);
274 if ((cl ==
nullptr) || (cl->IsLoaded() ==
false) || (ti ==
nullptr)) {
276 <<
") found in the event format");
281 static const bool METADATA =
false;
282 if (!
contains(element.branchName(), *ti, METADATA)) {
287 ost <<
" Hash: 0x" << std::setw(8) << std::setfill(
'0') << std::hex
288 << element.hash() <<
" Key: \"" << element.branchName() <<
"\"\n";
290 ost <<
" type: " << element.className() <<
"\n";
291 const bool isNonConst =
293 ost <<
" isConst: " << (isNonConst ?
"No" :
"Yes") <<
"\n";
294 static const bool SILENT =
false;
303 ost <<
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";
317#ifdef XAOD_STANDALONE
318 return Gaudi::Hive::currentContext();
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_INFO(x,...)
Hold a pointer to the current event store.
AsgMessaging(const std::string &name)
Constructor with a name.
StatusCode removeListener(TVirtualIncidentListener *listener)
Remove an incident listener object.
virtual bool hasInput() const =0
Check if an input file is connected to the object.
StatusCode addListener(TVirtualIncidentListener *listener)
Register an incident listener object.
EventFormat m_inputEventFormat
Format of the current input file.
const std::string & name() const override
Get the name of the instance.
bool transientContains(const std::string &key) const
Function checking if an object is already in memory.
const EventFormat * outputEventFormat() const
Get information about the output objects.
EventContext m_ctx
The event context associated with this event.
void clearListeners()
Remove all listeners from the object.
void clearNameRemap()
Clear the current name re-mapping.
const EventFormat * inputEventFormat() const
Get information about the input objects.
bool contains(const std::string &key)
Function checking if an object is available from the store.
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.
StatusCode addNameRemap(const std::string &onfile, const std::string &newName)
Add a name re-mapping rule.
Event(std::string_view name, const EventContext *ctx=nullptr)
Constructor with a name.
void setAuxItemList(const std::string &containerKey, const std::string &itemList)
Configure which dynamic variables to write out for a given store.
virtual ~Event()
Virtual destructor.
std::string dump()
Function creating a user-readable dump of the current input.
void printProxyWarnings(bool value=true)
Enable warnings associated with broken element links.
bool m_printEventProxyWarnings
Option to silence common warnings that seem to be harmless.
void * getOutputObject(SG::sgkey_t key, const std::type_info &ti) override
Function for retrieving an output object in a non-template way.
void printNameRemap() const
Print the current name re-mapping rules.
void setActive() const
Set this event object as the currently active one.
std::unordered_map< std::string, std::string > m_nameRemapping
Container name re-mapping rules.
std::unordered_map< std::string, std::set< std::string > > m_auxItemList
Rules for selecting which auxiliary branches to write.
EventFormat * m_outputEventFormat
Format of the current output file.
SG::SGKeyMap< BranchInfo > m_branches ATLAS_THREAD_SAFE
Map from hashed sgkey to BranchInfo.
void printIOStats() const
Function printing the I/O statistics of the current process.
const EventContext & currentContext() const
Return the event context corresponding to this event.
std::vector< TVirtualIncidentListener * > m_listeners
Listeners who should be notified when certain incidents happen.
ReadStats & stats()
Access the object belonging to the current thread.
static IOStats & instance()
Singleton object accessor.
static PerfStats & instance()
Function accessing the singleton instance.
void Print(::Option_t *option="") const
Print information about the collected statistics.
static void setEvent(TVirtualEvent *ptr)
Set the active event pointer.
static TVirtualEvent * event()
Access the currently active TVirtualEvent object.
Base interface for getting objects out of the input file.
Class providing an interface for classes listening to xAOD incidents.
void setProxyDictInEventContext(IProxyDict *sg)
Update the IProxyDict in the current EventContext.
IProxyDict * proxyDictFromEventContext()
Return the IProxyDict for this thread's current context.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
EventFormat_v1 EventFormat
Definition of the current event format version.
Some out-of-line helpers for ExtendedEventContext.