The Gaudi Framework  v31r0 (aeb156f0)
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_all_counters_ (self, method, name=None)
 
def _Counters_a_ (self, name=None)
 
def _Counters_t_ (self, name=None)
 
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_
 
 _evtSvc_
 
 _detSvc_
 
 _histoSvc_
 
 _ntupleSvc_
 
 _evtcolSvc_
 

Function Documentation

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 1516 of file GaudiAlgs.py.

1516 def _Counter_a_(self, name):
1517  """
1518  Retrieve the counter managed GaudiCommon<TYPE> base by name:
1519 
1520  >>> alg = ... ## get the algorithm
1521  >>> cnt = alg.Counter('#accept') ## get the counter
1522  >>> print cnt
1523 
1524  """
1525  _cmp = getattr(self, '_ialg')
1526  if not _cmp:
1527  self.retrieveInterface()
1528  _cmp = getattr(self, '_ialg')
1529  return _get_counter_(_cmp, '_counter_a_', name)
1530 
1531 
1532 # ==============================================================================
1533 
1534 
def _Counter_a_(self, name)
Definition: GaudiAlgs.py:1516
def _get_counter_(self, method, name)
Definition: GaudiAlgs.py:1505
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 1535 of file GaudiAlgs.py.

1535 def _Counter_t_(self, name):
1536  """
1537  Retrieve the counter managed GaudiCommon<TYPE> base by name:
1538 
1539  >>> tool = ... ## get the tool
1540  >>> cnt = tool.Counter('#accept') ## get the counter
1541  >>> print cnt
1542 
1543  """
1544  _cmp = getattr(self, '_itool')
1545  if not _cmp:
1546  self.retrieveInterface()
1547  _cmp = getattr(self, '_itool')
1548  return _get_counter_(_cmp, '_counter_t_', name)
1549 
1550 
1551 # =============================================================================
1552 # get all histos
1553 # =============================================================================
1554 cpp.GaudiAlg.ID.__repr__ = cpp.GaudiAlg.ID.idAsString
1555 cpp.GaudiAlg.ID.__str__ = cpp.GaudiAlg.ID.idAsString
1556 cpp.StatEntity.__repr__ = cpp.StatEntity.toString
1557 cpp.StatEntity.__str__ = cpp.StatEntity.toString
1558 
1559 # =============================================================================
1560 
1561 
def _Counter_t_(self, name)
Definition: GaudiAlgs.py:1535
def _get_counter_(self, method, name)
Definition: GaudiAlgs.py:1505
def GaudiPython.GaudiAlgs._Counters_a_ (   self,
  name = None 
)
private
Retrieve the counters, managed GaudiCommon<TYPE> base:

>>> alg  = ...             ## get the algorithm
>>> cnts = alg.Counters()  ## get the counters
>>> for key in cnts :
...        print key, cnts[key]


Retrieve the counter, managed GaudiCommon<TYPE> base by name:

>>> alg = ...                        ## get the algorithm
>>> cnt = alg.Counters('MyCounter')  ## get the counter
>>> print cnt

Definition at line 1449 of file GaudiAlgs.py.

1449 def _Counters_a_(self, name=None):
1450  """
1451  Retrieve the counters, managed GaudiCommon<TYPE> base:
1452 
1453  >>> alg = ... ## get the algorithm
1454  >>> cnts = alg.Counters() ## get the counters
1455  >>> for key in cnts :
1456  ... print key, cnts[key]
1457 
1458 
1459  Retrieve the counter, managed GaudiCommon<TYPE> base by name:
1460 
1461  >>> alg = ... ## get the algorithm
1462  >>> cnt = alg.Counters('MyCounter') ## get the counter
1463  >>> print cnt
1464 
1465  """
1466  _cmp = getattr(self, '_ialg')
1467  if not _cmp:
1468  self.retrieveInterface()
1469  _cmp = getattr(self, '_ialg')
1470  return _get_all_counters_(_cmp, '_counters_a_', name)
1471 
1472 
1473 # =============================================================================
1474 
1475 
def _get_all_counters_(self, method, name=None)
Definition: GaudiAlgs.py:1425
def _Counters_a_(self, name=None)
Definition: GaudiAlgs.py:1449
def GaudiPython.GaudiAlgs._Counters_t_ (   self,
  name = None 
)
private
Retrieve the counters, managed GaudiCommon<TYPE> base:

>>> tool = ...              ## get the tool
>>> cnts = tool.Counters()  ## get the counters
>>> for key in cnts :
...        print key, cnts[key]


Retrieve the counter, managed GaudiCommon<TYPE> base by name:

>>> tool = ...                         ## get the tool
>>> cnt  = tool.Counters('MyCounter')  ## get the counter
>>> print cnt

Definition at line 1476 of file GaudiAlgs.py.

1476 def _Counters_t_(self, name=None):
1477  """
1478  Retrieve the counters, managed GaudiCommon<TYPE> base:
1479 
1480  >>> tool = ... ## get the tool
1481  >>> cnts = tool.Counters() ## get the counters
1482  >>> for key in cnts :
1483  ... print key, cnts[key]
1484 
1485 
1486  Retrieve the counter, managed GaudiCommon<TYPE> base by name:
1487 
1488  >>> tool = ... ## get the tool
1489  >>> cnt = tool.Counters('MyCounter') ## get the counter
1490  >>> print cnt
1491 
1492  """
1493  _cmp = getattr(self, '_itool')
1494  if not _cmp:
1495  self.retrieveInterface()
1496  _cmp = getattr(self, '_itool')
1497  return _get_all_counters_(_cmp, '_counters_t_', name)
1498 
1499 
1500 # =============================================================================
1501 # get the counter
1502 # =============================================================================
1503 
1504 
def _get_all_counters_(self, method, name=None)
Definition: GaudiAlgs.py:1425
def _Counters_t_(self, name=None)
Definition: GaudiAlgs.py:1476
def GaudiPython.GaudiAlgs._decorate_algs_ (   klasses)
private

Definition at line 1322 of file GaudiAlgs.py.

