The Gaudi Framework  v36r1 (3e2fb5a8)
GaudiPython.GaudiAlgs 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)
 
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 GaudiPython.GaudiAlgs._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 GaudiAlgs.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 GaudiPython.GaudiAlgs._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 GaudiAlgs.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 GaudiPython.GaudiAlgs._decorate_algs_ (   klasses)
private

Definition at line 1340 of file GaudiAlgs.py.

1340 def _decorate_algs_(klasses):
1341  t = type(klasses)
1342  if not issubclass(t, list) and \
1343  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 GaudiPython.GaudiAlgs._decorate_plots_ (   klasses)
private

Definition at line 1115 of file GaudiAlgs.py.

1115 def _decorate_plots_(klasses):
1116  t = type(klasses)
1117  if not issubclass(t, list) and \
1118  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 GaudiPython.GaudiAlgs._decorate_tuples_ (   klasses)
private

Definition at line 1155 of file GaudiAlgs.py.

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

◆ _detSvc()

def GaudiPython.GaudiAlgs._detSvc (   self)
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 361 of file GaudiAlgs.py.

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

◆ _evtCol_()

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

Definition at line 1144 of file GaudiAlgs.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 GaudiPython.GaudiAlgs._evtcolSvc (   self)
private
Trivial function to access Event Collection Service

Definition at line 474 of file GaudiAlgs.py.

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

◆ _evtSvc()

def GaudiPython.GaudiAlgs._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 325 of file GaudiAlgs.py.

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

◆ _execute_()

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

Definition at line 959 of file GaudiAlgs.py.

959 def _execute_(self):
960  """
961  The fictive 'execute' method, which MUST be overwitten by user
962  """
963  raise RuntimeError(
964  '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 GaudiPython.GaudiAlgs._exist_ (   self,
  location,
  rootInTES = True 
)
private
Check  the object in Transient Event Store using GaudiCommon machinery,
respecting RootInTES behaviour

Definition at line 451 of file GaudiAlgs.py.

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

◆ _finalize_()

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

Definition at line 483 of file GaudiAlgs.py.

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

◆ _get()

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

Definition at line 417 of file GaudiAlgs.py.

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

◆ _get_()

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

Definition at line 439 of file GaudiAlgs.py.

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

◆ _get_all_histos_()

def GaudiPython.GaudiAlgs._get_all_histos_ (   component,
  method,
  name 
)
private
Get All histogram form the component

Definition at line 1501 of file GaudiAlgs.py.

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

◆ _get_all_tools_()

def GaudiPython.GaudiAlgs._get_all_tools_ (   self,
  method 
)
private
Get all tools

Definition at line 1382 of file GaudiAlgs.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 GaudiPython.GaudiAlgs._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 538 of file GaudiAlgs.py.

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

◆ _get_counter_()

def GaudiPython.GaudiAlgs._get_counter_ (   self,
  method,
  name 
)
private
get the counter

Definition at line 1444 of file GaudiAlgs.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 GaudiPython.GaudiAlgs._getDet (   self,
  location 
)
private
Trivial function to access the data in TDS using data service

Definition at line 428 of file GaudiAlgs.py.

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

◆ _getProperty_()

def GaudiPython.GaudiAlgs._getProperty_ (   self,
  pname 
)
private
Get the property by name

Definition at line 512 of file GaudiAlgs.py.

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

◆ _hasProperty_()

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

Definition at line 501 of file GaudiAlgs.py.

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

◆ _help_()

def GaudiPython.GaudiAlgs._help_ ( )
private

Definition at line 1615 of file GaudiAlgs.py.

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

◆ _Histos_a_()

def GaudiPython.GaudiAlgs._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 1542 of file GaudiAlgs.py.

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

◆ _Histos_t_()

def GaudiPython.GaudiAlgs._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 1568 of file GaudiAlgs.py.

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

◆ _histoSvc()

def GaudiPython.GaudiAlgs._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 396 of file GaudiAlgs.py.

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

◆ _init_()

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

