The Gaudi Framework  v38r0 (2143aa4c)
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 = cpp.std
 
 Vector = std.vector("double")
 
 Matrix = std.vector("std::vector<double>")
 
 HID = cpp.GaudiAlg.ID
 
 HistoID = HID
 
 TID = HID
 
 TupleID = TID
 
 AlgDecorator = cpp.GaudiPython.AlgDecorator
 
 HistoDecorator = cpp.GaudiPython.HistoDecorator
 
 TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator
 
 TupleDecorator = cpp.GaudiPython.TupleDecorator
 
 _GaudiAlgorithm = cpp.GaudiPython.PyAlg("GaudiAlgorithm")
 
 _GaudiHistoAlg = cpp.GaudiPython.PyAlg("GaudiHistoAlg")
 
 _GaudiTupleAlg = cpp.GaudiPython.PyAlg("GaudiTupleAlg")
 
 Tuple = cpp.Tuples.Tuple
 
 _Dec = TupleDecorator
 
 column
 
dictionary _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 1454 of file Algs.py.

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

◆ _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 1473 of file Algs.py.

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

◆ _decorate_algs_()

def GaudiAlg.Algs._decorate_algs_ (   klasses)
private

Definition at line 1340 of file Algs.py.

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

◆ _decorate_plots_()

def GaudiAlg.Algs._decorate_plots_ (   klasses)
private

Definition at line 1115 of file Algs.py.

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

◆ _decorate_tuples_()

def GaudiAlg.Algs._decorate_tuples_ (   klasses)
private

Definition at line 1154 of file Algs.py.

1154 def _decorate_tuples_(klasses):
1155  t = type(klasses)
1156  if not issubclass(t, list) and not issubclass(t, tuple):
1157  klasses = [klasses]
1158  for klass in klasses:
1159  klass.nTuple = _nTuple_
1160  klass.evtCol = _evtCol_
1161  klass.ntupleSvc = _ntupleSvc
1162  klass.tupleSvc = _ntupleSvc
1163  klass.ntupSvc = _ntupleSvc
1164  klass.tupSvc = _ntupleSvc
1165  klass.evtColSvc = _evtcolSvc
1166  klass.evtcolSvc = _evtcolSvc
1167 
1168 
1169 # ==========================================================
1170 _decorate_tuples_(TupleAlgo)
1171 
1172 # "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 359 of file Algs.py.

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

◆ _evtCol_()

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

Definition at line 1143 of file Algs.py.

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

◆ _evtcolSvc()

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

Definition at line 472 of file Algs.py.

472 def _evtcolSvc(self):
473  """
474  Trivial function to access Event Collection Service
475  """
476  return self._evtcolSvc_
477 
478 
479 # =============================================================================
480 # 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 323 of file Algs.py.

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

◆ _execute_()

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

Definition at line 960 of file Algs.py.

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

◆ _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 449 of file Algs.py.

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

◆ _finalize_()

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

Definition at line 481 of file Algs.py.

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

◆ _get()

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

Definition at line 415 of file Algs.py.

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

◆ _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 437 of file Algs.py.

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

◆ _get_all_histos_()

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

Definition at line 1500 of file Algs.py.

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

◆ _get_all_tools_()

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

Definition at line 1381 of file Algs.py.

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

◆ _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 536 of file Algs.py.

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

◆ _get_counter_()

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

Definition at line 1443 of file Algs.py.

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

◆ _getDet()

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

Definition at line 426 of file Algs.py.

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

◆ _getProperty_()

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

Definition at line 510 of file Algs.py.

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

◆ _hasProperty_()

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

Definition at line 499 of file Algs.py.

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

◆ _help_()

def GaudiAlg.Algs._help_ ( )
private

Definition at line 1616 of file Algs.py.

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

◆ _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 1543 of file Algs.py.

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

◆ _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 1569 of file Algs.py.

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

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

◆ _init_()

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

Definition at line 206 of file Algs.py.

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

◆ _initialize_()

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

Definition at line 232 of file Algs.py.

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

◆ _initialize_histo_()

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

Definition at line 259 of file Algs.py.

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

◆ _initialize_tuple_()

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

Definition at line 282 of file Algs.py.

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

◆ _nTuple_()

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

Definition at line 1133 of file Algs.py.

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

◆ _ntupleSvc()

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

Definition at line 461 of file Algs.py.

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

◆ _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 987 of file Algs.py.

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

