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 62 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 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()

def 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()

def 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()

def 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()

def python.PyAthenaComps.Alg.execute (   self)

Definition at line 134 of file PyAthenaComps.py.

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

◆ filterPassed()

def 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()

def python.PyAthenaComps.Alg.finalize (   self)

Definition at line 140 of file PyAthenaComps.py.

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

◆ getContext()

def python.PyAthenaComps.Alg.getContext (   self)

Definition at line 173 of file PyAthenaComps.py.

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

◆ initialize()

def python.PyAthenaComps.Alg.initialize (   self)

Definition at line 112 of file PyAthenaComps.py.

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

◆ isExecuted()

def python.PyAthenaComps.Alg.isExecuted (   self)

Definition at line 170 of file PyAthenaComps.py.

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

◆ reinitialize()

def python.PyAthenaComps.Alg.reinitialize (   self)

Definition at line 122 of file PyAthenaComps.py.

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

◆ resetExecuted()

def 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()

def 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()

def 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()

def python.PyAthenaComps.Alg.start (   self)

Definition at line 146 of file PyAthenaComps.py.

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

◆ stop()

def python.PyAthenaComps.Alg.stop (   self)

Definition at line 152 of file PyAthenaComps.py.

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

◆ sysExecute()

def 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()

def python.PyAthenaComps.Alg.sysFinalize (   self)

Definition at line 137 of file PyAthenaComps.py.

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

◆ sysInitialize()

def 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()

def 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()

def python.PyAthenaComps.Alg.sysStart (   self)

Definition at line 143 of file PyAthenaComps.py.

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

◆ sysStop()

def 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__

python.PyAthenaComps.Alg.__component_type__
private

Definition at line 80 of file PyAthenaComps.py.

◆ _ctx

python.PyAthenaComps.Alg._ctx
private

Definition at line 79 of file PyAthenaComps.py.

◆ _pyath_condstore

python.PyAthenaComps.Alg._pyath_condstore
private

Definition at line 78 of file PyAthenaComps.py.

◆ _pyath_detstore

python.PyAthenaComps.Alg._pyath_detstore
private

Definition at line 77 of file PyAthenaComps.py.

◆ _pyath_evtstore

python.PyAthenaComps.Alg._pyath_evtstore
private

init base class

Definition at line 76 of file PyAthenaComps.py.

◆ name

python.PyAthenaComps.Alg.name

Definition at line 81 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:50
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:48
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