Definition at line 208 of file GaudiAlgs.py.

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

◆ _initialize_()

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

Definition at line 234 of file GaudiAlgs.py.

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

◆ _initialize_histo_()

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

Definition at line 261 of file GaudiAlgs.py.

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

◆ _initialize_tuple_()

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

Definition at line 284 of file GaudiAlgs.py.

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

◆ _nTuple_()

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

Definition at line 1134 of file GaudiAlgs.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 GaudiPython.GaudiAlgs._ntupleSvc (   self)
private
Trivial function to access N-Tuple Service

Definition at line 463 of file GaudiAlgs.py.

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

◆ _plot1D_()

def GaudiPython.GaudiAlgs._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 GaudiAlgs.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 GaudiPython.GaudiAlgs._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 GaudiAlgs.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 GaudiPython.GaudiAlgs._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 GaudiAlgs.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 GaudiPython.GaudiAlgs._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 GaudiAlgs.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 GaudiPython.GaudiAlgs._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 GaudiAlgs.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 GaudiPython.GaudiAlgs._service_ (   self,
  interface,
  name,
  create = True 
)
private
Useful method to locate a service:

Usage:

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

Definition at line 180 of file GaudiAlgs.py.

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

◆ _set_attr_()

def GaudiPython.GaudiAlgs._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 559 of file GaudiAlgs.py.

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

◆ _setProperty_()

def GaudiPython.GaudiAlgs._setProperty_ (   self,
  pname,
  pvalue 
)
private
Set the property from the value

Definition at line 525 of file GaudiAlgs.py.

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

◆ _start_()

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

Definition at line 946 of file GaudiAlgs.py.

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

◆ _stop_()

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

Definition at line 972 of file GaudiAlgs.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 GaudiPython.GaudiAlgs._success_ (   self)
private

Definition at line 495 of file GaudiAlgs.py.

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

◆ _t_array_()

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

Definition at line 1263 of file GaudiAlgs.py.

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

◆ _t_column_()

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

Definition at line 1242 of file GaudiAlgs.py.

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

◆ _t_column_ll_()

def GaudiPython.GaudiAlgs._t_column_ll_ (   s,
a 
)
private
Fill the 'long long' column

Definition at line 1249 of file GaudiAlgs.py.

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

◆ _t_column_ull_()

def GaudiPython.GaudiAlgs._t_column_ull_ (   s,
a 
)
private
Fill the 'unsigned long long' column

Definition at line 1256 of file GaudiAlgs.py.

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

◆ _t_farray_()

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

Definition at line 1277 of file GaudiAlgs.py.

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

◆ _t_fmatrix_()

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

Definition at line 1284 of file GaudiAlgs.py.

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

◆ _t_matrix_()

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

Definition at line 1270 of file GaudiAlgs.py.

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

◆ _t_nTuple_()

def GaudiPython.GaudiAlgs._t_nTuple_ (   s,
a 
)
private
Access to underlying INTuple object

Definition at line 1214 of file GaudiAlgs.py.

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

◆ _t_ntuple_()

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

Definition at line 1221 of file GaudiAlgs.py.

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

◆ _t_valid_()

def GaudiPython.GaudiAlgs._t_valid_ (   s,
a 
)
private
Valid NTuple::Tuple object?

Definition at line 1228 of file GaudiAlgs.py.

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

◆ _t_write_()

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

Definition at line 1235 of file GaudiAlgs.py.

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

◆ _tool_()

def GaudiPython.GaudiAlgs._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 129 of file GaudiAlgs.py.

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

◆ _Tools_a_()

def GaudiPython.GaudiAlgs._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 GaudiAlgs.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 GaudiPython.GaudiAlgs._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 GaudiAlgs.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 GaudiPython.GaudiAlgs.mapvct (   func,
  sequence,
  ovct = None 
)
Helper function to fill histogram/ntuple using 'map'-operation 

Definition at line 1360 of file GaudiAlgs.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 GaudiPython.GaudiAlgs.__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 GaudiAlgs.py.

◆ __author__

string GaudiPython.GaudiAlgs.__author__ = 'Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr'
private

Definition at line 48 of file GaudiAlgs.py.

◆ _alg_map_

GaudiPython.GaudiAlgs._alg_map_
private

Definition at line 1315 of file GaudiAlgs.py.

◆ _Dec

GaudiPython.GaudiAlgs._Dec
private

Definition at line 1176 of file GaudiAlgs.py.

◆ _detSvc_

GaudiPython.GaudiAlgs._detSvc_
private

Definition at line 249 of file GaudiAlgs.py.

◆ _evtcolSvc_

GaudiPython.GaudiAlgs._evtcolSvc_
private

Definition at line 301 of file GaudiAlgs.py.

◆ _evtSvc_

GaudiPython.GaudiAlgs._evtSvc_
private

Definition at line 245 of file GaudiAlgs.py.

◆ _GaudiAlgorithm

GaudiPython.GaudiAlgs._GaudiAlgorithm
private

Definition at line 570 of file GaudiAlgs.py.

◆ _GaudiHistoAlg

GaudiPython.GaudiAlgs._GaudiHistoAlg
private

Definition at line 571 of file GaudiAlgs.py.

◆ _GaudiTupleAlg

GaudiPython.GaudiAlgs._GaudiTupleAlg
private

Definition at line 572 of file GaudiAlgs.py.

◆ _histoSvc_

GaudiPython.GaudiAlgs._histoSvc_
private

Definition at line 272 of file GaudiAlgs.py.

◆ _ialg

GaudiPython.GaudiAlgs._ialg
private

Definition at line 218 of file GaudiAlgs.py.

◆ _ntupleSvc_

GaudiPython.GaudiAlgs._ntupleSvc_
private

Definition at line 296 of file GaudiAlgs.py.

◆ AlgDecorator

GaudiPython.GaudiAlgs.AlgDecorator

Definition at line 98 of file GaudiAlgs.py.

◆ column

GaudiPython.GaudiAlgs.column

Definition at line 1211 of file GaudiAlgs.py.

◆ HID

GaudiPython.GaudiAlgs.HID

Definition at line 92 of file GaudiAlgs.py.

◆ HistoDecorator

GaudiPython.GaudiAlgs.HistoDecorator

Definition at line 99 of file GaudiAlgs.py.

◆ HistoID

GaudiPython.GaudiAlgs.HistoID

Definition at line 93 of file GaudiAlgs.py.

◆ iAlgorithm

GaudiPython.GaudiAlgs.iAlgorithm = GaudiPython.Bindings.iAlgorithm

Definition at line 65 of file GaudiAlgs.py.

◆ iAlgTool

GaudiPython.GaudiAlgs.iAlgTool = GaudiPython.Bindings.iAlgTool

Definition at line 66 of file GaudiAlgs.py.

◆ Matrix

GaudiPython.GaudiAlgs.Matrix

Definition at line 89 of file GaudiAlgs.py.

◆ std

GaudiPython.GaudiAlgs.std

Definition at line 84 of file GaudiAlgs.py.

◆ TID

GaudiPython.GaudiAlgs.TID

Definition at line 94 of file GaudiAlgs.py.

◆ Tuple

GaudiPython.GaudiAlgs.Tuple

Definition at line 1175 of file GaudiAlgs.py.

◆ TupleAlgDecorator

GaudiPython.GaudiAlgs.TupleAlgDecorator

Definition at line 100 of file GaudiAlgs.py.

◆ TupleDecorator

GaudiPython.GaudiAlgs.TupleDecorator

Definition at line 101 of file GaudiAlgs.py.

◆ TupleID

GaudiPython.GaudiAlgs.TupleID

Definition at line 95 of file GaudiAlgs.py.

◆ Vector

GaudiPython.GaudiAlgs.Vector