◆ _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 1009 of file Algs.py.

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

◆ _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 1034 of file Algs.py.

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

◆ _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 1062 of file Algs.py.

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

◆ _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 1084 of file Algs.py.

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

◆ _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 178 of file Algs.py.

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

◆ _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 557 of file Algs.py.

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

◆ _setProperty_()

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

Definition at line 523 of file Algs.py.

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

◆ _start_()

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

Definition at line 947 of file Algs.py.

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

◆ _stop_()

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

Definition at line 972 of file Algs.py.

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

◆ _success_()

def GaudiAlg.Algs._success_ (   self)
private

Definition at line 493 of file Algs.py.

493 def _success_(self):
494  return SUCCESS
495 
496 
497 # =============================================================================
498 # 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 1264 of file Algs.py.

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

◆ _t_column_()

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

Definition at line 1243 of file Algs.py.

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

◆ _t_column_ll_()

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

Definition at line 1250 of file Algs.py.

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

◆ _t_column_ull_()

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

Definition at line 1257 of file Algs.py.

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

◆ _t_farray_()

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

Definition at line 1278 of file Algs.py.

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

◆ _t_fmatrix_()

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

Definition at line 1285 of file Algs.py.

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

◆ _t_matrix_()

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

Definition at line 1271 of file Algs.py.

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

◆ _t_nTuple_()

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

Definition at line 1215 of file Algs.py.

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

◆ _t_ntuple_()

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

Definition at line 1222 of file Algs.py.

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

◆ _t_valid_()

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

Definition at line 1229 of file Algs.py.

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

◆ _t_write_()

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

Definition at line 1236 of file Algs.py.

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

◆ _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 127 of file Algs.py.

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

◆ _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 1399 of file Algs.py.

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

◆ _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 1420 of file Algs.py.

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

◆ mapvct()

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

Definition at line 1359 of file Algs.py.

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

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_

dictionary GaudiAlg.Algs._alg_map_
private
Initial value:
1 = {
2  "__init__": _init_, # constructor
3  "tool": _tool_, # service locator
4  "svc": _service_, # tool locator
5  "evtSvc": _evtSvc, # event data service
6  "eventSvc": _evtSvc, # event data service
7  "detSvc": _detSvc, # detector data service
8  "histoSvc": _histoSvc, # histogram data service
9  "histSvc": _histoSvc, # histogram data service
10  "get": _get, # access to event data
11  "get_": _get_, # access to event data
12  "exist_": _exist_, # check the event data
13  "getDet": _getDet, # access to detector data
14  "finalize": _finalize_, # algorithm finalization
15  #
16  "hasProperty": _hasProperty_, # check the existence of property with given name
17  "getProperty": _getProperty_, # get the property value with given name
18  "setProperty": _setProperty_, # set the property with given name
19  "__setattr__": _set_attr_, # set the attribute/property with given name
20  "__getattr__": _get_attr_, # set the attribute/property with given name
21 }

Definition at line 1316 of file Algs.py.

◆ _Dec

GaudiAlg.Algs._Dec = TupleDecorator
private

Definition at line 1174 of file Algs.py.

◆ _detSvc_

GaudiAlg.Algs._detSvc_
private

Definition at line 247 of file Algs.py.

◆ _evtcolSvc_

GaudiAlg.Algs._evtcolSvc_
private

Definition at line 299 of file Algs.py.

◆ _evtSvc_

GaudiAlg.Algs._evtSvc_
private

Definition at line 243 of file Algs.py.

◆ _GaudiAlgorithm

GaudiAlg.Algs._GaudiAlgorithm = cpp.GaudiPython.PyAlg("GaudiAlgorithm")
private

Definition at line 568 of file Algs.py.

◆ _GaudiHistoAlg

GaudiAlg.Algs._GaudiHistoAlg = cpp.GaudiPython.PyAlg("GaudiHistoAlg")
private

Definition at line 569 of file Algs.py.

◆ _GaudiTupleAlg

GaudiAlg.Algs._GaudiTupleAlg = cpp.GaudiPython.PyAlg("GaudiTupleAlg")
private

Definition at line 570 of file Algs.py.

◆ _histoSvc_

GaudiAlg.Algs._histoSvc_
private

Definition at line 270 of file Algs.py.

◆ _ialg

GaudiAlg.Algs._ialg
private

Definition at line 216 of file Algs.py.

