The Gaudi Framework  master (594c33fa)
GaudiAlg.Algs Namespace Reference

Classes

class  GaudiAlgo
 
class  HistoAlgo
 
class  objectmethod
 
class  TupleAlgo
 
class  TupleDecColumnDispatcher
 

Functions

def _tool_ (self, interface, typename, name=None, parent=None, create=True)
 
def _service_ (self, interface, name, create=True)
 
def _init_ (self, name, **args)
 
def _initialize_ (self)
 
def _initialize_histo_ (self)
 
def _initialize_tuple_ (self)
 
def _evtSvc (self, location=None)
 
def _detSvc (self, location=None)
 
def _histoSvc (self, address=None)
 
def _get (self, location)
 
def _getDet (self, location)
 
def _get_ (self, location, rootInTES=True)
 
def _exist_ (self, location, rootInTES=True)
 
def _ntupleSvc (self)
 
def _evtcolSvc (self)
 
def _finalize_ (self)
 
def _success_ (self)
 
def _hasProperty_ (self, pname)
 
def _getProperty_ (self, pname)
 
def _setProperty_ (self, pname, pvalue)
 
def _get_attr_ (self, pname)
 
def _set_attr_ (self, pname, pvalue)
 
def _start_ (self)
 
def _execute_ (self)
 
def _stop_ (self)
 
def _plot1D_ (s, *a)
 
def _plot2D_ (s, *a)
 
def _plot3D_ (s, *a)
 
def _profile1D_ (s, *a)
 
def _profile2D_ (s, *a)
 
def _decorate_plots_ (klasses)
 
def _nTuple_ (s, *a)
 
def _evtCol_ (s, *a)
 
def _decorate_tuples_ (klasses)
 
def _t_nTuple_ (s, *a)
 
def _t_ntuple_ (s, *a)
 
def _t_valid_ (s, *a)
 
def _t_write_ (s, *a)
 
def _t_column_ (s, *a)
 
def _t_column_ll_ (s, *a)
 
def _t_column_ull_ (s, *a)
 
def _t_array_ (s, *a)
 
def _t_matrix_ (s, *a)
 
def _t_farray_ (s, *a)
 
def _t_fmatrix_ (s, *a)
 
def _decorate_algs_ (klasses)
 
def mapvct (func, sequence, ovct=None)
 
def _get_all_tools_ (self, method)
 
def _Tools_a_ (self)
 
def _Tools_t_ (self)
 
def _get_counter_ (self, method, name)
 
def _Counter_a_ (self, name)
 
def _Counter_t_ (self, name)
 
def _get_all_histos_ (component, method, name)
 
def _Histos_a_ (self, name=None)
 
def _Histos_t_ (self, name=None)
 
def _help_ ()
 

Variables

string __author__ = "Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr"
 
tuple __all__
 
 iAlgorithm = GaudiPython.Bindings.iAlgorithm
 
 iAlgTool = GaudiPython.Bindings.iAlgTool
 
 std
 
 Vector
 
 Matrix
 
 HID
 
 HistoID
 
 TID
 
 TupleID
 
 AlgDecorator
 
 HistoDecorator
 
 TupleAlgDecorator
 
 TupleDecorator
 
 _GaudiAlgorithm
 
 _GaudiHistoAlg
 
 _GaudiTupleAlg
 
 Tuple
 
 _Dec
 
 column
 
 _alg_map_
 
 _ialg
 
 _evtSvc_
 
 _detSvc_
 
 _histoSvc_
 
 _ntupleSvc_
 
 _evtcolSvc_
 

Function Documentation

◆ _Counter_a_()

def GaudiAlg.Algs._Counter_a_ (   self,
  name 
)
private
Retrieve the counter managed GaudiCommon<TYPE> base by name:

>>> alg  = ...                     ## get the algorithm
>>> cnt  = alg.Counter('#accept')  ## get the counter
>>> print(cnt)

Definition at line 1455 of file Algs.py.

1455 def _Counter_a_(self, name):
1456  """
1457  Retrieve the counter managed GaudiCommon<TYPE> base by name:
1458 
1459  >>> alg = ... ## get the algorithm
1460  >>> cnt = alg.Counter('#accept') ## get the counter
1461  >>> print(cnt)
1462 
1463  """
1464  _cmp = getattr(self, "_ialg")
1465  if not _cmp:
1466  self.retrieveInterface()
1467  _cmp = getattr(self, "_ialg")
1468  return _get_counter_(_cmp, "_counter_a_", name)
1469 
1470 
1471 # ==============================================================================
1472 
1473 

◆ _Counter_t_()

def GaudiAlg.Algs._Counter_t_ (   self,
  name 
)
private
Retrieve the counter managed GaudiCommon<TYPE> base by name:

>>> tool = ...                      ## get the tool
>>> cnt  = tool.Counter('#accept')  ## get the counter
>>> print(cnt)

Definition at line 1474 of file Algs.py.

1474 def _Counter_t_(self, name):
1475  """
1476  Retrieve the counter managed GaudiCommon<TYPE> base by name:
1477 
1478  >>> tool = ... ## get the tool
1479  >>> cnt = tool.Counter('#accept') ## get the counter
1480  >>> print(cnt)
1481 
1482  """
1483  _cmp = getattr(self, "_itool")
1484  if not _cmp:
1485  self.retrieveInterface()
1486  _cmp = getattr(self, "_itool")
1487  return _get_counter_(_cmp, "_counter_t_", name)
1488 
1489 
1490 # =============================================================================
1491 # get all histos
1492 # =============================================================================
1493 cpp.GaudiAlg.ID.__repr__ = cpp.GaudiAlg.ID.idAsString
1494 cpp.GaudiAlg.ID.__str__ = cpp.GaudiAlg.ID.idAsString
1495 cpp.StatEntity.__repr__ = cpp.StatEntity.toString
1496 cpp.StatEntity.__str__ = cpp.StatEntity.toString
1497 
1498 # =============================================================================
1499 
1500 

◆ _decorate_algs_()

def GaudiAlg.Algs._decorate_algs_ (   klasses)
private

Definition at line 1341 of file Algs.py.

1341 def _decorate_algs_(klasses):
1342  t = type(klasses)
1343  if not issubclass(t, list) and not issubclass(t, tuple):
1344  klasses = [klasses]
1345  for _alg in klasses:
1346  for key in _alg_map_:
1347  setattr(_alg, key, _alg_map_[key])
1348 
1349 
1350 # =
1351 _decorate_algs_(GaudiAlgo)
1352 _decorate_algs_(HistoAlgo)
1353 _decorate_algs_(TupleAlgo)
1354 
1355 # =============================================================================
1356 # Helper function to fill histogram/ntuple using 'map'-operation
1357 # =============================================================================
1358 
1359 

◆ _decorate_plots_()

def GaudiAlg.Algs._decorate_plots_ (   klasses)
private

Definition at line 1116 of file Algs.py.

1116 def _decorate_plots_(klasses):
1117  t = type(klasses)
1118  if not issubclass(t, list) and not issubclass(t, tuple):
1119  klasses = [klasses]
1120  for klass in klasses:
1121  klass.plot = _plot1D_
1122  klass.plot1D = _plot1D_
1123  klass.plot2D = _plot2D_
1124  klass.plot3D = _plot3D_
1125  klass.profile1D = _profile1D_
1126  klass.profile2D = _profile2D_
1127 
1128 
1129 _decorate_plots_(HistoAlgo)
1130 _decorate_plots_(TupleAlgo)
1131 
1132 
1133 # =============================================================================

