ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
python.PyAthenaComps.Alg Class Reference
Inheritance diagram for python.PyAthenaComps.Alg:
Collaboration diagram for python.PyAthenaComps.Alg:

Public Member Functions

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

Public Attributes

 name
 

Private Attributes

 _pyath_evtstore
 init base class More...
 
 _pyath_detstore
 
 _pyath_condstore
 
 _ctx
 
 __component_type__
 

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

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented in python.PyAthenaComps.AthFilterAlgorithm.

Definition at line 73 of file PyAthenaComps.py.

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

Member Function Documentation

◆ condStore()

def python.PyAthenaComps.Alg.condStore (   self)

Definition at line 101 of file PyAthenaComps.py.

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

◆ detStore()

def python.PyAthenaComps.Alg.detStore (   self)

Definition at line 94 of file PyAthenaComps.py.

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

◆ evtStore()

def python.PyAthenaComps.Alg.evtStore (   self)

Definition at line 87 of file PyAthenaComps.py.

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

◆ execute()

def python.PyAthenaComps.Alg.execute (   self)

Definition at line 136 of file PyAthenaComps.py.

136  def execute(self):
137  return StatusCode.Success
138 

◆ filterPassed()

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

Definition at line 157 of file PyAthenaComps.py.

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

◆ finalize()

def python.PyAthenaComps.Alg.finalize (   self)

Definition at line 142 of file PyAthenaComps.py.

142  def finalize(self):
143  return StatusCode.Success
144 

◆ getContext()

def python.PyAthenaComps.Alg.getContext (   self)

Definition at line 175 of file PyAthenaComps.py.

175  def getContext(self):
176  return self._ctx
177 

◆ initialize()

def python.PyAthenaComps.Alg.initialize (   self)

Definition at line 114 of file PyAthenaComps.py.

114  def initialize(self):
115  return StatusCode.Success
116 

◆ isExecuted()

def python.PyAthenaComps.Alg.isExecuted (   self)

Definition at line 172 of file PyAthenaComps.py.

172  def isExecuted(self):
173  return self._cppHandle.isExecuted()
174 

◆ reinitialize()

def python.PyAthenaComps.Alg.reinitialize (   self)

Definition at line 124 of file PyAthenaComps.py.

124  def reinitialize(self):
125  return StatusCode.Success
126 

◆ resetExecuted()

def python.PyAthenaComps.Alg.resetExecuted (   self)

Definition at line 165 of file PyAthenaComps.py.

165  def resetExecuted(self):
166  self.setExecuted(False)
167  return StatusCode.Success
168 

◆ setExecuted()

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

Definition at line 169 of file PyAthenaComps.py.

169  def setExecuted(self,state):
170  return self._cppHandle.setExecuted(state)
171 

◆ setFilterPassed()

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

Reimplemented in python.PyAthenaComps.AthFilterAlgorithm.

Definition at line 161 of file PyAthenaComps.py.

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

◆ start()

def python.PyAthenaComps.Alg.start (   self)

Definition at line 148 of file PyAthenaComps.py.

148  def start(self):
149  return StatusCode.Success
150 

◆ stop()

def python.PyAthenaComps.Alg.stop (   self)

Definition at line 154 of file PyAthenaComps.py.

154  def stop(self):
155  return StatusCode.Success
156 

◆ sysExecute()

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

Definition at line 127 of file PyAthenaComps.py.

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

◆ sysFinalize()

def python.PyAthenaComps.Alg.sysFinalize (   self)

Definition at line 139 of file PyAthenaComps.py.

139  def sysFinalize(self):
140  return self.finalize()
141 

◆ sysInitialize()

def python.PyAthenaComps.Alg.sysInitialize (   self)

Reimplemented in python.PyAthenaComps.AthFilterAlgorithm.

Definition at line 107 of file PyAthenaComps.py.

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

◆ sysReinitialize()

def python.PyAthenaComps.Alg.sysReinitialize (   self)

Definition at line 117 of file PyAthenaComps.py.

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

◆ sysStart()

def python.PyAthenaComps.Alg.sysStart (   self)

Definition at line 145 of file PyAthenaComps.py.

145  def sysStart(self):
146  return self.start()
147 

◆ sysStop()

def python.PyAthenaComps.Alg.sysStop (   self)

Definition at line 151 of file PyAthenaComps.py.

151  def sysStop(self):
152  return self.stop()
153 

Member Data Documentation

◆ __component_type__

python.PyAthenaComps.Alg.__component_type__
private

Definition at line 82 of file PyAthenaComps.py.

◆ _ctx

python.PyAthenaComps.Alg._ctx
private

Definition at line 81 of file PyAthenaComps.py.

◆ _pyath_condstore

python.PyAthenaComps.Alg._pyath_condstore
private

Definition at line 80 of file PyAthenaComps.py.

◆ _pyath_detstore

python.PyAthenaComps.Alg._pyath_detstore
private

Definition at line 79 of file PyAthenaComps.py.

◆ _pyath_evtstore

python.PyAthenaComps.Alg._pyath_evtstore
private

init base class

Definition at line 78 of file PyAthenaComps.py.

◆ name

python.PyAthenaComps.Alg.name

Definition at line 83 of file PyAthenaComps.py.


The documentation for this class was generated from the following file:
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
initialize
void initialize()
Definition: run_EoverP.cxx:894
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
pool::DbPrintLvl::setLevel
void setLevel(MsgLevel l)
Definition: DbPrint.h:32
python.PyAthenaComps._get_prop_value
def _get_prop_value(pycomp, propname)
helper methods ---------------------------------------------------------—
Definition: PyAthenaComps.py:50
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
test_pyathena.filterPassed
filterPassed
now, add a sequencer: it will only execute seqalg1 and 2 and never 3
Definition: test_pyathena.py:38