1322 def _decorate_algs_(klasses):
1323  t = type(klasses)
1324  if not issubclass(t, list) and \
1325  not issubclass(t, tuple):
1326  klasses = [klasses]
1327  for _alg in klasses:
1328  for key in _alg_map_:
1329  setattr(_alg, key, _alg_map_[key])
1330 
1331 
1332 # =
1333 _decorate_algs_(GaudiAlgo)
1334 _decorate_algs_(HistoAlgo)
1335 _decorate_algs_(TupleAlgo)
1336 
1337 # =============================================================================
1338 # Helper function to fill histogram/ntuple using 'map'-operation
1339 # =============================================================================
1340 
1341 
def _decorate_algs_(klasses)
Definition: GaudiAlgs.py:1322
def GaudiPython.GaudiAlgs._decorate_plots_ (   klasses)
private

Definition at line 1097 of file GaudiAlgs.py.

1097 def _decorate_plots_(klasses):
1098  t = type(klasses)
1099  if not issubclass(t, list) and \
1100  not issubclass(t, tuple):
1101  klasses = [klasses]
1102  for klass in klasses:
1103  klass.plot = _plot1D_
1104  klass.plot1D = _plot1D_
1105  klass.plot2D = _plot2D_
1106  klass.plot3D = _plot3D_
1107  klass.profile1D = _profile1D_
1108  klass.profile2D = _profile2D_
1109 
1110 
1111 _decorate_plots_(HistoAlgo)
1112 _decorate_plots_(TupleAlgo)
1113 
1114 
1115 # =============================================================================
def _decorate_plots_(klasses)
Definition: GaudiAlgs.py:1097
def GaudiPython.GaudiAlgs._decorate_tuples_ (   klasses)
private

Definition at line 1137 of file GaudiAlgs.py.

1137 def _decorate_tuples_(klasses):
1138  t = type(klasses)
1139  if not issubclass(t, list) and \
1140  not issubclass(t, tuple):
1141  klasses = [klasses]
1142  for klass in klasses:
1143  klass.nTuple = _nTuple_
1144  klass.evtCol = _evtCol_
1145  klass.ntupleSvc = _ntupleSvc
1146  klass.tupleSvc = _ntupleSvc
1147  klass.ntupSvc = _ntupleSvc
1148  klass.tupSvc = _ntupleSvc
1149  klass.evtColSvc = _evtcolSvc
1150  klass.evtcolSvc = _evtcolSvc
1151 
1152 
1153 # ==========================================================
1154 _decorate_tuples_(TupleAlgo)
1155 
1156 # "decorate N-Tuple object
def _decorate_tuples_(klasses)
Definition: GaudiAlgs.py:1137
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 350 of file GaudiAlgs.py.

350 def _detSvc(self):
351  """
352  Trivial helper function to access Detector Data and Event Data Service
353 
354  Usage:
355  # get detector data service
356  svc = self.detSvc()
357 
358  # get the data
359  lhcb = self.detSvc('/dd/Structure/LHCb')
360  """
361  if not location:
362  return self._detSvc_
363  return self._detSvc_[location]
364 
365 
366 # =============================================================================
367 # Trivial helper function to access Histogram Data and Histogram Data Service
368 #
369 # Usage:
370 #
371 # @code
372 #
373 # # get histogram data service
374 # svc = self.histoSvc()
375 #
376 # # get the data
377 # histo = self.histoSvc('/stat/Calo/1')
378 #
379 # @endcode
380 #
381 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
382 # @date 2006-11-26
383 
384 
def GaudiPython.GaudiAlgs._evtCol_ (   s,
  a 
)
private
Retrieve (book-on-demand) N-Tuple object for Event Tag Collections

Definition at line 1126 of file GaudiAlgs.py.

1126 def _evtCol_(s, *a):
1127  """
1128  Retrieve (book-on-demand) N-Tuple object for Event Tag Collections
1129  """
1130  return TupleAlgDecorator.evtCol(s, *a)
1131 
1132 
1133 _nTuple_.__doc__ += '\n' + TupleAlgDecorator.nTuple.__doc__
1134 _evtCol_.__doc__ += '\n' + TupleAlgDecorator.evtCol.__doc__
1135 
1136 
def GaudiPython.GaudiAlgs._evtcolSvc (   self)
private
Trivial function to access Event Collection Service

Definition at line 463 of file GaudiAlgs.py.

463 def _evtcolSvc(self):
464  """
465  Trivial function to access Event Collection Service
466  """
467  return self._evtcolSvc_
468 
469 
470 # =============================================================================
471 # The default finalization (finalization of base C++ class)
def _evtcolSvc(self)
Definition: GaudiAlgs.py:463
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 314 of file GaudiAlgs.py.

314 def _evtSvc(self, location=None):
315  """
316  Trivial helper function to access Event Data and Event Data Service
317 
318  Usage:
319 
320  # get event data service
321  svc = self.evtSvc()
322 
323  # get the data
324  hits = self.evtSvc('MC/Calo/Hits')
325  """
326  if not location:
327  return self._evtSvc_
328  return self._evtSvc_[location]
329 
330 
331 # =============================================================================
332 # Trivial helper function to access Detector Data and Detector Data Service
333 #
334 # Usage:
335 #
336 # @code
337 #
338 # # get detector data service
339 # svc = self.detSvc()
340 #
341 # # get the data
342 # lhcb = self.detSvc('/dd/Structure/LHCb')
343 #
344 # @endcode
345 #
346 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
347 # @date 2006-11-26
348 
349 
def _evtSvc(self, location=None)
Definition: GaudiAlgs.py:314
def GaudiPython.GaudiAlgs._execute_ (   self)
private
The fictive 'execute' method, which MUST be overwitten by user

Definition at line 941 of file GaudiAlgs.py.

941 def _execute_(self):
942  """
943  The fictive 'execute' method, which MUST be overwitten by user
944  """
945  raise RuntimeError, 'Execute method is not implemented for %s' % self.name(
946  )
947 
948 
949 GaudiAlgo.execute = _execute_
950 HistoAlgo.execute = _execute_
951 TupleAlgo.execute = _execute_
952 
953 
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 440 of file GaudiAlgs.py.