◆ _decorate_tuples_()

def GaudiAlg.Algs._decorate_tuples_ (   klasses)
private

Definition at line 1155 of file Algs.py.

1155 def _decorate_tuples_(klasses):
1156  t = type(klasses)
1157  if not issubclass(t, list) and not issubclass(t, tuple):
1158  klasses = [klasses]
1159  for klass in klasses:
1160  klass.nTuple = _nTuple_
1161  klass.evtCol = _evtCol_
1162  klass.ntupleSvc = _ntupleSvc
1163  klass.tupleSvc = _ntupleSvc
1164  klass.ntupSvc = _ntupleSvc
1165  klass.tupSvc = _ntupleSvc
1166  klass.evtColSvc = _evtcolSvc
1167  klass.evtcolSvc = _evtcolSvc
1168 
1169 
1170 # ==========================================================
1171 _decorate_tuples_(TupleAlgo)
1172 
1173 # "decorate N-Tuple object

◆ _detSvc()

def GaudiAlg.Algs._detSvc (   self,
  location = None 
)
private
Trivial helper function to access Detector Data and Event Data Service

Usage:
# get detector data service
svc = self.detSvc()

# get the data
lhcb = self.detSvc('/dd/Structure/LHCb')

Definition at line 360 of file Algs.py.

360 def _detSvc(self, location=None):
361  """
362  Trivial helper function to access Detector Data and Event Data Service
363 
364  Usage:
365  # get detector data service
366  svc = self.detSvc()
367 
368  # get the data
369  lhcb = self.detSvc('/dd/Structure/LHCb')
370  """
371  if location is None:
372  return self._detSvc_
373  return self._detSvc_[location]
374 
375 
376 # =============================================================================
377 # Trivial helper function to access Histogram Data and Histogram Data Service
378 #
379 # Usage:
380 #
381 # @code
382 #
383 # # get histogram data service
384 # svc = self.histoSvc()
385 #
386 # # get the data
387 # histo = self.histoSvc('/stat/Calo/1')
388 #
389 # @endcode
390 #
391 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
392 # @date 2006-11-26
393 
394 

◆ _evtCol_()

def GaudiAlg.Algs._evtCol_ (   s,
a 
)
private
Retrieve (book-on-demand) N-Tuple object for Event Tag Collections

Definition at line 1144 of file Algs.py.

1144 def _evtCol_(s, *a):
1145  """
1146  Retrieve (book-on-demand) N-Tuple object for Event Tag Collections
1147  """
1148  return TupleAlgDecorator.evtCol(s, *a)
1149 
1150 
1151 _nTuple_.__doc__ += "\n" + TupleAlgDecorator.nTuple.__doc__
1152 _evtCol_.__doc__ += "\n" + TupleAlgDecorator.evtCol.__doc__
1153 
1154 

◆ _evtcolSvc()

def GaudiAlg.Algs._evtcolSvc (   self)
private
Trivial function to access Event Collection Service

Definition at line 473 of file Algs.py.

473 def _evtcolSvc(self):
474  """
475  Trivial function to access Event Collection Service
476  """
477  return self._evtcolSvc_
478 
479 
480 # =============================================================================
481 # The default finalization (finalization of base C++ class)

◆ _evtSvc()

def GaudiAlg.Algs._evtSvc (   self,
  location = None 
)
private
Trivial helper function to access Event Data and Event Data Service

Usage:

# get event data service
svc = self.evtSvc()

# get the data
hits = self.evtSvc('MC/Calo/Hits')

Definition at line 324 of file Algs.py.

324 def _evtSvc(self, location=None):
325  """
326  Trivial helper function to access Event Data and Event Data Service
327 
328  Usage:
329 
330  # get event data service
331  svc = self.evtSvc()
332 
333  # get the data
334  hits = self.evtSvc('MC/Calo/Hits')
335  """
336  if not location:
337  return self._evtSvc_
338  return self._evtSvc_[location]
339 
340 
341 # =============================================================================
342 # Trivial helper function to access Detector Data and Detector Data Service
343 #
344 # Usage:
345 #
346 # @code
347 #
348 # # get detector data service
349 # svc = self.detSvc()
350 #
351 # # get the data
352 # lhcb = self.detSvc('/dd/Structure/LHCb')
353 #
354 # @endcode
355 #
356 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
357 # @date 2006-11-26
358 
359 

◆ _execute_()

def GaudiAlg.Algs._execute_ (   self)
private
The fictive 'execute' method, which MUST be overwitten by user

Definition at line 961 of file Algs.py.

961 def _execute_(self):
962  """
963  The fictive 'execute' method, which MUST be overwitten by user
964  """
965  raise RuntimeError("Execute method is not implemented for %s" % self.name())
966 
967 
968 GaudiAlgo.execute = _execute_
969 HistoAlgo.execute = _execute_
970 TupleAlgo.execute = _execute_
971 
972 

◆ _exist_()

def GaudiAlg.Algs._exist_ (   self,
  location,
  rootInTES = True 
)
private
Check  the object in Transient Event Store using GaudiCommon machinery,
respecting RootInTES behaviour

Definition at line 450 of file Algs.py.

450 def _exist_(self, location, rootInTES=True):
451  """
452  Check the object in Transient Event Store using GaudiCommon machinery,
453  respecting RootInTES behaviour
454  """
455  return AlgDecorator.exist_(self, location, rootInTES)
456 
457 
458 # =============================================================================
459 # Trivial helper function to access NTuple Service
460 
461 

◆ _finalize_()

def GaudiAlg.Algs._finalize_ (   self)
private
The default finalization : finalize the base C++ class

Definition at line 482 of file Algs.py.

482 def _finalize_(self):
483  """
484  The default finalization : finalize the base C++ class
485  """
486  status = self._Base.finalize_(self)
487  return status
488 
489 
490 # =============================================================================
491 # Dummy method returning success
492 
493 

◆ _get()

def GaudiAlg.Algs._get (   self,
  location 
)
private
Trivial function to access the data in TES using the data service

Definition at line 416 of file Algs.py.

416 def _get(self, location):
417  """
418  Trivial function to access the data in TES using the data service
419  """
420  return self._evtSvc_[location]
421 
422 
423 # =============================================================================
424 # Trivial function to access the data in TDS
425 
426 

◆ _get_()

def GaudiAlg.Algs._get_ (   self,
  location,
  rootInTES = True 
)
private
Get the object from Transient Event Store using GaudiCommon machinery,
respecting RootInTES behaviour

Definition at line 438 of file Algs.py.

438 def _get_(self, location, rootInTES=True):
439  """
440  Get the object from Transient Event Store using GaudiCommon machinery,
441  respecting RootInTES behaviour
442  """
443  return AlgDecorator.get_(self, location, rootInTES)
444 
445 
446 # =============================================================================
447 # check the data from TES using GaudiCommon methods, respecting RootInTES
448 
449 

◆ _get_all_histos_()

def GaudiAlg.Algs._get_all_histos_ (   component,
  method,
  name 
)
private
Get All histogram form the component

Definition at line 1501 of file Algs.py.

