#include <PyAthenaAlg.h>
Inherits IPyComponent, and AthAlgorithm.
Inherited by AthDictLoaderSvc_test.AthDictLoaderTestAlg, CopyTruthParticlesAlg.CopyTruthParticlesAlg, HECNoiseD3PDMaker.HECNoiseD3PDMaker, L1CaloDumpRampDataAlgorithm.L1CaloDumpRampDataAlgorithm, LArCellNtuple.CellE, LogicalExpressionFilter.LogicalExpressionFilter, python.BeamSpotUpdate.BeamSpotWriteAlg, python.DQPostProcessingAlg.DQPostProcessingAlg, python.DumperConfig.Dumper, python.egammaD3PDConfig.MergeElectrons, python.EvgenAlg.EvgenAlg, python.EvgenAnalysisAlg.EvgenAnalysisAlg, python.FilePeekerLib.FilePeeker, python.FilterUtils.BCIDFilter, python.FilterUtils.LBFilter, python.FilterUtils.LBPrinter, python.FilterUtils.LumiBlockFilter, python.FilterUtils.ZFilter, python.LArBadChannelBrowserLib.LArBadChannelBrowserAlg, python.LArBlobMergeAlg.LArBlobMergeAlg, python.LArCellConditionsAlg.LArCellConditionsAlg, python.Lib.PyClidsTestWriter, python.Lib.PyReadFatObject, python.Lib.PyReadNonThinnedData, python.Lib.PySgStressConsumer, python.Lib.PySgStressProducer, python.Lib.PyWriteThinnedData, python.POOL2EI_Lib.POOL2EI, python.PublicStreamFilter.PublicStreamFilter, python.PyComps.DataProxyLoader, python.PyComps.PyEvtFilter, python.PyComps.PyReader, python.PyComps.PySgDumper, python.PyComps.PyWriter, python.ReOrderMcEventCollection.FixMcEventCollection, python.tests.PyTestsLib.MyAlg, python.tests.PyTHistTestsLib.PyHistReader, python.tests.PyTHistTestsLib.PyHistWriter, test_athena_evtstore_root.MyAlg, test_athena_root.MyAlg, test_athena_variable_shape_ntuple.MyAlg, and test_interactive_athena.TestAlg.
|
| Alg (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor: More...
|
|
virtual | ~Alg () |
| Destructor: More...
|
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | reinitialize () override |
|
virtual StatusCode | start () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | stop () override |
|
virtual StatusCode | finalize () override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const char * | typeName () const override |
| return the std::type_info name of the underlying py-component This is used by concrete implementations to connect a python component to its C++ counter-part More...
|
|
virtual PyObject * | self () override |
| return associated python object. More...
|
|
| DeclareInterfaceID (IPyComponent, 1, 0) |
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 31 of file PyAthenaAlg.h.
◆ StoreGateSvc_t
◆ Alg() [1/2]
PyAthena::Alg::Alg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~Alg()
◆ Alg() [2/2]
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ DeclareInterfaceID()
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode PyAthena::Alg::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 93 of file PyAthenaAlg.cxx.
97 PyObject* pycontext = PyCapsule_New (
const_cast<EventContext*
>(&getContext()),
nullptr,
nullptr);
100 Py_DECREF (pycontext);
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode PyAthena::Alg::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode PyAthena::Alg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ reinitialize()
StatusCode PyAthena::Alg::reinitialize |
( |
| ) |
|
|
overridevirtual |
◆ renounce()
◆ renounceArray()
◆ self()
virtual PyObject* PyAthena::Alg::self |
( |
| ) |
|
|
inlineoverridevirtual |
◆ setPyAttr()
bool PyAthena::Alg::setPyAttr |
( |
PyObject * |
pyobj | ) |
|
|
overrideprotectedvirtual |
attach the C++ component to its python cousin
Implements IPyComponent.
Definition at line 143 of file PyAthenaAlg.cxx.
147 PyObject* pyobj = TPython::CPPInstance_FromVoidPtr
152 pyobj = TPython::CPPInstance_FromVoidPtr ((
void*)
this,
"PyAthena::Alg");
154 (
"could not dyncast component [" <<
name() <<
"] to a python "
155 <<
"object of type [" << this->
typeName() <<
"] (probably a missing "
156 <<
"dictionary)" <<
endmsg
157 <<
"fallback to [PyAthena::Alg]...");
162 <<
name() <<
"] to a pyobject of type ["
165 if ( -1 == PyObject_SetAttrString(o,
"_cppHandle", pyobj) ) {
168 (
"Could not attach C++ handle [" <<
name() <<
"] to its python "
170 if ( -1 == PyObject_SetAttrString(o,
"_cppHandle", Py_None) ) {
173 (
"could not attach a dummy C++ handle [" <<
name() <<
"] to its "
◆ start()
StatusCode PyAthena::Alg::start |
( |
| ) |
|
|
overridevirtual |
◆ stop()
StatusCode PyAthena::Alg::stop |
( |
| ) |
|
|
overridevirtual |
◆ sysInitialize()
StatusCode PyAthena::Alg::sysInitialize |
( |
| ) |
|
|
overridevirtual |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthAlgorithm.
Definition at line 105 of file PyAthenaAlg.cxx.
108 (
"PyAthena::PyComponentMgr/PyComponentMgr",
name() );
109 if ( !pyMgr.retrieve().isSuccess() ) {
110 ATH_MSG_ERROR(
"Could not retrieve service [" << pyMgr.typeAndName()
112 return StatusCode::FAILURE;
116 m_self = pyMgr->pyObject(
this );
118 if (
m_self == Py_None ) {
120 return StatusCode::FAILURE;
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ typeName()
const char * PyAthena::Alg::typeName |
( |
| ) |
const |
|
overridevirtual |
return the std::type_info
name of the underlying py-component This is used by concrete implementations to connect a python component to its C++ counter-part
Implements IPyComponent.
Definition at line 132 of file PyAthenaAlg.cxx.
134 static const std::string tname = System::typeinfoName(
typeid(*
this));
135 return tname.c_str();
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_self
Pointer to self (from the python world)
Definition at line 96 of file PyAthenaAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files: