![]() |
ATLAS Offline Software
|
A Python wrapper around xAOD::TPyStore. More...
Public Member Functions | |
| def | __init__ (self) |
| Constructor for the class. More... | |
| def | contains (self, key, type) |
| Convenient version of the base class's contains function. More... | |
| def | isConst (self, key, type) |
| Convenient version of the base class's isConst function. More... | |
| def | record (self, obj, key) |
| Convenient version of the base class's record function. More... | |
A Python wrapper around xAOD::TPyStore.
In order to make the semi-templated functions of xAOD::TPyStore more convenient to use from PyROOT, the user is supposed to use an instance of this class, and not ROOT.xAOD.TPyStore directly.
Definition at line 17 of file TPyStore.py.
| def python.TPyStore.TPyStore.__init__ | ( | self | ) |
| def python.TPyStore.TPyStore.contains | ( | self, | |
| key, | |||
| type | |||
| ) |
Convenient version of the base class's contains function.
This function allows the user to, instead of figuring out the exact type name of some C++ type, to rather write code like:
if store.contains( "Electrons", ROOT.xAOD.ElectronContainer ):
| key | The string key of the object to check for |
| type | The type of the object we are looking for |
True if the object is available in the store, False if it's not Definition at line 40 of file TPyStore.py.
| def python.TPyStore.TPyStore.isConst | ( | self, | |
| key, | |||
| type | |||
| ) |
Convenient version of the base class's isConst function.
This function allows the user to, instead of figuring out the exact type name of some C++ type, to rather write code like:
if store.isConst( "Electrons", ROOT.xAOD.ElectronContainer ):
| key | The string key of the object to check for |
| type | The type of the object we are looking for |
True if the object is only available as a constant, False if it's not Definition at line 63 of file TPyStore.py.
| def python.TPyStore.TPyStore.record | ( | self, | |
| obj, | |||
| key | |||
| ) |
Convenient version of the base class's record function.
This is the main function of this wrapper class. It allows the user to record objects into the transient store like:
el = ROOT.xAOD.ElectronContainer() store.record( el, "MyElectrons" )
| obj | The object to be recorded into the output file |
| key | The key (branch name) for the object |
StatusCode::SUCCESS if all was successful, or StatusCode::FAILURE if not Definition at line 87 of file TPyStore.py.
1.8.18