1501 def _get_all_histos_(component, method, name):
1502  """
1503  Get All histogram form the component
1504  """
1505  _res = {}
1506  for _his in (
1507  std.vector("AIDA::IProfile2D*"),
1508  std.vector("AIDA::IProfile1D*"),
1509  std.vector("AIDA::IHistogram3D*"),
1510  std.vector("AIDA::IHistogram2D*"),
1511  std.vector("AIDA::IHistogram1D*"),
1512  ):
1513  _his = _his()
1514  _ids = std.vector("GaudiAlg::ID")()
1515  _fun = getattr(HistoDecorator, method)
1516  _num = _fun(component, _ids, _his)
1517  if _ids.size() != _num or _his.size() != _num:
1518  raise RuntimeError("Unable to extract Histos!")
1519  for _i in range(0, _num):
1520  _id = _ids[_i]
1521  if _id.numeric():
1522  _id = _id.numericID()
1523  elif _id.literal():
1524  _id = _id.literalID()
1525  else:
1526  _id = _id.idAsString()
1527  _res[_id] = _his[_i]
1528 
1529  if not name:
1530  return _res # return the dictionary
1531 
1532  id = cpp.GaudiAlg.ID(name)
1533  for i in (name, id.literalID(), id.numericID(), id.idAsString(), id):
1534  h = _res.get(i, None)
1535  if not not h:
1536  return h # return the histogram
1537 
1538  return None
1539 
1540 
1541 # =============================================================================
1542 
1543 

◆ _get_all_tools_()

def GaudiAlg.Algs._get_all_tools_ (   self,
  method 
)
private
Get all tools

Definition at line 1382 of file Algs.py.

1382 def _get_all_tools_(self, method):
1383  """
1384  Get all tools
1385  """
1386  _tools = std.vector("IAlgTool*")()
1387  _func = getattr(AlgDecorator, method)
1388  _num = _func(self, _tools)
1389  if _tools.size() != _num:
1390  raise RuntimeError("Unable to extract Tools")
1391  _res = []
1392  for _tool in _tools:
1393  _res += [iAlgTool(_tool.name(), _tool)]
1394  return _res
1395 
1396 
1397 # =============================================================================
1398 
1399 

◆ _get_attr_()

def GaudiAlg.Algs._get_attr_ (   self,
  pname 
)
private
Get the attribute (or property)
- if the attribute name corresponds to the property name, property value is returned

Definition at line 537 of file Algs.py.

537 def _get_attr_(self, pname):
538  """
539  Get the attribute (or property)
540  - if the attribute name corresponds to the property name, property value is returned
541  """
542  if self.hasProperty(pname):
543  return self._ialg.__getattr__(pname)
544  else:
545  # Since self does not inherit from iAlgorithm (see !1116, 4f05f03678),
546  # delegate attribute lookup to self._ialg.
547  try:
548  return getattr(self._ialg, pname)
549  except AttributeError:
550  pass
551  raise AttributeError("attribute/property %s does not exist" % pname)
552 
553 
554 # =============================================================================
555 # set the attribute or property
556 
557 

◆ _get_counter_()

def GaudiAlg.Algs._get_counter_ (   self,
  method,
  name 
)
private
get the counter

Definition at line 1444 of file Algs.py.

1444 def _get_counter_(self, method, name):
1445  """
1446  get the counter
1447  """
1448  _func = getattr(AlgDecorator, method)
1449  return _func(self, name)
1450 
1451 
1452 # ==============================================================================
1453 
1454 

◆ _getDet()

def GaudiAlg.Algs._getDet (   self,
  location 
)
private
Trivial function to access the data in TDS using data service

Definition at line 427 of file Algs.py.

427 def _getDet(self, location):
428  """
429  Trivial function to access the data in TDS using data service
430  """
431  return self._detSvc_[location]
432 
433 
434 # =============================================================================
435 # get the data from TES using GaudiCommon methods, respecting RootInTES
436 
437 

◆ _getProperty_()

def GaudiAlg.Algs._getProperty_ (   self,
  pname 
)
private
Get the property by name

Definition at line 511 of file Algs.py.

511 def _getProperty_(self, pname):
512  """
513  Get the property by name
514  """
515  if not self.hasProperty(pname):
516  raise AttributeError("property %s does not exist" % pname)
517  return self._ialg.__getattr__(pname)
518 
519 
520 # =============================================================================
521 # set the value for the given property
522 
523 

◆ _hasProperty_()

def GaudiAlg.Algs._hasProperty_ (   self,
  pname 
)
private
The trivial function which checks the existence of the property with given name

Definition at line 500 of file Algs.py.

500 def _hasProperty_(self, pname):
501  """
502  The trivial function which checks the existence of the property with given name
503  """
504  return cpp.Gaudi.Utils.hasProperty(self, pname)
505 
506 
507 # =============================================================================
508 # get the value of the given property
509 
510 

◆ _help_()

def GaudiAlg.Algs._help_ ( )
private

Definition at line 1617 of file Algs.py.

1617 def _help_():
1618  print(__doc__, __author__)
1619  print("\t\t\tDoc-string for class GaudiAlgo \n", GaudiAlgo.__doc__)
1620  print("\t\t\tDoc-string for class HistoAlgo \n", HistoAlgo.__doc__)
1621  print("\t\t\tDoc-string for class TupleAlgo \n", TupleAlgo.__doc__)
1622 
1623 
1624 # =============================================================================
1625 # pseudo-test suite
1626 # =============================================================================

◆ _Histos_a_()

def GaudiAlg.Algs._Histos_a_ (   self,
  name = None 
)
private
Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:

>>> alg = ...              ## get the algorithm
>>> histos = alg.Histos()  ## get all histograms & profiles
>>> for key in histos :
...        print(key, histos[key])

Retrive the histogram with the certain ID :

>>> alg = ...                           ## get the algorithm
>>> histo = alg.Histos('some histo ID') ## get the histo by ID
>>> print(histo)

Definition at line 1544 of file Algs.py.

1544 def _Histos_a_(self, name=None):
1545  """
1546  Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1547 
1548  >>> alg = ... ## get the algorithm
1549  >>> histos = alg.Histos() ## get all histograms & profiles
1550  >>> for key in histos :
1551  ... print(key, histos[key])
1552 
1553  Retrive the histogram with the certain ID :
1554 
1555  >>> alg = ... ## get the algorithm
1556  >>> histo = alg.Histos('some histo ID') ## get the histo by ID
1557  >>> print(histo)
1558 
1559  """
1560  _cmp = getattr(self, "_ialg")
1561  if not _cmp:
1562  self.retrieveInterface()
1563  _cmp = getattr(self, "_ialg")
1564  return _get_all_histos_(_cmp, "_histos_a_", name)
1565 
1566 
1567 # =============================================================================
1568 
1569 

◆ _Histos_t_()

def GaudiAlg.Algs._Histos_t_ (   self,
  name = None 
)
private
Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:

>>> tool = ...              ## get the tool
>>> histos = tool.Histos()  ## get all histograms & profiles
>>> for key in histos :
...        print(key, histos[key])

Retrive the historgam with certain ID :

>>> tool = ...                           ## get the tool
>>> histo = tool.Histos('some histo ID') ## get the histo by ID
>>> print(histo)

Definition at line 1570 of file Algs.py.