Definition at line 87 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._get_all_tools_
def _get_all_tools_(self, method)
Definition: GaudiAlgs.py:1382
GaudiPython.GaudiAlgs._evtCol_
def _evtCol_(s, *a)
Definition: GaudiAlgs.py:1144
GaudiPython.GaudiAlgs._Tools_t_
def _Tools_t_(self)
Definition: GaudiAlgs.py:1421
GaudiPython.GaudiAlgs._plot2D_
def _plot2D_(s, *a)
Definition: GaudiAlgs.py:1009
GaudiPython.GaudiAlgs._stop_
def _stop_(self)
Definition: GaudiAlgs.py:972
GaudiPython.GaudiAlgs._finalize_
def _finalize_(self)
Definition: GaudiAlgs.py:483
GaudiPython.GaudiAlgs._t_column_
def _t_column_(s, *a)
Definition: GaudiAlgs.py:1242
GaudiPython.GaudiAlgs._t_nTuple_
def _t_nTuple_(s, *a)
Definition: GaudiAlgs.py:1214
GaudiPython.GaudiAlgs._hasProperty_
def _hasProperty_(self, pname)
Definition: GaudiAlgs.py:501
std::vector
STL class.
GaudiPython.GaudiAlgs._decorate_algs_
def _decorate_algs_(klasses)
Definition: GaudiAlgs.py:1340
GaudiPython.GaudiAlgs._decorate_plots_
def _decorate_plots_(klasses)
Definition: GaudiAlgs.py:1115
GaudiPython.GaudiAlgs.mapvct
def mapvct(func, sequence, ovct=None)
Definition: GaudiAlgs.py:1360
GaudiPython.GaudiAlgs._ntupleSvc
def _ntupleSvc(self)
Definition: GaudiAlgs.py:463
GaudiPython.GaudiAlgs._get_attr_
def _get_attr_(self, pname)
Definition: GaudiAlgs.py:538
GaudiPython.GaudiAlgs._t_write_
def _t_write_(s, *a)
Definition: GaudiAlgs.py:1235
GaudiPython.GaudiAlgs._set_attr_
def _set_attr_(self, pname, pvalue)
Definition: GaudiAlgs.py:559
GaudiPython.GaudiAlgs._start_
def _start_(self)
Definition: GaudiAlgs.py:946
GaudiPython.GaudiAlgs._initialize_histo_
def _initialize_histo_(self)
Definition: GaudiAlgs.py:261
GaudiPython.GaudiAlgs._profile2D_
def _profile2D_(s, *a)
Definition: GaudiAlgs.py:1084
GaudiPython.GaudiAlgs._profile1D_
def _profile1D_(s, *a)
Definition: GaudiAlgs.py:1062
GaudiPython.GaudiAlgs._Counter_t_
def _Counter_t_(self, name)
Definition: GaudiAlgs.py:1474
GaudiPython.GaudiAlgs.iAlgorithm
iAlgorithm
Definition: GaudiAlgs.py:65
GaudiPython.GaudiAlgs._get_counter_
def _get_counter_(self, method, name)
Definition: GaudiAlgs.py:1444
GaudiPython.GaudiAlgs._get_
def _get_(self, location, rootInTES=True)
Definition: GaudiAlgs.py:439
GaudiPython.GaudiAlgs._t_ntuple_
def _t_ntuple_(s, *a)
Definition: GaudiAlgs.py:1221
GaudiPython.GaudiAlgs._decorate_tuples_
def _decorate_tuples_(klasses)
Definition: GaudiAlgs.py:1155
GaudiPython.GaudiAlgs._Histos_a_
def _Histos_a_(self, name=None)
Definition: GaudiAlgs.py:1542
GaudiPython.GaudiAlgs._success_
def _success_(self)
Definition: GaudiAlgs.py:495
GaudiPython.GaudiAlgs._getDet
def _getDet(self, location)
Definition: GaudiAlgs.py:428
GaudiPython.GaudiAlgs._Counter_a_
def _Counter_a_(self, name)
Definition: GaudiAlgs.py:1455
GaudiPython.GaudiAlgs._t_valid_
def _t_valid_(s, *a)
Definition: GaudiAlgs.py:1228
GaudiPython.GaudiAlgs._Histos_t_
def _Histos_t_(self, name=None)
Definition: GaudiAlgs.py:1568
GaudiPython.GaudiAlgs._t_column_ull_
def _t_column_ull_(s, *a)
Definition: GaudiAlgs.py:1256
GaudiPluginService.cpluginsvc.func
func
Definition: cpluginsvc.py:222
GaudiPython.GaudiAlgs._t_fmatrix_
def _t_fmatrix_(s, *a)
Definition: GaudiAlgs.py:1284
GaudiPython.GaudiAlgs.iAlgTool
iAlgTool
Definition: GaudiAlgs.py:66
GaudiPython.GaudiAlgs._t_array_
def _t_array_(s, *a)
Definition: GaudiAlgs.py:1263
GaudiPython.GaudiAlgs._help_
def _help_()
Definition: GaudiAlgs.py:1615
GaudiPython.GaudiAlgs._service_
def _service_(self, interface, name, create=True)
Definition: GaudiAlgs.py:180
GaudiPython.GaudiAlgs._exist_
def _exist_(self, location, rootInTES=True)
Definition: GaudiAlgs.py:451
GaudiPython.GaudiAlgs._get_all_histos_
def _get_all_histos_(component, method, name)
Definition: GaudiAlgs.py:1501
GaudiPython.GaudiAlgs._plot3D_
def _plot3D_(s, *a)
Definition: GaudiAlgs.py:1034
gaudirun.type
type
Definition: gaudirun.py:154
GaudiPython.GaudiAlgs._initialize_tuple_
def _initialize_tuple_(self)
Definition: GaudiAlgs.py:284
GaudiPython.GaudiAlgs._t_farray_
def _t_farray_(s, *a)
Definition: GaudiAlgs.py:1277
GaudiPython.GaudiAlgs._t_matrix_
def _t_matrix_(s, *a)
Definition: GaudiAlgs.py:1270
GaudiPython.GaudiAlgs._init_
def _init_(self, name, **args)
Definition: GaudiAlgs.py:208
GaudiPython.GaudiAlgs._setProperty_
def _setProperty_(self, pname, pvalue)
Definition: GaudiAlgs.py:525
GaudiPython.GaudiAlgs._getProperty_
def _getProperty_(self, pname)
Definition: GaudiAlgs.py:512
GaudiPython.GaudiAlgs._execute_
def _execute_(self)
Definition: GaudiAlgs.py:959
GaudiPython.GaudiAlgs._histoSvc
def _histoSvc(self, address=None)
Definition: GaudiAlgs.py:396
GaudiPython.GaudiAlgs._Tools_a_
def _Tools_a_(self)
Definition: GaudiAlgs.py:1400
GaudiPython.GaudiAlgs._evtSvc
def _evtSvc(self, location=None)
Definition: GaudiAlgs.py:325
GaudiPython.GaudiAlgs._t_column_ll_
def _t_column_ll_(s, *a)
Definition: GaudiAlgs.py:1249
GaudiPython.GaudiAlgs._get
def _get(self, location)
Definition: GaudiAlgs.py:417
GaudiPython.GaudiAlgs._evtcolSvc
def _evtcolSvc(self)
Definition: GaudiAlgs.py:474
GaudiPython.GaudiAlgs._tool_
def _tool_(self, interface, typename, name=None, parent=None, create=True)
Definition: GaudiAlgs.py:129
GaudiPython.GaudiAlgs._plot1D_
def _plot1D_(s, *a)
Definition: GaudiAlgs.py:987
GaudiPython.GaudiAlgs._detSvc
def _detSvc(self)
Definition: GaudiAlgs.py:361
Gaudi::Functional::details::zip::range
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
Definition: FunctionalDetails.h:97
GaudiPython.GaudiAlgs._initialize_
def _initialize_(self)
Definition: GaudiAlgs.py:234
GaudiPython.GaudiAlgs._nTuple_
def _nTuple_(s, *a)
Definition: GaudiAlgs.py:1134