440 def _exist_(self, location, rootInTES=True):
441  """
442  Check the object in Transient Event Store using GaudiCommon machinery,
443  respecting RootInTES behaviour
444  """
445  return AlgDecorator.exist_(self, location, rootInTES)
446 
447 
448 # =============================================================================
449 # Trivial helper function to access NTuple Service
450 
451 
def _exist_(self, location, rootInTES=True)
Definition: GaudiAlgs.py:440
def GaudiPython.GaudiAlgs._finalize_ (   self)
private
The default finalization : finalize the base C++ class

Definition at line 472 of file GaudiAlgs.py.

472 def _finalize_(self):
473  """
474  The default finalization : finalize the base C++ class
475  """
476  status = self._Base.finalize_(self)
477  return status
478 
479 
480 # =============================================================================
481 # Dummy method returning success
482 
483 
def _finalize_(self)
Definition: GaudiAlgs.py:472
def GaudiPython.GaudiAlgs._get (   self,
  location 
)
private
Trivial function to access the data in TES using the data service

Definition at line 406 of file GaudiAlgs.py.

406 def _get(self, location):
407  """
408  Trivial function to access the data in TES using the data service
409  """
410  return self._evtSvc_[location]
411 
412 
413 # =============================================================================
414 # Trivial function to access the data in TDS
415 
416 
def _get(self, location)
Definition: GaudiAlgs.py:406
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 428 of file GaudiAlgs.py.

428 def _get_(self, location, rootInTES=True):
429  """
430  Get the object from Transient Event Store using GaudiCommon machinery,
431  respecting RootInTES behaviour
432  """
433  return AlgDecorator.get_(self, location, rootInTES)
434 
435 
436 # =============================================================================
437 # check the data from TES using GaudiCommon methods, respecting RootInTES
438 
439 
def _get_(self, location, rootInTES=True)
Definition: GaudiAlgs.py:428
def GaudiPython.GaudiAlgs._get_all_counters_ (   self,
  method,
  name = None 
)
private
get all counters

Definition at line 1425 of file GaudiAlgs.py.

1425 def _get_all_counters_(self, method, name=None):
1426  """
1427  get all counters
1428  """
1429  _cnts = std.vector('const StatEntity*')()
1430  _nams = std.vector('std::string')()
1431  _func = getattr(AlgDecorator, method)
1432  _num = _func(self, _nams, _cnts)
1433  if _nams.size() != _num or _cnts.size() != _num:
1434  raise RuntimeError, 'Unable to extract Counters'
1435  _res = {}
1436  for _i in range(0, _num):
1437  _nam = _nams[_i]
1438  _cnt = _cnts[_i]
1439  _res[_nam] = _cnt
1440  if not name:
1441  return _res
1442  return _res.get(name, None)
1443 
1444 
1445 # =============================================================================
1446 # get all counters
1447 
1448 
def _get_all_counters_(self, method, name=None)
Definition: GaudiAlgs.py:1425
decltype(auto) range(Args &&...args)
Zips multiple containers together to form a single range.
STL class.
def GaudiPython.GaudiAlgs._get_all_histos_ (   component,
  method,
  name 
)
private
Get All histogram form the component

Definition at line 1562 of file GaudiAlgs.py.

1562 def _get_all_histos_(component, method, name):
1563  """
1564  Get All histogram form the component
1565  """
1566  _res = {}
1567  for _his in (std.vector('AIDA::IProfile2D*'),
1568  std.vector('AIDA::IProfile1D*'),
1569  std.vector('AIDA::IHistogram3D*'),
1570  std.vector('AIDA::IHistogram2D*'),
1571  std.vector('AIDA::IHistogram1D*')):
1572  _his = _his()
1573  _ids = std.vector('GaudiAlg::ID')()
1574  _fun = getattr(HistoDecorator, method)
1575  _num = _fun(component, _ids, _his)
1576  if _ids.size() != _num or _his.size() != _num:
1577  raise RuntimeError, 'Unable to extract Histos!'
1578  for _i in range(0, _num):
1579  _id = _ids[_i]
1580  if _id.numeric():
1581  _id = _id.numericID()
1582  elif _id.literal():
1583  _id = _id.literalID()
1584  else:
1585  _id = _is.idAsString()
1586  _res[_id] = _his[_i]
1587 
1588  if not name:
1589  return _res # return the dictionary
1590 
1591  id = cpp.GaudiAlg.ID(name)
1592  for i in (name, id.literalID(), id.numericID(), id.idAsString(), id):
1593  h = _res.get(i, None)
1594  if not not h:
1595  return h # return the histogram
1596 
1597  return None
1598 
1599 
1600 # =============================================================================
1601 
1602 
def _get_all_histos_(component, method, name)
Definition: GaudiAlgs.py:1562
decltype(auto) range(Args &&...args)
Zips multiple containers together to form a single range.
STL class.
def GaudiPython.GaudiAlgs._get_all_tools_ (   self,
  method 
)
private
Get all tools

Definition at line 1364 of file GaudiAlgs.py.

1364 def _get_all_tools_(self, method):
1365  """
1366  Get all tools
1367  """
1368  _tools = std.vector('IAlgTool*')()
1369  _func = getattr(AlgDecorator, method)
1370  _num = _func(self, _tools)
1371  if _tools.size() != _num:
1372  raise RuntimeError, 'Unable to extract Tools'
1373  _res = []
1374  for _tool in _tools:
1375  _res += [iAlgTool(_tool.name(), _tool)]
1376  return _res
1377 
1378 
1379 # =============================================================================
1380 
1381 
STL class.
def _get_all_tools_(self, method)
Definition: GaudiAlgs.py:1364
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 527 of file GaudiAlgs.py.

527 def _get_attr_(self, pname):
528  """
529  Get the attribute (or property)
530  - if the attribute name corresponds to the property name, property value is returned
531  """
532  if self.hasProperty(pname):
533  return iAlgorithm.__getattr__(self, pname)
534  raise AttributeError, 'attribute/property %s does not exist' % pname
535 
536 
537 # =============================================================================
538 # set the attribute or property
539 
540 
def _get_attr_(self, pname)
Definition: GaudiAlgs.py:527
def GaudiPython.GaudiAlgs._get_counter_ (   self,
  method,
  name 
)
private
get the counter