1570 def _Histos_t_(self, name=None):
1571  """
1572  Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1573 
1574  >>> tool = ... ## get the tool
1575  >>> histos = tool.Histos() ## get all histograms & profiles
1576  >>> for key in histos :
1577  ... print(key, histos[key])
1578 
1579  Retrive the historgam with certain ID :
1580 
1581  >>> tool = ... ## get the tool
1582  >>> histo = tool.Histos('some histo ID') ## get the histo by ID
1583  >>> print(histo)
1584 
1585  """
1586  _cmp = getattr(self, "_itool")
1587  if not _cmp:
1588  self.retrieveInterface()
1589  _cmp = getattr(self, "_itool")
1590  return _get_all_histos_(_cmp, "_histos_t_", name)
1591 
1592 
1593 # =============================================================================
1594 
1595 _Tools_a_.__doc__ += "\n" + AlgDecorator._tools_a_.__doc__
1596 _Tools_t_.__doc__ += "\n" + AlgDecorator._tools_t_.__doc__
1597 _Counter_a_.__doc__ += "\n" + AlgDecorator._counter_a_.__doc__
1598 _Counter_t_.__doc__ += "\n" + AlgDecorator._counter_t_.__doc__
1599 _Histos_a_.__doc__ += "\n" + HistoDecorator._histos_a_.__doc__
1600 _Histos_t_.__doc__ += "\n" + HistoDecorator._histos_t_.__doc__
1601 
1602 iAlgorithm.Tools = _Tools_a_
1603 iAlgTool.Tools = _Tools_t_
1604 iAlgorithm.Counter = _Counter_a_
1605 iAlgTool.Counter = _Counter_t_
1606 iAlgorithm.Histos = _Histos_a_
1607 iAlgTool.Histos = _Histos_t_
1608 
1609 # finally add some decoration for histograms

◆ _histoSvc()

def GaudiAlg.Algs._histoSvc (   self,
  address = None 
)
private
Trivial helper function to access Histogram  Data and Histogram  Data Service

Usage:

# get histogram data service
svc = self.histoSvc()

# get the data
histo = self.histoSvc('/stat/Calo/1')

Definition at line 395 of file Algs.py.

395 def _histoSvc(self, address=None):
396  """
397  Trivial helper function to access Histogram Data and Histogram Data Service
398 
399  Usage:
400 
401  # get histogram data service
402  svc = self.histoSvc()
403 
404  # get the data
405  histo = self.histoSvc('/stat/Calo/1')
406  """
407  if not address:
408  return self._histoSvc_
409  return self._histoSvc_[address]
410 
411 
412 # =============================================================================
413 # Trivial function to access the data in TES
414 
415 

◆ _init_()

def GaudiAlg.Algs._init_ (   self,
  name,
**  args 
)
private
The constructor from unique algorithm instance name & parameters

Definition at line 207 of file Algs.py.

207 def _init_(self, name, **args):
208  """
209  The constructor from unique algorithm instance name & parameters
210  """
211  self._Base.__init__(self, self, name)
212  appMgr = AppMgr()
213  algMgr = appMgr._algmgr
214  status = algMgr.addAlgorithm(self)
215  if status.isFailure():
216  raise RuntimeError('Unable to add Algorithm "' + name + '"')
217  self._ialg = iAlgorithm(name, self)
218  for key in args:
219  setattr(self, key, args[key])
220  # take some care about the ownership of the algorithms
221  if "GaudiPythonAlgos" not in appMgr.__dict__:
222  appMgr.__dict__["GaudiPythonAlgos"] = []
223  appMgr.__dict__["GaudiPythonAlgos"].append(self)
224 
225 
226 # =============================================================================
227 # The default initialization (initialization of base C++ class + data
228 #
229 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
230 # @date 2006-11-26
231 
232 

◆ _initialize_()

def GaudiAlg.Algs._initialize_ (   self)
private
The default initialization (initialization of base C++ class + data)

Definition at line 233 of file Algs.py.

233 def _initialize_(self):
234  """
235  The default initialization (initialization of base C++ class + data)
236  """
237  status = self._Base.initialize_(self)
238  if status.isFailure():
239  return status
240 
241  # set the basic services
242  _e = self._Base.evtSvc(self)
243  _s = InterfaceCast(cpp.IService)(_e)
244  self._evtSvc_ = iDataSvc(_s.name(), _e)
245 
246  _d = self._Base.detSvc(self)
247  _s = InterfaceCast(cpp.IService)(_d)
248  self._detSvc_ = iDataSvc(_s.name(), _d)
249 
250  return status
251 
252 
253 # =============================================================================
254 # The default initialization (initialization of base C++ class + data members)
255 #
256 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
257 # @date 2006-11-26
258 
259 

◆ _initialize_histo_()

def GaudiAlg.Algs._initialize_histo_ (   self)
private
The default initialization (initialization of base C++ class + data members)

Definition at line 260 of file Algs.py.

260 def _initialize_histo_(self):
261  """
262  The default initialization (initialization of base C++ class + data members)
263  """
264  status = _initialize_(self)
265  if status.isFailure():
266  return status
267 
268  # set the basic services
269  _h = self._Base.histoSvc(self)
270  _s = InterfaceCast(cpp.IService)(_h)
271  self._histoSvc_ = iHistogramSvc(_s.name(), _h)
272 
273  return status
274 
275 
276 # =============================================================================
277 # The default initialization (initialization of base C++ class + data members)
278 #
279 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
280 # @date 2006-11-26
281 
282 

◆ _initialize_tuple_()

def GaudiAlg.Algs._initialize_tuple_ (   self)
private
The default initialization (initialization of base C++ class + data members)

Definition at line 283 of file Algs.py.

283 def _initialize_tuple_(self):
284  """
285  The default initialization (initialization of base C++ class + data members)
286  """
287  status = _initialize_histo_(self)
288  if status.isFailure():
289  return status
290 
291  # set the basic services
292  if self.produceNTuples():
293  _n = self._Base.ntupleSvc(self)
294  _s = InterfaceCast(cpp.IService)(_n)
295  self._ntupleSvc_ = iNTupleSvc(_s.name(), _n)
296 
297  if self.produceEvtCols():
298  _n = self._Base.evtColSvc(self)
299  _s = InterfaceCast(cpp.IService)(_n)
300  self._evtcolSvc_ = iNTupleSvc(_s.name(), _n)
301 
302  return status
303 
304 
305 # =============================================================================
306 # Trivial helper function to access Event Data and Event Data Service
307 #
308 # Usage:
309 #
310 # @code
311 #
312 # # get event data service
313 # svc = self.evtSvc()
314 #
315 # # get the data
316 # hits = self.evtSvc('MC/Calo/Hits')
317 #
318 # @endcode
319 #
320 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
321 # @date 2006-11-26
322 
323 

◆ _nTuple_()

def GaudiAlg.Algs._nTuple_ (   s,
a 
)
private
Retrieve (book-on-demand) N-Tuple object

Definition at line 1134 of file Algs.py.

1134 def _nTuple_(s, *a):
1135  """
1136  Retrieve (book-on-demand) N-Tuple object
1137  """
1138  return TupleAlgDecorator.nTuple(s, *a)
1139 
1140 
1141 # =============================================================================
1142 
1143 

◆ _ntupleSvc()

def GaudiAlg.Algs._ntupleSvc (   self)
private
Trivial function to access N-Tuple Service

Definition at line 462 of file Algs.py.

462 def _ntupleSvc(self):
463  """
464  Trivial function to access N-Tuple Service
465  """
466  return self._ntupleSvc_
467 
468 
469 # =============================================================================
470 # Trivial helper function to access Event Collection Service
471 
472 

◆ _plot1D_()

def GaudiAlg.Algs._plot1D_ (   s,
a 
)
private
The basic method to fill (book-on-demand) 1D-histogram

The histogram will be created/booked dautomatically according to the
specifications:

   - literal or numerical ID (optional)
   - title
   - low edge
   - high edge
   - number of bins (default is 100)

The reference to the histogram is returned and could be used for later manipulations

Definition at line 988 of file Algs.py.

