12#ifndef XAOD_STANDALONE
47#ifndef XAOD_STANDALONE
59#ifndef XAOD_STANDALONE
72 const std::string& itemList) {
75 std::set<std::string> attributes;
78 if (itemList.size()) {
79 std::istringstream
ss(itemList);
81 while (std::getline(
ss, attr,
'.')) {
82 attributes.insert(attr);
100 if (listener ==
nullptr) {
102 return StatusCode::FAILURE;
109 <<
" is already registered");
110 return StatusCode::SUCCESS;
117 return StatusCode::SUCCESS;
131 ATH_MSG_ERROR(
"Listener " <<
static_cast<void*
>(listener) <<
" not known");
132 return StatusCode::FAILURE;
137 return StatusCode::SUCCESS;
163 const std::string& newName) {
168 ATH_MSG_ERROR(
"Can't use \"" << newName <<
"\" as the target name in the \""
169 << onfile <<
"\" -> \"" << newName
171 return StatusCode::FAILURE;
178 << itr->second <<
"\" -> \"" << itr->first <<
"\" with: \""
179 << onfile <<
"\" -> \"" << newName <<
"\"");
186 return StatusCode::SUCCESS;
214 ATH_MSG_INFO(
" \"" << newName <<
"\" -> \"" << onfile <<
"\"");
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 <<
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";
#define ATH_MSG_WARNING(x)
static IProxyDict * store()
Fetch the current store.
static IProxyDict * setStore(IProxyDict *store)
Set the current 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.
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.
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.