ATLAS Offline Software
Loading...
Searching...
No Matches
python.PyAthenaComps.Alg Class Reference
Inheritance diagram for python.PyAthenaComps.Alg:
Collaboration diagram for python.PyAthenaComps.Alg:

Public Member Functions

 __init__ (self, name=None, **kw)
 evtStore (self)
 detStore (self)
 condStore (self)
 sysInitialize (self)
 initialize (self)
 sysReinitialize (self)
 reinitialize (self)
 sysExecute (self, cppcontext)
 execute (self)
 sysFinalize (self)
 finalize (self)
 sysStart (self)
 start (self)
 sysStop (self)
 stop (self)
 filterPassed (self)
 setFilterPassed (self, state)
 resetExecuted (self)
 setExecuted (self, state)
 isExecuted (self)
 getContext (self)

Public Attributes

 name = name
 OutputLevel

Protected Attributes

 _pyath_evtstore = None
 init base class
 _pyath_detstore = None
 _pyath_condstore = None
 _ctx = None

Private Attributes

str __component_type__ = "Algorithm"

Detailed Description

Base class from which all concrete algorithm classes should
be derived.

In order for a concrete algorithm class to do anything
useful the methods initialize(), execute() and finalize()
should be overridden.

Definition at line 61 of file PyAthenaComps.py.

Constructor & Destructor Documentation

◆ __init__()

python.PyAthenaComps.Alg.__init__ ( self,
name = None,
** kw )

Definition at line 70 of file PyAthenaComps.py.

70 def __init__(self, name = None, **kw):
71 if name is None: name = kw.get('name', self.__class__.__name__)
72 kw.setdefault('OutputLevel', 3) #INFO
73
74 super(Alg, self).__init__(name, **kw)
75 self._pyath_evtstore = None # handle to the evt store
76 self._pyath_detstore = None # handle to the det store
77 self._pyath_condstore = None # handle to the cond store
78 self._ctx = None
79 self.__component_type__="Algorithm"
80 self.name=name
81 return
82

Member Function Documentation

◆ condStore()

python.PyAthenaComps.Alg.condStore ( self)

Definition at line 98 of file PyAthenaComps.py.

98 def condStore(self):
99 if not self._pyath_condstore:
100 import AthenaPython.PyAthena as PyAthena
101 self._pyath_condstore = PyAthena.py_svc('StoreGateSvc/ConditionStore')
102 return self._pyath_condstore
103

◆ detStore()

python.PyAthenaComps.Alg.detStore ( self)

Definition at line 91 of file PyAthenaComps.py.

91 def detStore(self):
92 if not self._pyath_detstore:
93 import AthenaPython.PyAthena as PyAthena
94 self._pyath_detstore = PyAthena.py_svc('StoreGateSvc/DetectorStore')
95 return self._pyath_detstore
96

◆ evtStore()

python.PyAthenaComps.Alg.evtStore ( self)

Definition at line 84 of file PyAthenaComps.py.

84 def evtStore(self):
85 if not self._pyath_evtstore:
86 import AthenaPython.PyAthena as PyAthena
87 self._pyath_evtstore = PyAthena.py_svc('StoreGateSvc/StoreGateSvc')
88 return self._pyath_evtstore
89

◆ execute()

python.PyAthenaComps.Alg.execute ( self)

Definition at line 133 of file PyAthenaComps.py.

133 def execute(self):
134 return StatusCode.Success
135

◆ filterPassed()

python.PyAthenaComps.Alg.filterPassed ( self)
Did this algorithm pass or fail its filter criterion for the last event?

Definition at line 154 of file PyAthenaComps.py.

154 def filterPassed(self):
155 """Did this algorithm pass or fail its filter criterion for the last event?"""
156 return self._cppHandle.filterPassed(self._ctx)
157

◆ finalize()

python.PyAthenaComps.Alg.finalize ( self)

Definition at line 139 of file PyAthenaComps.py.

139 def finalize(self):
140 return StatusCode.Success
141

◆ getContext()

python.PyAthenaComps.Alg.getContext ( self)

Definition at line 172 of file PyAthenaComps.py.

172 def getContext(self):
173 return self._ctx
174

◆ initialize()

python.PyAthenaComps.Alg.initialize ( self)

Definition at line 111 of file PyAthenaComps.py.

111 def initialize(self):
112 return StatusCode.Success
113
void initialize()

◆ isExecuted()

python.PyAthenaComps.Alg.isExecuted ( self)

