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 62 of file PyAthenaComps.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 71 of file PyAthenaComps.py.

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

Member Function Documentation

◆ condStore()

python.PyAthenaComps.Alg.condStore ( self)

Definition at line 99 of file PyAthenaComps.py.

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

◆ detStore()

python.PyAthenaComps.Alg.detStore ( self)

Definition at line 92 of file PyAthenaComps.py.

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

◆ evtStore()

python.PyAthenaComps.Alg.evtStore ( self)

Definition at line 85 of file PyAthenaComps.py.

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

◆ execute()

python.PyAthenaComps.Alg.execute ( self)

Definition at line 134 of file PyAthenaComps.py.

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

◆ filterPassed()

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

Definition at line 155 of file PyAthenaComps.py.

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

◆ finalize()

python.PyAthenaComps.Alg.finalize ( self)

Definition at line 140 of file PyAthenaComps.py.

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

◆ getContext()

python.PyAthenaComps.Alg.getContext ( self)

Definition at line 173 of file PyAthenaComps.py.

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

◆ initialize()

python.PyAthenaComps.Alg.initialize ( self)

Definition at line 112 of file PyAthenaComps.py.

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

◆ isExecuted()

python.PyAthenaComps.Alg.isExecuted ( self)

Definition at line 170 of file PyAthenaComps.py.

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

◆ reinitialize()

python.PyAthenaComps.Alg.reinitialize ( self)

Definition at line 122 of file PyAthenaComps.py.

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

◆ resetExecuted()

python.PyAthenaComps.Alg.resetExecuted ( self)

Definition at line 163 of file PyAthenaComps.py.

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

◆ setExecuted()

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

Definition at line 167 of file PyAthenaComps.py.

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

◆ setFilterPassed()

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

Reimplemented in python.PyAthenaComps.AthFilterAlgorithm.

Definition at line 159 of file PyAthenaComps.py.

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

◆ start()

python.PyAthenaComps.Alg.start ( self)

Definition at line 146 of file PyAthenaComps.py.

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

◆ stop()

python.PyAthenaComps.Alg.stop ( self)

Definition at line 152 of file PyAthenaComps.py.

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

◆ sysExecute()

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

Definition at line 125 of file PyAthenaComps.py.

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

◆ sysFinalize()

python.PyAthenaComps.Alg.sysFinalize ( self)

Definition at line 137 of file PyAthenaComps.py.

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

◆ sysInitialize()

python.PyAthenaComps.Alg.sysInitialize ( self)

Reimplemented in python.PyAthenaComps.AthFilterAlgorithm.

Definition at line 105 of file PyAthenaComps.py.

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

◆ sysReinitialize()

python.PyAthenaComps.Alg.sysReinitialize ( self)

Definition at line 115 of file PyAthenaComps.py.

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

◆ sysStart()

python.PyAthenaComps.Alg.sysStart ( self)

Definition at line 143 of file PyAthenaComps.py.

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

◆ sysStop()

python.PyAthenaComps.Alg.sysStop ( self)

Definition at line 149 of file PyAthenaComps.py.

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

Member Data Documentation

◆ __component_type__

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

Definition at line 80 of file PyAthenaComps.py.

◆ _ctx

python.PyAthenaComps.Alg._ctx = None
protected

Definition at line 79 of file PyAthenaComps.py.

◆ _pyath_condstore

python.PyAthenaComps.Alg._pyath_condstore = None
protected

Definition at line 78 of file PyAthenaComps.py.

◆ _pyath_detstore

python.PyAthenaComps.Alg._pyath_detstore = None
protected

Definition at line 77 of file PyAthenaComps.py.

◆ _pyath_evtstore

python.PyAthenaComps.Alg._pyath_evtstore = None
protected

init base class

Definition at line 76 of file PyAthenaComps.py.

◆ name

python.PyAthenaComps.Alg.name = name

Definition at line 81 of file PyAthenaComps.py.

◆ OutputLevel

python.PyAthenaComps.Alg.OutputLevel

Definition at line 107 of file PyAthenaComps.py.


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