27 efe = ((ef !=
nullptr) ? ef->get(key) :
nullptr);
36 ::TClass* cl = TClass::GetClass(efe->
className().c_str());
41 const std::type_info* ti = cl->GetTypeInfo();
48 static constexpr bool SILENT =
true;
49 static constexpr bool METADATA =
false;
51 const_cast<void*
>(this->
getInputObject(key, *ti, SILENT, METADATA));
61 return TPython::CPPInstance_FromVoidPtr(obj, efe->
className().c_str());
67 ::TClass* cl = ::TClass::GetClass(
type.c_str());
69 ::Warning(
"xAOD::TPyEvent::pyContains",
"Type name \"%s\" not known",
75 const std::type_info* ti = cl->GetTypeInfo();
77 ::Warning(
"xAOD::TPyEvent::pyContains",
78 "Type \"%s\" doesn't have a proper dictionary",
type.c_str());
83 static constexpr bool METADATA =
false;
88 const std::string&
type)
const {
91 ::TClass* cl = ::TClass::GetClass(
type.c_str());
93 ::Warning(
"xAOD::TPyEvent::pyTransientContains",
94 "Type name \"%s\" not known",
type.c_str());
99 const std::type_info* ti = cl->GetTypeInfo();
101 ::Warning(
"xAOD::TPyEvent::pyTransientContains",
102 "Type \"%s\" doesn't have a proper dictionary",
type.c_str());
124 const std::string&
type) {
127 static constexpr bool OVERWRITE =
false;
128 static constexpr bool METADATA =
false;
129 static constexpr bool IS_OWNER =
false;
131 record(obj,
type, key, OVERWRITE, METADATA, IS_OWNER));
133 return StatusCode::SUCCESS;
#define RETURN_CHECK(CONTEXT, EXP)
Helper macro for checking return codes in a compact form in the code.
Define macros for attributes used to control the static checker.
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.
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.
void * getOutputObject(SG::sgkey_t key, const std::type_info &ti) override
Function for retrieving an output object in a non-template way.
SG::SGKeyMap< BranchInfo > m_branches ATLAS_THREAD_SAFE
Map from hashed sgkey to BranchInfo.
EAuxMode
Auxiliary store "mode".
TEvent(EAuxMode mode=kClassAccess)
Default constructor.
StatusCode record(void *obj, const std::string &typeName, const std::string &key, bool overwrite, bool metadata, bool isOwner) override
Record an object into a connected output file.
bool pyContains(const std::string &key, const std::string &type)
Function checking if an object is available from the store.
StatusCode pyRecord(void *obj, const std::string &key, const std::string &type)
Add an output object to the event.
bool pyTransientContains(const std::string &key, const std::string &type) const
Function checking if an object is already in memory.
PyObject * pyRetrieve(const std::string &key)
Return the object with a given key as a PyObject.
TPyEvent(EAuxMode mode=kClassAccess)
Constructor with an access mode.
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.