Definition at line 169 of file PyAthenaComps.py.

169 def isExecuted(self):
170 return self._cppHandle.isExecuted()
171

◆ reinitialize()

python.PyAthenaComps.Alg.reinitialize ( self)

Definition at line 121 of file PyAthenaComps.py.

121 def reinitialize(self):
122 return StatusCode.Success
123

◆ resetExecuted()

python.PyAthenaComps.Alg.resetExecuted ( self)

Definition at line 162 of file PyAthenaComps.py.

162 def resetExecuted(self):
163 self.setExecuted(False)
164 return StatusCode.Success
165

◆ setExecuted()

python.PyAthenaComps.Alg.setExecuted ( self,
state )

Definition at line 166 of file PyAthenaComps.py.

166 def setExecuted(self,state):
167 return self._cppHandle.setExecuted(state)
168

◆ setFilterPassed()

python.PyAthenaComps.Alg.setFilterPassed ( self,
state )
Set the filter passed flag to the specified state

Definition at line 158 of file PyAthenaComps.py.

158 def setFilterPassed(self, state):
159 """Set the filter passed flag to the specified state"""
160 return self._cppHandle.setFilterPassed(state, self._ctx)
161

◆ start()

python.PyAthenaComps.Alg.start ( self)

Definition at line 145 of file PyAthenaComps.py.

145 def start(self):
146 return StatusCode.Success
147

◆ stop()

python.PyAthenaComps.Alg.stop ( self)

Definition at line 151 of file PyAthenaComps.py.

151 def stop(self):
152 return StatusCode.Success
153

◆ sysExecute()

python.PyAthenaComps.Alg.sysExecute ( self,
cppcontext )

Definition at line 124 of file PyAthenaComps.py.

124 def sysExecute(self, cppcontext):
125 import cppyy
126 self._ctx = cppyy.bind_object(cppcontext, "EventContext")
127 try:
128 ret = self.execute()
129 finally:
130 self._ctx = None
131 return ret
132

◆ sysFinalize()

python.PyAthenaComps.Alg.sysFinalize ( self)

Definition at line 136 of file PyAthenaComps.py.

136 def sysFinalize(self):
137 return self.finalize()
138

◆ sysInitialize()

python.PyAthenaComps.Alg.sysInitialize ( self)

Definition at line 104 of file PyAthenaComps.py.

104 def sysInitialize(self):
105 if hasattr(self, 'OutputLevel'):
106 self.msg.setLevel(self.OutputLevel)
107 else:
108 self.msg.setLevel(_get_prop_value(self,'OutputLevel'))
109 return self.initialize()
110

◆ sysReinitialize()

python.PyAthenaComps.Alg.sysReinitialize ( self)

Definition at line 114 of file PyAthenaComps.py.

114 def sysReinitialize(self):
115 if hasattr(self, 'OutputLevel'):
116 self.msg.setLevel(self.OutputLevel)
117 else:
118 self.msg.setLevel(_get_prop_value(self,'OutputLevel'))
119 return self.reinitialize()
120

◆ sysStart()

python.PyAthenaComps.Alg.sysStart ( self)

Definition at line 142 of file PyAthenaComps.py.

142 def sysStart(self):
143 return self.start()
144

◆ sysStop()

python.PyAthenaComps.Alg.sysStop ( self)

Definition at line 148 of file PyAthenaComps.py.

148 def sysStop(self):
149 return self.stop()
150

Member Data Documentation

◆ __component_type__

str python.PyAthenaComps.Alg.__component_type__ = "Algorithm"
private

Definition at line 79 of file PyAthenaComps.py.

◆ _ctx

python.PyAthenaComps.Alg._ctx = None
protected

Definition at line 78 of file PyAthenaComps.py.

◆ _pyath_condstore

python.PyAthenaComps.Alg._pyath_condstore = None
protected

Definition at line 77 of file PyAthenaComps.py.

◆ _pyath_detstore

python.PyAthenaComps.Alg._pyath_detstore = None
protected

Definition at line 76 of file PyAthenaComps.py.

◆ _pyath_evtstore

python.PyAthenaComps.Alg._pyath_evtstore = None
protected

init base class

Definition at line 75 of file PyAthenaComps.py.

◆ name

python.PyAthenaComps.Alg.name = name

Definition at line 80 of file PyAthenaComps.py.

◆ OutputLevel

python.PyAthenaComps.Alg.OutputLevel

Definition at line 106 of file PyAthenaComps.py.


The documentation for this class was generated from the following file: