ATLAS Offline Software
TPyEvent.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 //
3 // Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4 //
5 #ifndef XAODROOTACCESS_TPYEVENT_H
6 #define XAODROOTACCESS_TPYEVENT_H
7 
8 // Local include(s).
10 
11 // Python include(s).
12 #include <Python.h>
13 
14 // System include(s).
15 #include <string>
16 
17 namespace xAOD {
18 
29 class TPyEvent : public TEvent {
30 
31  public:
38 
40  PyObject* pyRetrieve(const std::string& key);
41 
43  bool pyContains(const std::string& key, const std::string& type);
45  bool pyTransientContains(const std::string& key,
46  const std::string& type) const;
47 
49  StatusCode pyRecord(void* obj, const std::string& key,
50  const std::string& type);
51 
52 }; // class TPyEvent
53 
54 } // namespace xAOD
55 
56 #endif // XAODROOTACCESS_TPYEVENT_H
xAOD::TPyEvent::pyRetrieve
PyObject * pyRetrieve(const std::string &key)
Return the object with a given key as a PyObject.
Definition: TPyEvent.cxx:20
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TEvent::kClassAccess
@ kClassAccess
Access auxiliary data using the aux containers.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:71
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TEvent.h
xAOD::TPyEvent::pyRecord
StatusCode pyRecord(void *obj, const std::string &key, const std::string &type)
Add an output object to the event.
Definition: TPyEvent.cxx:123
Preparation.mode
mode
Definition: Preparation.py:107
xAOD::TPyEvent::TPyEvent
TPyEvent(EAuxMode mode=kClassAccess)
Constructor with an access mode.
Definition: TPyEvent.cxx:18
xAOD::TPyEvent::pyTransientContains
bool pyTransientContains(const std::string &key, const std::string &type) const
Function checking if an object is already in memory.
Definition: TPyEvent.cxx:87
xAOD::TEvent::EAuxMode
EAuxMode
Auxiliary store "mode".
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:69
xAOD::TPyEvent
Python interface to xAOD::TEvent.
Definition: TPyEvent.h:29
xAOD::TPyEvent::pyContains
bool pyContains(const std::string &key, const std::string &type)
Function checking if an object is available from the store.
Definition: TPyEvent.cxx:64
python.PyAthena.obj
obj
Definition: PyAthena.py:132
PyObject
_object PyObject
Definition: IPyComponent.h:26
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:57
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37