988 def _plot1D_(s, *a):
989  """
990  The basic method to fill (book-on-demand) 1D-histogram
991 
992  The histogram will be created/booked dautomatically according to the
993  specifications:
994 
995  - literal or numerical ID (optional)
996  - title
997  - low edge
998  - high edge
999  - number of bins (default is 100)
1000 
1001  The reference to the histogram is returned and could be used for later manipulations
1002 
1003  """
1004  return HistoDecorator.plot1D(s, *a)
1005 
1006 
1007 # =============================================================================
1008 
1009 

◆ _plot2D_()

def GaudiAlg.Algs._plot2D_ (   s,
a 
)
private
The basic method to fill (book-on-demand) 2D-histogram

The histogram will be created/booked dautomatically according to the
specifications:

   - literal or numerical ID (optional)
   - title
   - low X-edge
   - high X-edge
   - low Y-edge
   - high Y-edge
   - number of X-bins (default is 50)
   - number of Y-bins (default is 50)

The reference to the histogram is returned and could be used for later manipulations

Definition at line 1010 of file Algs.py.

1010 def _plot2D_(s, *a):
1011  """
1012  The basic method to fill (book-on-demand) 2D-histogram
1013 
1014  The histogram will be created/booked dautomatically according to the
1015  specifications:
1016 
1017  - literal or numerical ID (optional)
1018  - title
1019  - low X-edge
1020  - high X-edge
1021  - low Y-edge
1022  - high Y-edge
1023  - number of X-bins (default is 50)
1024  - number of Y-bins (default is 50)
1025 
1026  The reference to the histogram is returned and could be used for later manipulations
1027 
1028  """
1029  return HistoDecorator.plot2D(s, *a)
1030 
1031 
1032 # =============================================================================
1033 
1034 

◆ _plot3D_()

def GaudiAlg.Algs._plot3D_ (   s,
a 
)
private
The basic method to fill (book-on-demand) 3D-histogram

The histogram will be created/booked dautomatically according to the
specifications:

   - literal or numerical ID (optional)
   - title
   - low X-edge
   - high X-edge
   - low Y-edge
   - high Y-edge
   - low Z-edge
   - high Z-edge
   - number of X-bins (default is 10)
   - number of Y-bins (default is 10)
   - number of Y-bins (default is 10)

The reference to the histogram is returned and could be used for later manipulations

Definition at line 1035 of file Algs.py.

1035 def _plot3D_(s, *a):
1036  """
1037  The basic method to fill (book-on-demand) 3D-histogram
1038 
1039  The histogram will be created/booked dautomatically according to the
1040  specifications:
1041 
1042  - literal or numerical ID (optional)
1043  - title
1044  - low X-edge
1045  - high X-edge
1046  - low Y-edge
1047  - high Y-edge
1048  - low Z-edge
1049  - high Z-edge
1050  - number of X-bins (default is 10)
1051  - number of Y-bins (default is 10)
1052  - number of Y-bins (default is 10)
1053 
1054  The reference to the histogram is returned and could be used for later manipulations
1055 
1056  """
1057  return HistoDecorator.plot3D(s, *a)
1058 
1059 
1060 # =============================================================================
1061 
1062 

◆ _profile1D_()

def GaudiAlg.Algs._profile1D_ (   s,
a 
)
private
The basic method to fill (book-on-demand) 1D profile histogram

The profile histogram will be created/booked dautomatically
according to the specifications:

   - literal or numerical ID (optional)
   - title
   - low X-edge
   - high X-edge
   - number of X-bins (default is 100)

The reference to the histogram is returned and could be used for later manipulations

Definition at line 1063 of file Algs.py.

1063 def _profile1D_(s, *a):
1064  """
1065  The basic method to fill (book-on-demand) 1D profile histogram
1066 
1067  The profile histogram will be created/booked dautomatically
1068  according to the specifications:
1069 
1070  - literal or numerical ID (optional)
1071  - title
1072  - low X-edge
1073  - high X-edge
1074  - number of X-bins (default is 100)
1075 
1076  The reference to the histogram is returned and could be used for later manipulations
1077 
1078  """
1079  return HistoDecorator.profile1D(s, *a)
1080 
1081 
1082 # =============================================================================
1083 
1084 

◆ _profile2D_()

def GaudiAlg.Algs._profile2D_ (   s,
a 
)
private
The basic method to fill (book-on-demand) 2D profile histiogram

The profile histogram will be created/booked automatically
according to the specifications:

   - literal or numerical ID (optional)
   - title
   - low X-edge
   - high X-edge
   - low Y-edge
   - high Y-edge
   - number of X-bins (default is 50)
   - number of Y-bins (default is 50)

The reference to the histogram is returned and could be used for later manipulations

Definition at line 1085 of file Algs.py.

1085 def _profile2D_(s, *a):
1086  """
1087  The basic method to fill (book-on-demand) 2D profile histiogram
1088 
1089  The profile histogram will be created/booked automatically
1090  according to the specifications:
1091 
1092  - literal or numerical ID (optional)
1093  - title
1094  - low X-edge
1095  - high X-edge
1096  - low Y-edge
1097  - high Y-edge
1098  - number of X-bins (default is 50)
1099  - number of Y-bins (default is 50)
1100 
1101  The reference to the histogram is returned and could be used for later manipulations
1102 
1103  """
1104  return HistoDecorator.profile2D(s, *a)
1105 
1106 
1107 # =============================================================================
1108 
1109 _plot1D_.__doc__ += "\n" + HistoDecorator.plot1D.__doc__
1110 _plot2D_.__doc__ += "\n" + HistoDecorator.plot2D.__doc__
1111 _plot3D_.__doc__ += "\n" + HistoDecorator.plot3D.__doc__
1112 _profile1D_.__doc__ += "\n" + HistoDecorator.profile1D.__doc__
1113 _profile2D_.__doc__ += "\n" + HistoDecorator.profile2D.__doc__
1114 
1115 

◆ _service_()

def GaudiAlg.Algs._service_ (   self,
  interface,
  name,
  create = True 
)
private
Useful method to locate a service:

Usage:

ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )

Definition at line 179 of file Algs.py.

179 def _service_(self, interface, name, create=True):
180  """
181  Useful method to locate a service:
182 
183  Usage:
184 
185  ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
186 
187  """
188  if not interface:
189  interface = cpp.IInterface
190  _svc = AlgDecorator.svc_(self, name, create)
191  if not _svc:
192  return None
193  _svc = InterfaceCast(interface)(_svc)
194  if not _svc:
195  self.Warning("Invalid cast to interface %s" % interface)
196  return None
197  return _svc
198 
199 
200 # =============================================================================
201 # The constructor from unique algorithm instance name,
202 #
203 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
204 # @date 2006-11-26
205 
206 

◆ _set_attr_()

def GaudiAlg.Algs._set_attr_ (   self,
  pname,
  pvalue 
)
private
Set the attribute (or property) :
- if the attribute name corresponds to the property name, the property is updated

Definition at line 558 of file Algs.py.

558 def _set_attr_(self, pname, pvalue):
559  """
560  Set the attribute (or property) :
561  - if the attribute name corresponds to the property name, the property is updated
562  """
563  if not self.hasProperty(pname):
564  self.__dict__[pname] = pvalue
565  else:
566  self._ialg.__setattr__(pname, pvalue)
567 
568 

◆ _setProperty_()

def GaudiAlg.Algs._setProperty_ (   self,
  pname,
  pvalue 
)
private
Set the property from the value

Definition at line 524 of file Algs.py.

