13#ifndef XAOD_STANDALONE
40#ifndef XAOD_STANDALONE
54#ifndef XAOD_STANDALONE
55 if (SG::CurrentEventStore::store() ==
this) {
56 SG::CurrentEventStore::setStore(
nullptr);
66#ifndef XAOD_STANDALONE
67 SG::CurrentEventStore::setStore(nc_this);
79 const std::string& itemList) {
82 std::set<std::string> attributes;
85 if (itemList.size()) {
86 std::istringstream
ss(itemList);
88 while (std::getline(
ss, attr,
'.')) {
89 attributes.insert(attr);
107 if (listener ==
nullptr) {
109 return StatusCode::FAILURE;
116 <<
" is already registered");
117 return StatusCode::SUCCESS;
124 return StatusCode::SUCCESS;
138 ATH_MSG_ERROR(
"Listener " <<
static_cast<void*
>(listener) <<
" not known");
139 return StatusCode::FAILURE;
144 return StatusCode::SUCCESS;
170 const std::string& newName) {
175 ATH_MSG_ERROR(
"Can't use \"" << newName <<
"\" as the target name in the \""
176 << onfile <<
"\" -> \"" << newName
178 return StatusCode::FAILURE;
185 << itr->second <<
"\" -> \"" << itr->first <<
"\" with: \""
186 << onfile <<
"\" -> \"" << newName <<
"\"");
193 return StatusCode::SUCCESS;
221 ATH_MSG_INFO(
" \"" << newName <<
"\" -> \"" << onfile <<
"\"");
260 std::ostringstream ost;
261 ost <<
"<<<<<<<<<<<<<<<<<<<< xAOD::TEvent Dump >>>>>>>>>>>>>>>>>>>>\n";
267 ::TClass* cl = ::TClass::GetClass(element.className().c_str());
268 const std::type_info* ti = (cl ? cl->GetTypeInfo() :
nullptr);
269 if ((cl ==
nullptr) || (cl->IsLoaded() ==
false) || (ti ==
nullptr)) {
271 <<
") found in the event format");
276 static const bool METADATA =
false;
277 if (!
contains(element.branchName(), *ti, METADATA)) {
282 ost <<
" Hash: 0x" << std::setw(8) << std::setfill(
'0') << std::hex
283 << element.hash() <<
" Key: \"" << element.branchName() <<
"\"\n";
285 ost <<
" type: " << element.className() <<
"\n";
286 const bool isNonConst =
288 ost <<
" isConst: " << (isNonConst ?
"No" :
"Yes") <<
"\n";
289 static const bool SILENT =
false;
298 ost <<
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";
312#ifdef XAOD_STANDALONE
313 return Gaudi::Hive::currentContext();
#define ATH_MSG_WARNING(x)
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.
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.
Event(std::string_view name)
Constructor with a name.
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.
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.