Definition at line 1505 of file GaudiAlgs.py.

1505 def _get_counter_(self, method, name):
1506  """
1507  get the counter
1508  """
1509  _func = getattr(AlgDecorator, method)
1510  return _func(self, name)
1511 
1512 
1513 # ==============================================================================
1514 
1515 
def _get_counter_(self, method, name)
Definition: GaudiAlgs.py:1505
def GaudiPython.GaudiAlgs._getDet (   self,
  location 
)
private
Trivial function to access the data in TDS using data service

Definition at line 417 of file GaudiAlgs.py.

417 def _getDet(self, location):
418  """
419  Trivial function to access the data in TDS using data service
420  """
421  return self._detSvc_[location]
422 
423 
424 # =============================================================================
425 # get the data from TES using GaudiCommon methods, respecting RootInTES
426 
427 
def _getDet(self, location)
Definition: GaudiAlgs.py:417
def GaudiPython.GaudiAlgs._getProperty_ (   self,
  pname 
)
private
Get the property by name

Definition at line 501 of file GaudiAlgs.py.

501 def _getProperty_(self, pname):
502  """
503  Get the property by name
504  """
505  if not self.hasProperty(pname):
506  raise AttributeError, 'property %s does not exist' % pname
507  return iAlgorithm.__getattr__(self, pname)
508 
509 
510 # =============================================================================
511 # set the value for the given property
512 
513 
def _getProperty_(self, pname)
Definition: GaudiAlgs.py:501
def GaudiPython.GaudiAlgs._hasProperty_ (   self,
  pname 
)
private
The trivial function which checks the existence of the property with given name

Definition at line 490 of file GaudiAlgs.py.

490 def _hasProperty_(self, pname):
491  """
492  The trivial function which checks the existence of the property with given name
493  """
494  return cpp.Gaudi.Utils.hasProperty(self, pname)
495 
496 
497 # =============================================================================
498 # get the value of the given property
499 
500 
def _hasProperty_(self, pname)
Definition: GaudiAlgs.py:490
def GaudiPython.GaudiAlgs._help_ ( )
private

Definition at line 1680 of file GaudiAlgs.py.

1680 def _help_():
1681  print __doc__, __author__
1682  print '\t\t\tDoc-string for class GaudiAlgo \n', GaudiAlgo.__doc__
1683  print '\t\t\tDoc-string for class HistoAlgo \n', HistoAlgo.__doc__
1684  print '\t\t\tDoc-string for class TupleAlgo \n', TupleAlgo.__doc__
1685 
1686 
1687 # =============================================================================
1688 # pseudo-test suite
1689 # =============================================================================
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 1603 of file GaudiAlgs.py.

1603 def _Histos_a_(self, name=None):
1604  """
1605  Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1606 
1607  >>> alg = ... ## get the algorithm
1608  >>> histos = alg.Histos() ## get all histograms & profiles
1609  >>> for key in histos :
1610  ... print key, histos[key]
1611 
1612  Retrive the histogram with the certain ID :
1613 
1614  >>> alg = ... ## get the algorithm
1615  >>> histo = alg.Histos('some histo ID') ## get the histo by ID
1616  >>> print histo
1617 
1618  """
1619  _cmp = getattr(self, '_ialg')
1620  if not _cmp:
1621  self.retrieveInterface()
1622  _cmp = getattr(self, '_ialg')
1623  return _get_all_histos_(_cmp, '_histos_a_', name)
1624 
1625 
1626 # =============================================================================
1627 
1628 
def _get_all_histos_(component, method, name)
Definition: GaudiAlgs.py:1562
def _Histos_a_(self, name=None)
Definition: GaudiAlgs.py:1603
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 1629 of file GaudiAlgs.py.

1629 def _Histos_t_(self, name=None):
1630  """
1631  Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1632 
1633  >>> tool = ... ## get the tool
1634  >>> histos = tool.Histos() ## get all histograms & profiles
1635  >>> for key in histos :
1636  ... print key, histos[key]
1637 
1638  Retrive the historgam with certain ID :
1639 
1640  >>> tool = ... ## get the tool
1641  >>> histo = tool.Histos('some histo ID') ## get the histo by ID
1642  >>> print histo
1643 
1644  """
1645  _cmp = getattr(self, '_itool')
1646  if not _cmp:
1647  self.retrieveInterface()
1648  _cmp = getattr(self, '_itool')
1649  return _get_all_histos_(_cmp, '_histos_t_', name)
1650 
1651 
1652 # =============================================================================
1653 
1654 _Tools_a_.__doc__ += '\n' + AlgDecorator._tools_a_.__doc__
1655 _Tools_t_.__doc__ += '\n' + AlgDecorator._tools_t_.__doc__
1656 _Counters_a_.__doc__ += '\n' + AlgDecorator._counters_a_.__doc__
1657 _Counters_t_.__doc__ += '\n' + AlgDecorator._counters_t_.__doc__
1658 _Counter_a_.__doc__ += '\n' + AlgDecorator._counter_a_.__doc__
1659 _Counter_t_.__doc__ += '\n' + AlgDecorator._counter_t_.__doc__
1660 _Histos_a_.__doc__ += '\n' + HistoDecorator._histos_a_.__doc__
1661 _Histos_t_.__doc__ += '\n' + HistoDecorator._histos_t_.__doc__
1662 
1663 iAlgorithm.Tools = _Tools_a_
1664 iAlgTool.Tools = _Tools_t_
1665 iAlgorithm.Counters = _Counters_a_
1666 iAlgTool.Counters = _Counters_t_
1667 iAlgorithm.Counter = _Counter_a_
1668 iAlgTool.Counter = _Counter_t_
1669 iAlgorithm.Histos = _Histos_a_
1670 iAlgTool.Histos = _Histos_t_
1671 
1672 # finally add some decoration for histograms
def _get_all_histos_(component, method, name)
Definition: GaudiAlgs.py:1562
def _Histos_t_(self, name=None)
Definition: GaudiAlgs.py:1629
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 385 of file GaudiAlgs.py.