524 def _setProperty_(self, pname, pvalue):
525  """
526  Set the property from the value
527  """
528  if not self.hasProperty(pname):
529  raise AttributeError("property %s does not exist" % pname)
530  return self._ialg.__setattr__(pname, pvalue)
531 
532 
533 # =============================================================================
534 # get the attribute or property
535 
536 

◆ _start_()

def GaudiAlg.Algs._start_ (   self)
private
The stub 'start' method needed by the internal implementation of PyAlg<>.

Definition at line 948 of file Algs.py.

948 def _start_(self):
949  """
950  The stub 'start' method needed by the internal implementation of PyAlg<>.
951  """
952  # return self._Base.start_(self)
953  return SUCCESS
954 
955 
956 GaudiAlgo.start = _start_
957 HistoAlgo.start = _start_
958 TupleAlgo.start = _start_
959 
960 

◆ _stop_()

def GaudiAlg.Algs._stop_ (   self)
private
The stub 'stop' method needed by the internal implementation of PyAlg<>.

Definition at line 973 of file Algs.py.

973 def _stop_(self):
974  """
975  The stub 'stop' method needed by the internal implementation of PyAlg<>.
976  """
977  # return self._Base.stop_(self)
978  return SUCCESS
979 
980 
981 GaudiAlgo.stop = _stop_
982 HistoAlgo.stop = _stop_
983 TupleAlgo.stop = _stop_
984 
985 # =============================================================================
986 
987 

◆ _success_()

def GaudiAlg.Algs._success_ (   self)
private

Definition at line 494 of file Algs.py.

494 def _success_(self):
495  return SUCCESS
496 
497 
498 # =============================================================================
499 # check the existence of the property with the given name

◆ _t_array_()

def GaudiAlg.Algs._t_array_ (   s,
a 
)
private
Fill the fixed-size array column

Definition at line 1265 of file Algs.py.

1265 def _t_array_(s, *a):
1266  """
1267  Fill the fixed-size array column
1268  """
1269  return _Dec.array(s, *a)
1270 
1271 

◆ _t_column_()

def GaudiAlg.Algs._t_column_ (   s,
a 
)
private
Fill the certain column to n-tuple

Definition at line 1244 of file Algs.py.

1244 def _t_column_(s, *a):
1245  """
1246  Fill the certain column to n-tuple
1247  """
1248  return _Dec.column(s, *a)
1249 
1250 

◆ _t_column_ll_()

def GaudiAlg.Algs._t_column_ll_ (   s,
a 
)
private
Fill the 'long long' column

Definition at line 1251 of file Algs.py.

1251 def _t_column_ll_(s, *a):
1252  """
1253  Fill the 'long long' column
1254  """
1255  return _Dec.column_ll(s, *a)
1256 
1257 

◆ _t_column_ull_()

def GaudiAlg.Algs._t_column_ull_ (   s,
a 
)
private
Fill the 'unsigned long long' column

Definition at line 1258 of file Algs.py.

1258 def _t_column_ull_(s, *a):
1259  """
1260  Fill the 'unsigned long long' column
1261  """
1262  return _Dec.column_ull(s, *a)
1263 
1264 

◆ _t_farray_()

def GaudiAlg.Algs._t_farray_ (   s,
a 
)
private
Fill the floating-size array column

Definition at line 1279 of file Algs.py.

1279 def _t_farray_(s, *a):
1280  """
1281  Fill the floating-size array column
1282  """
1283  return _Dec.farray(s, *a)
1284 
1285 

◆ _t_fmatrix_()

def GaudiAlg.Algs._t_fmatrix_ (   s,
a 
)
private
Fill the floating-size matrix column

Definition at line 1286 of file Algs.py.

1286 def _t_fmatrix_(s, *a):
1287  """
1288  Fill the floating-size matrix column
1289  """
1290  return _Dec.fmatrix(s, *a)
1291 
1292 
1293 _t_nTuple_.__doc__ += "\n" + _Dec.nTuple.__doc__
1294 _t_ntuple_.__doc__ += "\n" + _Dec.ntuple.__doc__
1295 _t_valid_.__doc__ += "\n" + _Dec.valid.__doc__
1296 _t_write_.__doc__ += "\n" + _Dec.write.__doc__
1297 _t_column_.__doc__ += "\n" + _Dec.column.__doc__
1298 _t_column_ll_.__doc__ += "\n" + _Dec.column_ll.__doc__
1299 _t_column_ull_.__doc__ += "\n" + _Dec.column_ull.__doc__
1300 _t_array_.__doc__ += "\n" + _Dec.array.__doc__
1301 _t_matrix_.__doc__ += "\n" + _Dec.matrix.__doc__
1302 _t_farray_.__doc__ += "\n" + _Dec.farray.__doc__
1303 _t_fmatrix_.__doc__ += "\n" + _Dec.fmatrix.__doc__
1304 
1305 Tuple.nTuple = _t_nTuple_
1306 Tuple.ntuple = _t_ntuple_
1307 Tuple.valid = _t_valid_
1308 Tuple.write = _t_write_
1309 Tuple.column = _t_column_
1310 Tuple.column_ll = _t_column_ll_
1311 Tuple.column_ull = _t_column_ull_
1312 Tuple.array = _t_array_
1313 Tuple.matrix = _t_matrix_
1314 Tuple.farray = _t_farray_
1315 Tuple.fmatrix = _t_fmatrix_
1316 

◆ _t_matrix_()

def GaudiAlg.Algs._t_matrix_ (   s,
a 
)
private
Fill the fixed-size matrix column

Definition at line 1272 of file Algs.py.

1272 def _t_matrix_(s, *a):
1273  """
1274  Fill the fixed-size matrix column
1275  """
1276  return _Dec.matrix(s, *a)
1277 
1278 

◆ _t_nTuple_()

def GaudiAlg.Algs._t_nTuple_ (   s,
a 
)
private
Access to underlying INTuple object

Definition at line 1216 of file Algs.py.

1216 def _t_nTuple_(s, *a):
1217  """
1218  Access to underlying INTuple object
1219  """
1220  return _Dec.nTuple(s, *a)
1221 
1222 

◆ _t_ntuple_()

def GaudiAlg.Algs._t_ntuple_ (   s,
a 
)
private
Access to underlying NTuple::Tuple object

Definition at line 1223 of file Algs.py.

1223 def _t_ntuple_(s, *a):
1224  """
1225  Access to underlying NTuple::Tuple object
1226  """
1227  return _Dec.ntuple(s, *a)
1228 
1229 

◆ _t_valid_()

def GaudiAlg.Algs._t_valid_ (   s,
a 
)
private
Valid NTuple::Tuple object?

Definition at line 1230 of file Algs.py.

1230 def _t_valid_(s, *a):
1231  """
1232  Valid NTuple::Tuple object?
1233  """
1234  return _Dec.valid(s, *a)
1235 
1236 

◆ _t_write_()

def GaudiAlg.Algs._t_write_ (   s,
a 
)
private
Commit the row/record to n-tuple

Definition at line 1237 of file Algs.py.

1237 def _t_write_(s, *a):
1238  """
1239  Commit the row/record to n-tuple
1240  """
1241  return _Dec.write(s, *a)
1242 
1243 

◆ _tool_()

def GaudiAlg.Algs._tool_ (   self,
  interface,
  typename,
  name = None,
  parent = None,
  create = True 
)
private
Useful method to locate the tool a certain

Usage:

# locate public tool
t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator')
# locate private tool
t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self)
# locate public tool with defined name
t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1')
# locate private tool with defined name
t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self)
# locate public tool with defined name
t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3')
# locate private tool with defined name
t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self)

Definition at line 128 of file Algs.py.