◆ _ntupleSvc_

GaudiAlg.Algs._ntupleSvc_
private

Definition at line 294 of file Algs.py.

◆ AlgDecorator

GaudiAlg.Algs.AlgDecorator = cpp.GaudiPython.AlgDecorator

Definition at line 96 of file Algs.py.

◆ column

GaudiAlg.Algs.column

Definition at line 1212 of file Algs.py.

◆ HID

GaudiAlg.Algs.HID = cpp.GaudiAlg.ID

Definition at line 90 of file Algs.py.

◆ HistoDecorator

GaudiAlg.Algs.HistoDecorator = cpp.GaudiPython.HistoDecorator

Definition at line 97 of file Algs.py.

◆ HistoID

GaudiAlg.Algs.HistoID = HID

Definition at line 91 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 = std.vector("std::vector<double>")

Definition at line 87 of file Algs.py.

◆ std

GaudiAlg.Algs.std = cpp.std

Definition at line 82 of file Algs.py.

◆ TID

GaudiAlg.Algs.TID = HID

Definition at line 92 of file Algs.py.

◆ Tuple

GaudiAlg.Algs.Tuple = cpp.Tuples.Tuple

Definition at line 1173 of file Algs.py.

◆ TupleAlgDecorator

GaudiAlg.Algs.TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator

Definition at line 98 of file Algs.py.

◆ TupleDecorator

GaudiAlg.Algs.TupleDecorator = cpp.GaudiPython.TupleDecorator

Definition at line 99 of file Algs.py.

◆ TupleID

GaudiAlg.Algs.TupleID = TID

Definition at line 93 of file Algs.py.

◆ Vector

GaudiAlg.Algs.Vector = std.vector("double")

Definition at line 85 of file Algs.py.