385 def _histoSvc(self, address=None):
386  """
387  Trivial helper function to access Histogram Data and Histogram Data Service
388 
389  Usage:
390 
391  # get histogram data service
392  svc = self.histoSvc()
393 
394  # get the data
395  histo = self.histoSvc('/stat/Calo/1')
396  """
397  if not address:
398  return self._histoSvc_
399  return self._histoSvc_[address]
400 
401 
402 # =============================================================================
403 # Trivial function to access the data in TES
404 
405 
def _histoSvc(self, address=None)
Definition: GaudiAlgs.py:385
def GaudiPython.GaudiAlgs._init_ (   self,
  name,
  args 
)
private
The constructor from unique algorithm instance name & parameters

Definition at line 197 of file GaudiAlgs.py.

197 def _init_(self, name, **args):
198  """
199  The constructor from unique algorithm instance name & parameters
200  """
201  self._Base.__init__(self, self, name)
202  appMgr = AppMgr()
203  algMgr = appMgr._algmgr
204  status = algMgr.addAlgorithm(self)
205  if status.isFailure():
206  raise RuntimeError, 'Unable to add Algorithm "' + name + '"'
207  iAlgorithm.__init__(self, name, self)
208  for key in args:
209  setattr(self, key, args[key])
210  # take some care about the ownership of the algorithms
211  if not appMgr.__dict__.has_key('GaudiPythonAlgos'):
212  appMgr.__dict__['GaudiPythonAlgos'] = []
213  appMgr.__dict__['GaudiPythonAlgos'].append(self)
214 
215 
216 # =============================================================================
217 # The default initialization (initialization of base C++ class + data
218 #
219 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
220 # @date 2006-11-26
221 
222 
def _init_(self, name, args)
Definition: GaudiAlgs.py:197
def GaudiPython.GaudiAlgs._initialize_ (   self)
private
The default initialization (initialization of base C++ class + data)

Definition at line 223 of file GaudiAlgs.py.

223 def _initialize_(self):
224  """
225  The default initialization (initialization of base C++ class + data)
226  """
227  status = self._Base.initialize_(self)
228  if status.isFailure():
229  return status
230 
231  # set the basic services
232  _e = self._Base.evtSvc(self)
233  _s = InterfaceCast(cpp.IService)(_e)
234  self._evtSvc_ = iDataSvc(_s.name(), _e)
235 
236  _d = self._Base.detSvc(self)
237  _s = InterfaceCast(cpp.IService)(_d)
238  self._detSvc_ = iDataSvc(_s.name(), _d)
239 
240  return status
241 
242 
243 # =============================================================================
244 # The default initialization (initialization of base C++ class + data members)
245 #
246 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
247 # @date 2006-11-26
248 
249 
def _initialize_(self)
Definition: GaudiAlgs.py:223
def GaudiPython.GaudiAlgs._initialize_histo_ (   self)
private
The default initialization (initialization of base C++ class + data members)

Definition at line 250 of file GaudiAlgs.py.

251  """
252  The default initialization (initialization of base C++ class + data members)
253  """
254  status = _initialize_(self)
255  if status.isFailure():
256  return status
257 
258  # set the basic services
259  _h = self._Base.histoSvc(self)
260  _s = InterfaceCast(cpp.IService)(_h)
261  self._histoSvc_ = iHistogramSvc(_s.name(), _h)
262 
263  return status
264 
265 
266 # =============================================================================
267 # The default initialization (initialization of base C++ class + data members)
268 #
269 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
270 # @date 2006-11-26
271 
272 
def _initialize_(self)
Definition: GaudiAlgs.py:223
def _initialize_histo_(self)
Definition: GaudiAlgs.py:250
def GaudiPython.GaudiAlgs._initialize_tuple_ (   self)
private
The default initialization (initialization of base C++ class + data members)

Definition at line 273 of file GaudiAlgs.py.

274  """
275  The default initialization (initialization of base C++ class + data members)
276  """
277  status = _initialize_histo_(self)
278  if status.isFailure():
279  return status
280 
281  # set the basic services
282  if self.produceNTuples():
283  _n = self._Base.ntupleSvc(self)
284  _s = InterfaceCast(cpp.IService)(_n)
285  self._ntupleSvc_ = iNTupleSvc(_s.name(), _n)
286 
287  if self.produceEvtCols():
288  _n = self._Base.evtColSvc(self)
289  _s = InterfaceCast(cpp.IService)(_n)
290  self._evtcolSvc_ = iNTupleSvc(_s.name(), _n)
291 
292  return status
293 
294 
295 # =============================================================================
296 # Trivial helper function to access Event Data and Event Data Service
297 #
298 # Usage:
299 #
300 # @code
301 #
302 # # get event data service
303 # svc = self.evtSvc()
304 #
305 # # get the data
306 # hits = self.evtSvc('MC/Calo/Hits')
307 #
308 # @endcode
309 #
310 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
311 # @date 2006-11-26
312 
313 
def _initialize_tuple_(self)
Definition: GaudiAlgs.py:273
def _initialize_histo_(self)
Definition: GaudiAlgs.py:250
def GaudiPython.GaudiAlgs._nTuple_ (   s,
  a 
)
private
Retrieve (book-on-demand) N-Tuple object

Definition at line 1116 of file GaudiAlgs.py.

1116 def _nTuple_(s, *a):
1117  """
1118  Retrieve (book-on-demand) N-Tuple object
1119  """
1120  return TupleAlgDecorator.nTuple(s, *a)
1121 
1122 
1123 # =============================================================================
1124 
1125 
def GaudiPython.GaudiAlgs._ntupleSvc (   self)
private
Trivial function to access N-Tuple Service

Definition at line 452 of file GaudiAlgs.py.

452 def _ntupleSvc(self):
453  """
454  Trivial function to access N-Tuple Service
455  """
456  return self._ntupleSvc_
457 
458 
459 # =============================================================================
460 # Trivial helper function to access Event Collection Service
461 
462 
def _ntupleSvc(self)
Definition: GaudiAlgs.py:452
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 969 of file GaudiAlgs.py.

969 def _plot1D_(s, *a):
970  """
971  The basic method to fill (book-on-demand) 1D-histogram
972 
973  The histogram will be created/booked dautomatically according to the
974  specifications:
975 
976  - literal or numerical ID (optional)
977  - title
978  - low edge
979  - high edge
980  - number of bins (default is 100)
981 
982  The reference to the histogram is returned and could be used for later manipulations
983 
984  """
985  return HistoDecorator.plot1D(s, *a)
986 
987 
988 # =============================================================================
989 
990 
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 991 of file GaudiAlgs.py.

991 def _plot2D_(s, *a):
992  """
993  The basic method to fill (book-on-demand) 2D-histogram
994 
995  The histogram will be created/booked dautomatically according to the
996  specifications:
997 
998  - literal or numerical ID (optional)
999  - title
1000  - low X-edge
1001  - high X-edge
1002  - low Y-edge
1003  - high Y-edge
1004  - number of X-bins (default is 50)
1005  - number of Y-bins (default is 50)
1006 
1007  The reference to the histogram is returned and could be used for later manipulations
1008 
1009  """
1010  return HistoDecorator.plot2D(s, *a)
1011 
1012 
1013 # =============================================================================
1014 
1015 
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 1016 of file GaudiAlgs.py.

1016 def _plot3D_(s, *a):
1017  """
1018  The basic method to fill (book-on-demand) 3D-histogram
1019 
1020  The histogram will be created/booked dautomatically according to the
1021  specifications:
1022 
1023  - literal or numerical ID (optional)
1024  - title
1025  - low X-edge
1026  - high X-edge
1027  - low Y-edge
1028  - high Y-edge
1029  - low Z-edge
1030  - high Z-edge
1031  - number of X-bins (default is 10)
1032  - number of Y-bins (default is 10)
1033  - number of Y-bins (default is 10)
1034 
1035  The reference to the histogram is returned and could be used for later manipulations
1036 
1037  """
1038  return HistoDecorator.plot3D(s, *a)
1039 
1040 
1041 # =============================================================================
1042 
1043 
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 1044 of file GaudiAlgs.py.

1044 def _profile1D_(s, *a):
1045  """
1046  The basic method to fill (book-on-demand) 1D profile histogram
1047 
1048  The profile histogram will be created/booked dautomatically
1049  according to the specifications:
1050 
1051  - literal or numerical ID (optional)
1052  - title
1053  - low X-edge
1054  - high X-edge
1055  - number of X-bins (default is 100)
1056 
1057  The reference to the histogram is returned and could be used for later manipulations
1058 
1059  """
1060  return HistoDecorator.profile1D(s, *a)
1061 
1062 
1063 # =============================================================================
1064 
1065 
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 1066 of file GaudiAlgs.py.

1066 def _profile2D_(s, *a):
1067  """
1068  The basic method to fill (book-on-demand) 2D profile histiogram
1069 
1070  The profile histogram will be created/booked automatically
1071  according to the specifications:
1072 
1073  - literal or numerical ID (optional)
1074  - title
1075  - low X-edge
1076  - high X-edge
1077  - low Y-edge
1078  - high Y-edge
1079  - number of X-bins (default is 50)
1080  - number of Y-bins (default is 50)
1081 
1082  The reference to the histogram is returned and could be used for later manipulations
1083 
1084  """
1085  return HistoDecorator.profile2D(s, *a)
1086 
1087 
1088 # =============================================================================
1089 
1090 _plot1D_.__doc__ += '\n' + HistoDecorator.plot1D.__doc__
1091 _plot2D_.__doc__ += '\n' + HistoDecorator.plot2D.__doc__
1092 _plot3D_.__doc__ += '\n' + HistoDecorator.plot3D.__doc__
1093 _profile1D_.__doc__ += '\n' + HistoDecorator.profile1D.__doc__
1094 _profile2D_.__doc__ += '\n' + HistoDecorator.profile2D.__doc__
1095 
1096 
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 169 of file GaudiAlgs.py.

169 def _service_(self, interface, name, create=True):
170  """
171  Useful method to locate a service:
172 
173  Usage:
174 
175  ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
176 
177  """
178  if not interface:
179  interface = cpp.IInterface
180  _svc = AlgDecorator.svc_(self, name, create)
181  if not _svc:
182  return None
183  _svc = InterfaceCast(interface)(_svc)
184  if not _svc:
185  self.Warning('Invalid cast to interface %s' % interface)
186  return None
187  return _svc
188 
189 
190 # =============================================================================
191 # The constructor from unique algorithm instance name,
192 #
193 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
194 # @date 2006-11-26
195 
196 
def _service_(self, interface, name, create=True)
Definition: GaudiAlgs.py:169
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 541 of file GaudiAlgs.py.

541 def _set_attr_(self, pname, pvalue):
542  """
543  Set the attribute (or property) :
544  - if the attribute name corresponds to the property name, the property is updated
545  """
546  if not self.hasProperty(pname):
547  self.__dict__[pname] = pvalue
548  else:
549  iAlgorithm.__setattr__(self, pname, pvalue)
550 
551 
def _set_attr_(self, pname, pvalue)
Definition: GaudiAlgs.py:541
def GaudiPython.GaudiAlgs._setProperty_ (   self,
  pname,
  pvalue 
)
private
Set the property from the value

Definition at line 514 of file GaudiAlgs.py.

514 def _setProperty_(self, pname, pvalue):
515  """
516  Set the property from the value
517  """
518  if not self.hasProperty(pname):
519  raise AttributeError, 'property %s does not exist' % pname
520  return iAlgorithm.__setattr__(self, pname, pvalue)
521 
522 
523 # =============================================================================
524 # get the attribute or property
525 
526 
def _setProperty_(self, pname, pvalue)
Definition: GaudiAlgs.py:514
def GaudiPython.GaudiAlgs._start_ (   self)
private
The stub 'start' method needed by the internal implementation of PyAlg<>.

Definition at line 928 of file GaudiAlgs.py.

928 def _start_(self):
929  """
930  The stub 'start' method needed by the internal implementation of PyAlg<>.
931  """
932  # return self._Base.start_(self)
933  return SUCCESS
934 
935 
936 GaudiAlgo.start = _start_
937 HistoAlgo.start = _start_
938 TupleAlgo.start = _start_
939 
940 
def GaudiPython.GaudiAlgs._stop_ (   self)
private
The stub 'stop' method needed by the internal implementation of PyAlg<>.