128 def _tool_(self, interface, typename, name=None, parent=None, create=True):
129  """
130  Useful method to locate the tool a certain
131 
132  Usage:
133 
134  # locate public tool
135  t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator')
136  # locate private tool
137  t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self)
138  # locate public tool with defined name
139  t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1')
140  # locate private tool with defined name
141  t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self)
142  # locate public tool with defined name
143  t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3')
144  # locate private tool with defined name
145  t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self)
146 
147  """
148  if not interface:
149  interface = cpp.IAlgTool
150  if not parent:
151  parent = self
152  if name:
153  typename += "/" + name
154  _tool = AlgDecorator.tool_(self, typename, parent, create)
155  if not _tool:
156  return None
157  _tool = InterfaceCast(interface)(_tool)
158  if not _tool:
159  self.Warning("Invalid cast to interface %s" % interface)
160  return None
161  return _tool
162 
163 
164 # =============================================================================
165 # Useful method to locate a service:
166 #
167 # Usage:
168 #
169 # @code
170 #
171 # ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
172 #
173 # @endcode
174 #
175 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
176 # @date 2006-11-26
177 
178 

◆ _Tools_a_()

def GaudiAlg.Algs._Tools_a_ (   self)
private
Retrieve the list of tools,
    aquired by component through GaudiCommon<TYPE> base:

>>> alg   = ...             ## get the algorithm
>>> tools = alg.Tools()     ## get the tools
>>> for tool in tools :
...        print(tool)

Definition at line 1400 of file Algs.py.

1400 def _Tools_a_(self):
1401  """
1402  Retrieve the list of tools,
1403  aquired by component through GaudiCommon<TYPE> base:
1404 
1405  >>> alg = ... ## get the algorithm
1406  >>> tools = alg.Tools() ## get the tools
1407  >>> for tool in tools :
1408  ... print(tool)
1409 
1410  """
1411  _cmp = getattr(self, "_ialg")
1412  if not _cmp:
1413  self.retrieveInterface()
1414  _cmp = getattr(self, "_ialg")
1415  return _get_all_tools_(_cmp, "_tools_a_")
1416 
1417 
1418 # =============================================================================
1419 
1420 

◆ _Tools_t_()

def GaudiAlg.Algs._Tools_t_ (   self)
private
Retrieve the list of tools,
    aquired by component through GaudiCommon<TYPE> base:

>>> tool  = ...              ## get the tool
>>> tools = tool.Tools()     ## get the tools
>>> for t in tools :
...        print(t)

Definition at line 1421 of file Algs.py.

1421 def _Tools_t_(self):
1422  """
1423  Retrieve the list of tools,
1424  aquired by component through GaudiCommon<TYPE> base:
1425 
1426  >>> tool = ... ## get the tool
1427  >>> tools = tool.Tools() ## get the tools
1428  >>> for t in tools :
1429  ... print(t)
1430 
1431  """
1432  _cmp = getattr(self, "_itool")
1433  if not _cmp:
1434  self.retrieveInterface()
1435  _cmp = getattr(self, "_itool")
1436  return _get_all_tools_(_cmp, "_tools_t_")
1437 
1438 
1439 # =============================================================================
1440 # get the counter
1441 # =============================================================================
1442 
1443 

◆ mapvct()

def GaudiAlg.Algs.mapvct (   func,
  sequence,
  ovct = None 
)
Helper function to fill histogram/ntuple using 'map'-operation

Definition at line 1360 of file Algs.py.

1360 def mapvct(func, sequence, ovct=None):
1361  """Helper function to fill histogram/ntuple using 'map'-operation"""
1362  if not ovct:
1363  vct = GaudiPython.Vector
1364  else:
1365  vct = ovct
1366  if hasattr(sequence, "size"):
1367  vct.reserve(vct.size() + sequence.size())
1368  elif hasattr(sequence, "__len__"):
1369  vct.reserve(vct.size() + len(sequence))
1370  for object in sequence:
1371  vct.push_back(func(object))
1372  if not ovct:
1373  return vct
1374 
1375 
1376 # =============================================================================
1377 
1378 
1379 # =============================================================================
1380 # get the list of tools
1381 # =============================================================================

Variable Documentation

◆ __all__

tuple GaudiAlg.Algs.__all__
private
Initial value:
1 = (
2  "GaudiAlgo", # base class for algorithms
3  "HistoAlgo", # base class for histo-related algorithms
4  "TupleAlgo", # base class for tuple-related algorithms
5  "Tuple", # N-Tuple
6  "HistoID", # ID for N-tuples
7  "TupleID", # ID for Histograms
8  "aida2root", # AIDA -> ROOT converter
9  "SUCCESS", # status code
10 )

Definition at line 52 of file Algs.py.

◆ __author__

string GaudiAlg.Algs.__author__ = "Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr"
private

Definition at line 48 of file Algs.py.

◆ _alg_map_

GaudiAlg.Algs._alg_map_
private

Definition at line 1317 of file Algs.py.

◆ _Dec

GaudiAlg.Algs._Dec
private

Definition at line 1175 of file Algs.py.

◆ _detSvc_

GaudiAlg.Algs._detSvc_
private

Definition at line 248 of file Algs.py.

◆ _evtcolSvc_

GaudiAlg.Algs._evtcolSvc_
private

Definition at line 300 of file Algs.py.

◆ _evtSvc_

GaudiAlg.Algs._evtSvc_
private

Definition at line 244 of file Algs.py.

◆ _GaudiAlgorithm

GaudiAlg.Algs._GaudiAlgorithm
private

Definition at line 569 of file Algs.py.

◆ _GaudiHistoAlg

GaudiAlg.Algs._GaudiHistoAlg
private

Definition at line 570 of file Algs.py.

◆ _GaudiTupleAlg

GaudiAlg.Algs._GaudiTupleAlg
private

Definition at line 571 of file Algs.py.

◆ _histoSvc_

GaudiAlg.Algs._histoSvc_
private

Definition at line 271 of file Algs.py.

◆ _ialg

GaudiAlg.Algs._ialg
private

Definition at line 217 of file Algs.py.

◆ _ntupleSvc_

GaudiAlg.Algs._ntupleSvc_
private

Definition at line 295 of file Algs.py.

◆ AlgDecorator

GaudiAlg.Algs.AlgDecorator

Definition at line 97 of file Algs.py.

◆ column

GaudiAlg.Algs.column

Definition at line 1213 of file Algs.py.

◆ HID

GaudiAlg.Algs.HID

Definition at line 91 of file Algs.py.

◆ HistoDecorator

GaudiAlg.Algs.HistoDecorator

Definition at line 98 of file Algs.py.

◆ HistoID

GaudiAlg.Algs.HistoID

Definition at line 92 of file Algs.py.

◆ iAlgorithm

GaudiAlg.Algs.iAlgorithm = GaudiPython.Bindings.iAlgorithm

Definition at line 66 of file Algs.py.

◆ iAlgTool

GaudiAlg.Algs.iAlgTool = GaudiPython.Bindings.iAlgTool

Definition at line 67 of file Algs.py.

◆ Matrix

GaudiAlg.Algs.Matrix

Definition at line 88 of file Algs.py.

◆ std

GaudiAlg.Algs.std

Definition at line 83 of file Algs.py.

◆ TID

GaudiAlg.Algs.TID

Definition at line 93 of file Algs.py.

◆ Tuple

GaudiAlg.Algs.Tuple

Definition at line 1174 of file Algs.py.

◆ TupleAlgDecorator

