 |
ATLAS Offline Software
|
Go to the documentation of this file.
2 #ifndef XAODROOTACCESS_EVENT_H
3 #define XAODROOTACCESS_EVENT_H
21 #include <unordered_map>
36 #ifdef XAOD_STANDALONE
39 implements<IProxyDict>;
121 template <
typename T>
124 template <
typename T>
128 template <
typename T>
132 template <
typename T>
135 template <
typename T>
139 template <
typename T>
142 template <
typename T>
154 template <
typename T>
157 template <
typename T>
161 template <
typename T>
165 template <
typename T>
169 template <
typename T>
172 template <
typename T>
176 template <
typename T>
180 template <
typename T>
193 const std::string&
getName(
const void*
obj)
const override;
222 std::vector<const SG::DataProxy*>
proxies()
const override;
238 const std::string&
key,
bool allowMods,
239 bool returnExisting)
override;
242 const std::string&
name()
const override;
248 const std::string&
key,
bool overwrite =
false,
249 bool metadata =
true,
bool isOwner =
true);
261 std::vector<std::string>& vkeys,
282 const std::string&
key,
bool overwrite,
305 std::unordered_map<std::string, std::unique_ptr<TVirtualManager>>;
381 #endif // XAODROOTACCESS_EVENT_H
StatusCode keys(std::vector< std::string > &vkeys, bool metadata) const
Provide a list of all data object keys associated with a specific type.
Base interface for getting objects out of the input file.
const xAOD::EventFormatElement * getEventFormatElement(SG::sgkey_t sgkey) const
Get the metadata object for a given "SG key".
StatusCode retrieveMetaOutput(T *&obj, const std::string &key)
Retrieve an output metadata object.
void clearListeners()
Remove all listeners from the object.
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.
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.
const std::string & name() const override
Get the name of the instance.
bool transientContains(const std::string &key, const std::type_info &ti, bool metadata) const
Internal function checking if an object is already in memory.
const ::TClass * m_class
Dictionary describing this branch/object.
Object_t m_inputObjects
Collection of all the managed input objects.
Object_t m_outputMetaObjects
Collection of all the managed output meta-objects.
EventFormat m_inputEventFormat
Format of the current input file.
SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override
Record an object in the store.
void setActive() const
Set this event object as the currently active one.
Event(std::string_view name)
Constructor with a name.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
const std::string * keyToString(SG::sgkey_t key) const override
Find the string corresponding to a given key.
Class providing an interface for classes listening to xAOD incidents.
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.
Interface class for the "manager classes".
bool contains(const std::string &key, const std::type_info &ti, bool metadata)
Internal function checking if an object is in the input.
StatusCode removeListener(TVirtualIncidentListener *listener)
Remove an incident listener object.
StatusCode copy(const std::string &pattern=".*")
Copy an object directly from the input to the output.
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.
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.
const std::string & getName(const void *obj) const override
Function returning the key describing a known object.
virtual bool hasOutput() const =0
Check if an output file is connected to the object.
bool m_printEventProxyWarnings
Option to silence common warnings that seem to be harmless.
StatusCode metaKeys(std::vector< std::string > &vkeys) const
Provide a list of all metadata object keys associated with a specific type.
StatusCode addToStore(CLID id, SG::DataProxy *proxy) override
Add a new proxy to the store.
std::unordered_map< std::string, std::set< std::string > > m_auxItemList
Rules for selecting which auxiliary branches to write.
const EventFormat * inputEventFormat() const
Get information about the input objects.
std::vector< const SG::DataProxy * > proxies() const override
return the list of all current proxies in store
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.
std::unique_ptr< SG::DataProxy > m_proxy
Data proxy describing this branch/object.
StatusCode retrieveMetaOutput(const T *&obj, const std::string &key)
Retrieve an output metadata object.
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.
void printIOStats() const
Function printing the I/O statistics of the current process.
bool transientContainsMeta(const std::string &key) const
Function checking if a meta-object is already in memory.
SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
Get proxy given a hashed key+clid.
void printProxyWarnings(bool value=true)
Enable warnings associated with broken element links.
StatusCode addNameRemap(const std::string &onfile, const std::string &newName)
Add a name re-mapping rule.
Helper struct used by the IProxyDict code.
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.
uint32_t CLID
The Class ID type.
virtual bool hasInput() const =0
Check if an input file is connected to the object.
StatusCode record(T *obj, const std::string &key)
Add an output object to the event.
Helper object for holding something through a THolder.
void clearNameRemap()
Clear the current name re-mapping.
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.
virtual StatusCode connectAux(const std::string &prefix, bool standalone)=0
Function setting up access to a set of auxiliary branches.
void printNameRemap() const
Print the current name re-mapping rules.
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.
StatusCode record(std::unique_ptr< T > obj, const std::string &key)
Add an output object to the event, explicitly taking ownership of it.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
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.
StatusCode recordMeta(T *obj, const std::string &key)
Add an object to the output file's metadata.
virtual ~Event()
Virtual destructor.
StatusCode addListener(TVirtualIncidentListener *listener)
Register an incident listener object.
SG::sgkey_t getKey(const void *obj) const override
Function returning the hash describing a known object.
EventFormat * m_outputEventFormat
Format of the current output file.
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.
bool containsMeta(const std::string &key)
Function checking if a meta-object is available from the store.
def silent(func)
Redirect stdout/err to /dev/null Useful wrapper to get rid of ROOT verbosity...
AthContainers_detail::upgrade_mutex upgrade_mutex_t
Mutex type for multithread synchronization.
std::unordered_map< sgkey_t, T > SGKeyMap
A map using sgkey_t as a key.
std::string dump()
Function creating a user-readable dump of the current input.
StatusCode retrieveMetaInput(const T *&obj, const std::string &key)
Retrieve an input metadata object.
void setAuxItemList(const std::string &containerKey, const std::string &itemList)
Configure which dynamic variables to write out for a given store.
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.
Lock object for taking out upgradable locks.
const BranchInfo * getBranchInfo(SG::sgkey_t sgkey) const
Get the object describing one object/branch.
Smart pointer to manage DataObject reference counts.
StatusCode retrieve(T *&obj, const std::string &key)
Retrieve an output object from the event.
Manager for EDM objects created by ROOT.
Base class for the event (xAOD::TEvent and xAOD::REvent) classes.
StatusCode retrieve(const T *&obj, const std::string &key)
Retrieve either an input or an output object from the event.
Define macros for attributes used to control the static checker.
StatusCode recordMeta(std::unique_ptr< T > obj, const std::string &key)
Add an object to the output file's metadata, explicitly taking ownership of it.
const EventFormat * outputEventFormat() const
Get information about the output objects.
bool transientContains(const std::string &key) const
Function checking if an object is already in memory.
void registerKey(SG::sgkey_t key, const std::string &str, CLID clid) override
Remember an additional mapping from key to string/CLID.
virtual StatusCode connectMetaAux(const std::string &prefix, bool standalone)=0
Function setting up access to a set of auxiliary branches for a metadata object.