Definition at line 954 of file GaudiAlgs.py.

954 def _stop_(self):
955  """
956  The stub 'stop' method needed by the internal implementation of PyAlg<>.
957  """
958  # return self._Base.stop_(self)
959  return SUCCESS
960 
961 
962 GaudiAlgo.stop = _stop_
963 HistoAlgo.stop = _stop_
964 TupleAlgo.stop = _stop_
965 
966 # =============================================================================
967 
968 
def GaudiPython.GaudiAlgs._success_ (   self)
private

Definition at line 484 of file GaudiAlgs.py.

484 def _success_(self):
485  return SUCCESS
486 
487 
488 # =============================================================================
489 # check the existence of the property with the given name
def GaudiPython.GaudiAlgs._t_array_ (   s,
  a 
)
private
Fill the fixed-size array column

Definition at line 1243 of file GaudiAlgs.py.

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

Definition at line 1222 of file GaudiAlgs.py.

1222 def _t_column_(s, *a):
1223  """
1224  Fill the certain column to n-tuple
1225  """
1226  return _Dec.column(s, *a)
1227 
1228 
def GaudiPython.GaudiAlgs._t_column_ll_ (   s,
  a 
)
private
Fill the 'long long' column

Definition at line 1229 of file GaudiAlgs.py.

1229 def _t_column_ll_(s, *a):
1230  """
1231  Fill the 'long long' column
1232  """
1233  return _Dec.column_ll(s, *a)
1234 
1235 
def _t_column_ll_(s, a)
Definition: GaudiAlgs.py:1229
def GaudiPython.GaudiAlgs._t_column_ull_ (   s,
  a 
)
private
Fill the 'unsigned long long' column

Definition at line 1236 of file GaudiAlgs.py.

1236 def _t_column_ull_(s, *a):
1237  """
1238  Fill the 'unsigned long long' column
1239  """
1240  return _Dec.column_ull(s, *a)
1241 
1242 
def _t_column_ull_(s, a)
Definition: GaudiAlgs.py:1236
def GaudiPython.GaudiAlgs._t_farray_ (   s,
  a 
)
private
Fill the floating-size array column

Definition at line 1257 of file GaudiAlgs.py.

1257 def _t_farray_(s, *a):
1258  """
1259  Fill the floating-size array column
1260  """
1261  return _Dec.farray(s, *a)
1262 
1263 
def GaudiPython.GaudiAlgs._t_fmatrix_ (   s,
  a 
)
private
Fill the floating-size matrix column

Definition at line 1264 of file GaudiAlgs.py.

1264 def _t_fmatrix_(s, *a):
1265  """
1266  Fill the floating-size matrix column
1267  """
1268  return _Dec.fmatrix(s, *a)
1269 
1270 
1271 _t_nTuple_.__doc__ += '\n' + _Dec.nTuple.__doc__
1272 _t_ntuple_.__doc__ += '\n' + _Dec.ntuple.__doc__
1273 _t_valid_.__doc__ += '\n' + _Dec.valid.__doc__
1274 _t_write_.__doc__ += '\n' + _Dec.write.__doc__
1275 _t_column_.__doc__ += '\n' + _Dec.column.__doc__
1276 _t_column_ll_.__doc__ += '\n' + _Dec.column_ll.__doc__
1277 _t_column_ull_.__doc__ += '\n' + _Dec.column_ull.__doc__
1278 _t_array_.__doc__ += '\n' + _Dec.array.__doc__
1279 _t_matrix_.__doc__ += '\n' + _Dec.matrix.__doc__
1280 _t_farray_.__doc__ += '\n' + _Dec.farray.__doc__
1281 _t_fmatrix_.__doc__ += '\n' + _Dec.fmatrix.__doc__
1282 
1283 Tuple.nTuple = _t_nTuple_
1284 Tuple.ntuple = _t_ntuple_
1285 Tuple.valid = _t_valid_
1286 Tuple.write = _t_write_
1287 Tuple.column = _t_column_
1288 Tuple.column_ll = _t_column_ll_
1289 Tuple.column_ull = _t_column_ull_
1290 Tuple.array = _t_array_
1291 Tuple.matrix = _t_matrix_
1292 Tuple.farray = _t_farray_
1293 Tuple.fmatrix = _t_fmatrix_
1294 
def GaudiPython.GaudiAlgs._t_matrix_ (   s,
  a 
)
private
Fill the fixed-size matrix column

Definition at line 1250 of file GaudiAlgs.py.

1250 def _t_matrix_(s, *a):
1251  """
1252  Fill the fixed-size matrix column
1253  """
1254  return _Dec.matrix(s, *a)
1255 
1256 
def GaudiPython.GaudiAlgs._t_nTuple_ (   s,
  a 
)
private
Access to underlying INTuple object

Definition at line 1194 of file GaudiAlgs.py.

1194 def _t_nTuple_(s, *a):
1195  """
1196  Access to underlying INTuple object
1197  """
1198  return _Dec.nTuple(s, *a)
1199 
1200 
def GaudiPython.GaudiAlgs._t_ntuple_ (   s,
  a 
)
private
Access to underlying NTuple::Tuple object

Definition at line 1201 of file GaudiAlgs.py.

1201 def _t_ntuple_(s, *a):
1202  """
1203  Access to underlying NTuple::Tuple object
1204  """
1205  return _Dec.ntuple(s, *a)
1206 
1207 
def GaudiPython.GaudiAlgs._t_valid_ (   s,
  a 
)
private
Valid NTuple::Tuple object?

Definition at line 1208 of file GaudiAlgs.py.

1208 def _t_valid_(s, *a):
1209  """
1210  Valid NTuple::Tuple object?
1211  """
1212  return _Dec.valid(s, *a)
1213 
1214 
def GaudiPython.GaudiAlgs._t_write_ (   s,
  a 
)
private
Commit the row/record to n-tuple

Definition at line 1215 of file GaudiAlgs.py.

1215 def _t_write_(s, *a):
1216  """
1217  Commit the row/record to n-tuple
1218  """
1219  return _Dec.write(s, *a)
1220 
1221 
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 118 of file GaudiAlgs.py.