GaudiAlg.Algs.TupleAlgDecorator

Definition at line 99 of file Algs.py.

◆ TupleDecorator

GaudiAlg.Algs.TupleDecorator

Definition at line 100 of file Algs.py.

◆ TupleID

GaudiAlg.Algs.TupleID

Definition at line 94 of file Algs.py.

◆ Vector

GaudiAlg.Algs.Vector

Definition at line 86 of file Algs.py.

GaudiAlg.Algs._get
def _get(self, location)
Definition: Algs.py:416
GaudiAlg.Algs._success_
def _success_(self)
Definition: Algs.py:494
GaudiPartProp.Service.AppMgr
AppMgr
Definition: Service.py:41
GaudiAlg.Algs.iAlgTool
iAlgTool
Definition: Algs.py:67
GaudiAlg.Algs._nTuple_
def _nTuple_(s, *a)
Definition: Algs.py:1134
GaudiAlg.Algs._start_
def _start_(self)
Definition: Algs.py:948
GaudiAlg.Algs._decorate_algs_
def _decorate_algs_(klasses)
Definition: Algs.py:1341
GaudiAlg.Algs._evtCol_
def _evtCol_(s, *a)
Definition: Algs.py:1144
std::vector
STL class.
GaudiAlg.Algs.mapvct
def mapvct(func, sequence, ovct=None)
Definition: Algs.py:1360
GaudiAlg.Algs._hasProperty_
def _hasProperty_(self, pname)
Definition: Algs.py:500
GaudiPartProp.decorators.__getattr__
__getattr__
decorate the attribute access for Gaudi.ParticleProperty
Definition: decorators.py:186
GaudiAlg.Algs._get_counter_
def _get_counter_(self, method, name)
Definition: Algs.py:1444
GaudiAlg.Algs._detSvc
def _detSvc(self, location=None)
Definition: Algs.py:360
GaudiPartProp.Service.InterfaceCast
InterfaceCast
Definition: Service.py:40
GaudiAlg.Algs._t_column_
def _t_column_(s, *a)
Definition: Algs.py:1244
GaudiAlg.Algs._Counter_t_
def _Counter_t_(self, name)
Definition: Algs.py:1474
GaudiAlg.Algs._help_
def _help_()
Definition: Algs.py:1617
GaudiAlg.Algs._decorate_tuples_
def _decorate_tuples_(klasses)
Definition: Algs.py:1155
GaudiAlg.Algs._service_
def _service_(self, interface, name, create=True)
Definition: Algs.py:179
GaudiAlg.Algs.iAlgorithm
iAlgorithm
Definition: Algs.py:66
GaudiAlg.Algs._t_ntuple_
def _t_ntuple_(s, *a)
Definition: Algs.py:1223
GaudiAlg.Algs._decorate_plots_
def _decorate_plots_(klasses)
Definition: Algs.py:1116
GaudiAlg.Algs._Tools_a_
def _Tools_a_(self)
Definition: Algs.py:1400
GaudiAlg.Algs._t_column_ull_
def _t_column_ull_(s, *a)
Definition: Algs.py:1258
GaudiAlg.Algs._evtcolSvc
def _evtcolSvc(self)
Definition: Algs.py:473
GaudiAlg.Algs._histoSvc
def _histoSvc(self, address=None)
Definition: Algs.py:395
GaudiAlg.Algs._t_matrix_
def _t_matrix_(s, *a)
Definition: Algs.py:1272
GaudiAlg.Algs._t_fmatrix_
def _t_fmatrix_(s, *a)
Definition: Algs.py:1286
GaudiAlg.Algs._get_all_tools_
def _get_all_tools_(self, method)
Definition: Algs.py:1382
GaudiAlg.Algs._tool_
def _tool_(self, interface, typename, name=None, parent=None, create=True)
Definition: Algs.py:128
GaudiAlg.Algs._t_write_
def _t_write_(s, *a)
Definition: Algs.py:1237
GaudiPluginService.cpluginsvc.func
func
Definition: cpluginsvc.py:235
GaudiAlg.Algs._plot1D_
def _plot1D_(s, *a)
Definition: Algs.py:988
GaudiAlg.Algs._initialize_tuple_
def _initialize_tuple_(self)
Definition: Algs.py:283
GaudiAlg.Algs._plot2D_
def _plot2D_(s, *a)
Definition: Algs.py:1010
GaudiAlg.Algs._get_all_histos_
def _get_all_histos_(component, method, name)
Definition: Algs.py:1501
GaudiAlg.Algs._ntupleSvc
def _ntupleSvc(self)
Definition: Algs.py:462
GaudiAlg.Algs._get_attr_
def _get_attr_(self, pname)
Definition: Algs.py:537
GaudiAlg.Algs._t_nTuple_
def _t_nTuple_(s, *a)
Definition: Algs.py:1216
GaudiAlg.Algs._finalize_
def _finalize_(self)
Definition: Algs.py:482
GaudiAlg.Algs._execute_
def _execute_(self)
Definition: Algs.py:961
GaudiAlg.Algs._getDet
def _getDet(self, location)
Definition: Algs.py:427
GaudiAlg.Algs._set_attr_
def _set_attr_(self, pname, pvalue)
Definition: Algs.py:558
GaudiAlg.Algs._profile1D_
def _profile1D_(s, *a)
Definition: Algs.py:1063
GaudiAlg.Algs._setProperty_
def _setProperty_(self, pname, pvalue)
Definition: Algs.py:524
gaudirun.type
type
Definition: gaudirun.py:160
GaudiAlg.Algs._t_array_
def _t_array_(s, *a)
Definition: Algs.py:1265
GaudiAlg.Algs._t_farray_
def _t_farray_(s, *a)
Definition: Algs.py:1279
GaudiAlg.Algs._Tools_t_
def _Tools_t_(self)
Definition: Algs.py:1421
GaudiAlg.Algs._stop_
def _stop_(self)
Definition: Algs.py:973
GaudiAlg.Algs._initialize_
def _initialize_(self)
Definition: Algs.py:233
GaudiAlg.Algs._profile2D_
def _profile2D_(s, *a)
Definition: Algs.py:1085
GaudiAlg.Algs._Histos_t_
def _Histos_t_(self, name=None)
Definition: Algs.py:1570
GaudiAlg.Algs._exist_
def _exist_(self, location, rootInTES=True)
Definition: Algs.py:450
GaudiAlg.Algs._evtSvc
def _evtSvc(self, location=None)
Definition: Algs.py:324
GaudiAlg.Algs._initialize_histo_
def _initialize_histo_(self)
Definition: Algs.py:260
GaudiAlg.Algs._t_valid_
def _t_valid_(s, *a)
Definition: Algs.py:1230
GaudiAlg.Algs._t_column_ll_
def _t_column_ll_(s, *a)
Definition: Algs.py:1251
GaudiAlg.Algs._Histos_a_
def _Histos_a_(self, name=None)
Definition: Algs.py:1544
GaudiAlg.Algs._init_
def _init_(self, name, **args)
Definition: Algs.py:207
GaudiAlg.Algs._Counter_a_
def _Counter_a_(self, name)
Definition: Algs.py:1455
Gaudi::Functional::details::zip::range
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
Definition: details.h:98
GaudiAlg.Algs._getProperty_
def _getProperty_(self, pname)
Definition: Algs.py:511
GaudiAlg.Algs._get_
def _get_(self, location, rootInTES=True)
Definition: Algs.py:438
GaudiAlg.Algs._plot3D_
def _plot3D_(s, *a)
Definition: Algs.py:1035