GaudiAlg.Algs._get
def _get(self, location)
Definition: Algs.py:415
GaudiAlg.Algs._success_
def _success_(self)
Definition: Algs.py:493
GaudiPartProp.Service.AppMgr
AppMgr
Definition: Service.py:40
GaudiAlg.Algs.iAlgTool
iAlgTool
Definition: Algs.py:67
GaudiAlg.Algs._nTuple_
def _nTuple_(s, *a)
Definition: Algs.py:1133
GaudiAlg.Algs._start_
def _start_(self)
Definition: Algs.py:947
GaudiAlg.Algs._decorate_algs_
def _decorate_algs_(klasses)
Definition: Algs.py:1340
GaudiAlg.Algs._evtCol_
def _evtCol_(s, *a)
Definition: Algs.py:1143
std::vector
STL class.
GaudiAlg.Algs.mapvct
def mapvct(func, sequence, ovct=None)
Definition: Algs.py:1359
GaudiAlg.Algs._hasProperty_
def _hasProperty_(self, pname)
Definition: Algs.py:499
GaudiPartProp.decorators.__getattr__
__getattr__
decorate the attribute access for Gaudi.ParticleProperty
Definition: decorators.py:185
GaudiAlg.Algs._get_counter_
def _get_counter_(self, method, name)
Definition: Algs.py:1443
GaudiAlg.Algs._detSvc
def _detSvc(self, location=None)
Definition: Algs.py:359
GaudiPartProp.Service.InterfaceCast
InterfaceCast
Definition: Service.py:39
GaudiAlg.Algs._t_column_
def _t_column_(s, *a)
Definition: Algs.py:1243
GaudiAlg.Algs._Counter_t_
def _Counter_t_(self, name)
Definition: Algs.py:1473
GaudiAlg.Algs._help_
def _help_()
Definition: Algs.py:1616
GaudiAlg.Algs._decorate_tuples_
def _decorate_tuples_(klasses)
Definition: Algs.py:1154
GaudiAlg.Algs._service_
def _service_(self, interface, name, create=True)
Definition: Algs.py:178
GaudiAlg.Algs.iAlgorithm
iAlgorithm
Definition: Algs.py:66
GaudiAlg.Algs._t_ntuple_
def _t_ntuple_(s, *a)
Definition: Algs.py:1222
GaudiAlg.Algs._decorate_plots_
def _decorate_plots_(klasses)
Definition: Algs.py:1115
GaudiAlg.Algs._Tools_a_
def _Tools_a_(self)
Definition: Algs.py:1399
GaudiAlg.Algs._t_column_ull_
def _t_column_ull_(s, *a)
Definition: Algs.py:1257
GaudiAlg.Algs._evtcolSvc
def _evtcolSvc(self)
Definition: Algs.py:472
GaudiAlg.Algs._histoSvc
def _histoSvc(self, address=None)
Definition: Algs.py:394
GaudiAlg.Algs._t_matrix_
def _t_matrix_(s, *a)
Definition: Algs.py:1271
GaudiAlg.Algs._t_fmatrix_
def _t_fmatrix_(s, *a)
Definition: Algs.py:1285
GaudiAlg.Algs._get_all_tools_
def _get_all_tools_(self, method)
Definition: Algs.py:1381
GaudiAlg.Algs._tool_
def _tool_(self, interface, typename, name=None, parent=None, create=True)
Definition: Algs.py:127
GaudiAlg.Algs._t_write_
def _t_write_(s, *a)
Definition: Algs.py:1236
GaudiPluginService.cpluginsvc.func
func
Definition: cpluginsvc.py:235
GaudiAlg.Algs._plot1D_
def _plot1D_(s, *a)
Definition: Algs.py:987
GaudiAlg.Algs._initialize_tuple_
def _initialize_tuple_(self)
Definition: Algs.py:282
GaudiAlg.Algs._plot2D_
def _plot2D_(s, *a)
Definition: Algs.py:1009
GaudiAlg.Algs._get_all_histos_
def _get_all_histos_(component, method, name)
Definition: Algs.py:1500
GaudiAlg.Algs._ntupleSvc
def _ntupleSvc(self)
Definition: Algs.py:461
GaudiAlg.Algs._get_attr_
def _get_attr_(self, pname)
Definition: Algs.py:536
GaudiAlg.Algs._t_nTuple_
def _t_nTuple_(s, *a)
Definition: Algs.py:1215
GaudiAlg.Algs._finalize_
def _finalize_(self)
Definition: Algs.py:481
GaudiAlg.Algs._execute_
def _execute_(self)
Definition: Algs.py:960
GaudiAlg.Algs._getDet
def _getDet(self, location)
Definition: Algs.py:426
GaudiAlg.Algs._set_attr_
def _set_attr_(self, pname, pvalue)
Definition: Algs.py:557
GaudiAlg.Algs._profile1D_
def _profile1D_(s, *a)
Definition: Algs.py:1062
GaudiAlg.Algs._setProperty_
def _setProperty_(self, pname, pvalue)
Definition: Algs.py:523
gaudirun.type
type
Definition: gaudirun.py:160
GaudiAlg.Algs._t_array_
def _t_array_(s, *a)
Definition: Algs.py:1264
GaudiAlg.Algs._t_farray_
def _t_farray_(s, *a)
Definition: Algs.py:1278
GaudiAlg.Algs._Tools_t_
def _Tools_t_(self)
Definition: Algs.py:1420
GaudiAlg.Algs._stop_
def _stop_(self)
Definition: Algs.py:972
GaudiAlg.Algs._initialize_
def _initialize_(self)
Definition: Algs.py:232
GaudiAlg.Algs._profile2D_
def _profile2D_(s, *a)
Definition: Algs.py:1084
GaudiAlg.Algs._Histos_t_
def _Histos_t_(self, name=None)
Definition: Algs.py:1569
GaudiAlg.Algs._exist_
def _exist_(self, location, rootInTES=True)
Definition: Algs.py:449
GaudiAlg.Algs._evtSvc
def _evtSvc(self, location=None)
Definition: Algs.py:323
GaudiAlg.Algs._initialize_histo_
def _initialize_histo_(self)
Definition: Algs.py:259
GaudiAlg.Algs._t_valid_
def _t_valid_(s, *a)
Definition: Algs.py:1229
GaudiAlg.Algs._t_column_ll_
def _t_column_ll_(s, *a)
Definition: Algs.py:1250
GaudiAlg.Algs._Histos_a_
def _Histos_a_(self, name=None)
Definition: Algs.py:1543
GaudiAlg.Algs._init_
def _init_(self, name, **args)
Definition: Algs.py:206
GaudiAlg.Algs._Counter_a_
def _Counter_a_(self, name)
Definition: Algs.py:1454
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:510
GaudiAlg.Algs._get_
def _get_(self, location, rootInTES=True)
Definition: Algs.py:437
GaudiAlg.Algs._plot3D_
def _plot3D_(s, *a)
Definition: Algs.py:1034