118 def _tool_(self, interface, typename, name=None, parent=None, create=True):
119  """
120  Useful method to locate the tool a certain
121 
122  Usage:
123 
124  # locate public tool
125  t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator')
126  # locate private tool
127  t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self)
128  # locate public tool with defined name
129  t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1')
130  # locate private tool with defined name
131  t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self)
132  # locate public tool with defined name
133  t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3')
134  # locate private tool with defined name
135  t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self)
136 
137  """
138  if not interface:
139  interface = cpp.IAlgTool
140  if not parent:
141  parent = self
142  if name:
143  typename += '/' + name
144  _tool = AlgDecorator.tool_(self, typename, parent, create)
145  if not _tool:
146  return None
147  _tool = InterfaceCast(interface)(_tool)
148  if not _tool:
149  self.Warning('Invalid cast to interface %s' % interface)
150  return None
151  return _tool
152 
153 
154 # =============================================================================
155 # Useful method to locate a service:
156 #
157 # Usage:
158 #
159 # @code
160 #
161 # ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
162 #
163 # @endcode
164 #
165 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
166 # @date 2006-11-26
167 
168 
def _tool_(self, interface, typename, name=None, parent=None, create=True)
Definition: GaudiAlgs.py:118
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 1382 of file GaudiAlgs.py.

1382 def _Tools_a_(self):
1383  """
1384  Retrieve the list of tools,
1385  aquired by component through GaudiCommon<TYPE> base:
1386 
1387  >>> alg = ... ## get the algorithm
1388  >>> tools = alg.Tools() ## get the tools
1389  >>> for tool in tools :
1390  ... print tool
1391 
1392  """
1393  _cmp = getattr(self, '_ialg')
1394  if not _cmp:
1395  self.retrieveInterface()
1396  _cmp = getattr(self, '_ialg')
1397  return _get_all_tools_(_cmp, '_tools_a_')
1398 
1399 
1400 # =============================================================================
1401 
1402 
def _get_all_tools_(self, method)
Definition: GaudiAlgs.py:1364
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 1403 of file GaudiAlgs.py.

1403 def _Tools_t_(self):
1404  """
1405  Retrieve the list of tools,
1406  aquired by component through GaudiCommon<TYPE> base:
1407 
1408  >>> tool = ... ## get the tool
1409  >>> tools = tool.Tools() ## get the tools
1410  >>> for t in tools :
1411  ... print t
1412 
1413  """
1414  _cmp = getattr(self, '_itool')
1415  if not _cmp:
1416  self.retrieveInterface()
1417  _cmp = getattr(self, '_itool')
1418  return _get_all_tools_(_cmp, '_tools_t_')
1419 
1420 
1421 # =============================================================================
1422 # get the list of counters
1423 # =============================================================================
1424 # get all counters
def _get_all_tools_(self, method)
Definition: GaudiAlgs.py:1364
def GaudiPython.GaudiAlgs.mapvct (   func,
  sequence,
  ovct = None 
)
Helper function to fill histogram/ntuple using 'map'-operation 

Definition at line 1342 of file GaudiAlgs.py.

1342 def mapvct(func, sequence, ovct=None):
1343  """ Helper function to fill histogram/ntuple using 'map'-operation """
1344  if not ovct:
1345  vct = GaudiPython.Vector
1346  else:
1347  vct = ovct
1348  if hasattr(sequence, 'size'):
1349  vct.reserve(vct.size() + sequence.size())
1350  elif hasattr(sequence, '__len__'):
1351  vct.reserve(vct.size() + len(sequence))
1352  for object in sequence:
1353  vct.push_back(func(object))
1354  if not ovct:
1355  return vct
1356 
1357 
1358 # =============================================================================
1359 
1360 
1361 # =============================================================================
1362 # get the list of tools
1363 # =============================================================================
def mapvct(func, sequence, ovct=None)
Definition: GaudiAlgs.py:1342

Variable Documentation

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 41 of file GaudiAlgs.py.

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

Definition at line 37 of file GaudiAlgs.py.

dictionary GaudiPython.GaudiAlgs._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  'beginRun': _success_, # dummy function returning success
16  'endRun': _success_, # dummy function returning success
17  #
18  'hasProperty':
19  _hasProperty_, # check the existence of property with given name
20  'getProperty': _getProperty_, # get the property value with given name
21  'setProperty': _setProperty_, # set the property with given name
22  '__setattr__': _set_attr_, # set the attribute/property with given name
23  '__getattr__': _get_attr_ # set the attribute/property with given name
24 }

Definition at line 1295 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._Dec = TupleDecorator
private

Definition at line 1158 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._detSvc_
private

Definition at line 238 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._evtcolSvc_
private

Definition at line 290 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._evtSvc_
private

Definition at line 234 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._GaudiAlgorithm = cpp.GaudiPython.PyAlg('GaudiAlgorithm')
private

Definition at line 552 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._GaudiHistoAlg = cpp.GaudiPython.PyAlg('GaudiHistoAlg')
private

Definition at line 553 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._GaudiTupleAlg = cpp.GaudiPython.PyAlg('GaudiTupleAlg')
private

Definition at line 554 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._histoSvc_
private

Definition at line 261 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._ntupleSvc_
private

Definition at line 285 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.AlgDecorator = cpp.GaudiPython.AlgDecorator

Definition at line 87 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.column

Definition at line 1191 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.HID = cpp.GaudiAlg.ID

Definition at line 81 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.HistoDecorator = cpp.GaudiPython.HistoDecorator

Definition at line 88 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.HistoID = HID

Definition at line 82 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.iAlgorithm = GaudiPython.Bindings.iAlgorithm

Definition at line 54 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.iAlgTool = GaudiPython.Bindings.iAlgTool

Definition at line 55 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.Matrix = std.vector('std::vector<double>')

Definition at line 78 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.std = cpp.std

Definition at line 73 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TID = HID

Definition at line 83 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.Tuple = cpp.Tuples.Tuple

Definition at line 1157 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator

Definition at line 89 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleDecorator = cpp.GaudiPython.TupleDecorator

Definition at line 90 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleID = TID

Definition at line 84 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.Vector = std.vector('double')

Definition at line 76 of file GaudiAlgs.py.