All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GaudiPython.GaudiAlgs Namespace Reference

Classes

class  GaudiAlgo
 the base class for all algorithm Python-image of C++ clkass GaudiAlgorithm More...
 
class  HistoAlgo
 The base class for easy histogramming. More...
 
class  objectmethod
 
class  TupleAlgo
 The base class for easy manupulations with N-Tuples. More...
 
class  TupleDecColumnDispatcher
 

Functions

def _tool_
 Useful method to locate the tool a certain. More...
 
def _service_
 Useful method to locate a service: More...
 
def _init_
 The constructor from unique algorithm instance name,. More...
 
def _initialize_
 The default initialization (initialization of base C++ class + data. More...
 
def _initialize_histo_
 The default initialization (initialization of base C++ class + data members) More...
 
def _initialize_tuple_
 The default initialization (initialization of base C++ class + data members) More...
 
def _evtSvc
 Trivial helper function to access Event Data and Event Data Service. More...
 
def _detSvc
 Trivial helper function to access Detector Data and Detector Data Service. More...
 
def _histoSvc
 Trivial helper function to access Histogram Data and Histogram Data Service. More...
 
def _get
 Trivial function to access the data in TES. More...
 
def _getDet
 Trivial function to access the data in TDS. More...
 
def _get_
 get the data from TES using GaudiCommon methods, respecting RootInTES More...
 
def _exist_
 check the data from TES using GaudiCommon methods, respecting RootInTES More...
 
def _ntupleSvc
 Trivial helper function to access NTuple Service. More...
 
def _evtcolSvc
 Trivial helper function to access Event Collection Service. More...
 
def _finalize_
 The default finalization (finalization of base C++ class) More...
 
def _success_
 Dummy method returning success. More...
 
def _hasProperty_
 check the existence of the property with the given name More...
 
def _getProperty_
 get the value of the given property More...
 
def _setProperty_
 set the value for the given property More...
 
def _get_attr_
 get the attribute or property More...
 
def _set_attr_
 set the attribute or property More...
 
def _start_
 
def _execute_
 
def _stop_
 
def _plot1D_
 
def _plot2D_
 
def _plot3D_
 
def _profile1D_
 
def _profile2D_
 
def _decorate_plots_
 
def _nTuple_
 
def _evtCol_
 
def _decorate_tuples_
 
def _t_nTuple_
 
def _t_ntuple_
 
def _t_valid_
 
def _t_write_
 
def _t_column_
 
def _t_column_ll_
 
def _t_column_ull_
 
def _t_array_
 
def _t_matrix_
 
def _t_farray_
 
def _t_fmatrix_
 
def _decorate_algs_
 
def mapvct
 
def _get_all_tools_
 
def _Tools_a_
 
def _Tools_t_
 
def _get_all_counters_
 get all counters More...
 
def _Counters_a_
 get all counters More...
 
def _Counters_t_
 
def _get_counter_
 
def _Counter_a_
 
def _Counter_t_
 
def _get_all_histos_
 
def _Histos_a_
 
def _Histos_t_
 
def _help_
 

Variables

string __author__ = 'Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr'
 
tuple __all__
 
 iAlgorithm = GaudiPython.Bindings.iAlgorithm
 The basic module. More...
 
 iAlgTool = GaudiPython.Bindings.iAlgTool
 
 std = cpp.std
 
tuple Vector = std.vector('double')
 "typedef" for GaudiPython::Vector More...
 
tuple Matrix = std.vector('std::vector<double>')
 "typedef" for GaudiPython::Matrix More...
 
 HID = cpp.GaudiAlg.ID
 histogram and N-Tuple universal identifier More...
 
 HistoID = HID
 
 TID = HID
 
 TupleID = TID
 
 AlgDecorator = cpp.GaudiPython.AlgDecorator
 get the decorator: More...
 
 HistoDecorator = cpp.GaudiPython.HistoDecorator
 
 TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator
 
 TupleDecorator = cpp.GaudiPython.TupleDecorator
 
tuple _GaudiAlgorithm = cpp.GaudiPython.PyAlg( 'GaudiAlgorithm' )
 
tuple _GaudiHistoAlg = cpp.GaudiPython.PyAlg( 'GaudiHistoAlg' )
 
tuple _GaudiTupleAlg = cpp.GaudiPython.PyAlg( 'GaudiTupleAlg' )
 
 Tuple = cpp.Tuples.Tuple
 
 _Dec = TupleDecorator
 
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 1332 of file GaudiAlgs.py.

1333 def _Counter_a_ ( self , name ) :
1334  """
1335  Retrieve the counter managed GaudiCommon<TYPE> base by name:
1336 
1337  >>> alg = ... ## get the algorithm
1338  >>> cnt = alg.Counter('#accept') ## get the counter
1339  >>> print cnt
1340 
1341  """
1342  _cmp = getattr ( self , '_ialg' )
1343  if not _cmp : self.retrieveInterface()
1344  _cmp = getattr ( self , '_ialg' )
1345  return _get_counter_ ( _cmp , '_counter_a_' , name )
# ==============================================================================
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 1346 of file GaudiAlgs.py.

1347 def _Counter_t_ ( self , name ) :
1348  """
1349  Retrieve the counter managed GaudiCommon<TYPE> base by name:
1350 
1351  >>> tool = ... ## get the tool
1352  >>> cnt = tool.Counter('#accept') ## get the counter
1353  >>> print cnt
1354 
1355  """
1356  _cmp = getattr ( self , '_itool' )
1357  if not _cmp : self.retrieveInterface()
1358  _cmp = getattr ( self , '_itool' )
1359  return _get_counter_ ( _cmp , '_counter_t_' , name )
1360 
1361 # =============================================================================
1362 # get all histos
1363 # =============================================================================
1364 cpp.GaudiAlg.ID .__repr__ = cpp.GaudiAlg.ID.idAsString
1365 cpp.GaudiAlg.ID . __str__ = cpp.GaudiAlg.ID.idAsString
1366 cpp.StatEntity .__repr__ = cpp.StatEntity.toString
1367 cpp.StatEntity . __str__ = cpp.StatEntity.toString
# =============================================================================
def GaudiPython.GaudiAlgs._Counters_a_ (   self,
  name = None 
)
private

get all counters

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

1280 def _Counters_a_ ( self , name = None ) :
1281  """
1282  Retrieve the counters, managed GaudiCommon<TYPE> base:
1283 
1284  >>> alg = ... ## get the algorithm
1285  >>> cnts = alg.Counters() ## get the counters
1286  >>> for key in cnts :
1287  ... print key, cnts[key]
1288 
1289 
1290  Retrieve the counter, managed GaudiCommon<TYPE> base by name:
1291 
1292  >>> alg = ... ## get the algorithm
1293  >>> cnt = alg.Counters('MyCounter') ## get the counter
1294  >>> print cnt
1295 
1296  """
1297  _cmp = getattr ( self , '_ialg' )
1298  if not _cmp : self.retrieveInterface()
1299  _cmp = getattr ( self , '_ialg' )
1300  return _get_all_counters_ ( _cmp , '_counters_a_' , name )
# =============================================================================
def _Counters_a_
get all counters
Definition: GaudiAlgs.py:1279
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 1301 of file GaudiAlgs.py.

1302 def _Counters_t_ ( self , name = None ) :
1303  """
1304  Retrieve the counters, managed GaudiCommon<TYPE> base:
1305 
1306  >>> tool = ... ## get the tool
1307  >>> cnts = tool.Counters() ## get the counters
1308  >>> for key in cnts :
1309  ... print key, cnts[key]
1310 
1311 
1312  Retrieve the counter, managed GaudiCommon<TYPE> base by name:
1313 
1314  >>> tool = ... ## get the tool
1315  >>> cnt = tool.Counters('MyCounter') ## get the counter
1316  >>> print cnt
1317 
1318  """
1319  _cmp = getattr ( self , '_itool' )
1320  if not _cmp : self.retrieveInterface()
1321  _cmp = getattr ( self , '_itool' )
1322  return _get_all_counters_ ( _cmp , '_counters_t_' , name )
1323 # =============================================================================
1324 # get the counter
# =============================================================================
def GaudiPython.GaudiAlgs._decorate_algs_ (   klasses)
private

Definition at line 1174 of file GaudiAlgs.py.

1175 def _decorate_algs_ ( klasses ) :
1176  t = type( klasses )
1177  if not issubclass ( t , list ) and \
1178  not issubclass ( t , tuple ) : klasses = [ klasses ]
1179  for _alg in klasses :
1180  for key in _alg_map_ : setattr( _alg , key , _alg_map_[key] )
1181 
# =
string type
Definition: gaudirun.py:126
def GaudiPython.GaudiAlgs._decorate_plots_ (   klasses)
private

Definition at line 992 of file GaudiAlgs.py.

993 def _decorate_plots_ ( klasses ) :
994  t = type( klasses )
995  if not issubclass ( t , list ) and \
996  not issubclass ( t , tuple ) : klasses = [ klasses ]
997  for klass in klasses :
998  klass .plot = _plot1D_
999  klass .plot1D = _plot1D_
1000  klass .plot2D = _plot2D_
1001  klass .plot3D = _plot3D_
1002  klass .profile1D = _profile1D_
1003  klass .profile2D = _profile2D_
string type
Definition: gaudirun.py:126
def GaudiPython.GaudiAlgs._decorate_tuples_ (   klasses)
private

Definition at line 1024 of file GaudiAlgs.py.

1025 def _decorate_tuples_ ( klasses ) :
1026  t = type( klasses )
1027  if not issubclass ( t , list ) and \
1028  not issubclass ( t , tuple ) : klasses = [ klasses ]
1029  for klass in klasses :
1030  klass . nTuple = _nTuple_
1031  klass . evtCol = _evtCol_
1032  klass . ntupleSvc = _ntupleSvc
1033  klass . tupleSvc = _ntupleSvc
1034  klass . ntupSvc = _ntupleSvc
1035  klass . tupSvc = _ntupleSvc
1036  klass . evtColSvc = _evtcolSvc
1037  klass . evtcolSvc = _evtcolSvc
1038 
# ==========================================================
string type
Definition: gaudirun.py:126
def GaudiPython.GaudiAlgs._detSvc (   self)
private

Trivial helper function to access Detector Data and Detector Data Service.

Usage:

1 # get detector data service
2 svc = self.detSvc()
3 
4 # get the data
5 lhcb = self.detSvc('/dd/Structure/LHCb')
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26
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 327 of file GaudiAlgs.py.

328 def _detSvc ( self ) :
329  """
330  Trivial helper function to access Detector Data and Event Data Service
331 
332  Usage:
333  # get detector data service
334  svc = self.detSvc()
335 
336  # get the data
337  lhcb = self.detSvc('/dd/Structure/LHCb')
338  """
339  if not location :
340  return self._detSvc_
341  return self._detSvc_[location]
342 
# =============================================================================
def _detSvc
Trivial helper function to access Detector Data and Detector Data Service.
Definition: GaudiAlgs.py:327
def GaudiPython.GaudiAlgs._evtCol_ (   s,
  a 
)
private
Retrieve (book-on-demand) N-Tuple object for Event Tag Collections

Definition at line 1015 of file GaudiAlgs.py.

1016 def _evtCol_ ( s , *a ) :
1017  """
1018  Retrieve (book-on-demand) N-Tuple object for Event Tag Collections
1019  """
1020  return TupleAlgDecorator.evtCol ( s , *a )
1021 
1022 _nTuple_.__doc__ += '\n' + TupleAlgDecorator.nTuple.__doc__
1023 _evtCol_.__doc__ += '\n' + TupleAlgDecorator.evtCol.__doc__
def GaudiPython.GaudiAlgs._evtcolSvc (   self)
private

Trivial helper function to access Event Collection Service.

Trivial function to access Event Collection Service

Definition at line 417 of file GaudiAlgs.py.

418 def _evtcolSvc ( self ) :
419  """
420  Trivial function to access Event Collection Service
421  """
422  return self._evtcolSvc_
423 
424 
# =============================================================================
def _evtcolSvc
Trivial helper function to access Event Collection Service.
Definition: GaudiAlgs.py:417
def GaudiPython.GaudiAlgs._evtSvc (   self,
  location = None 
)
private

Trivial helper function to access Event Data and Event Data Service.

Usage:

1 # get event data service
2 svc = self.evtSvc()
3 
4 # get the data
5 hits = self.evtSvc('MC/Calo/Hits')
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26
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 294 of file GaudiAlgs.py.

295 def _evtSvc ( self , location = None ) :
296  """
297  Trivial helper function to access Event Data and Event Data Service
298 
299  Usage:
300 
301  # get event data service
302  svc = self.evtSvc()
303 
304  # get the data
305  hits = self.evtSvc('MC/Calo/Hits')
306  """
307  if not location :
308  return self._evtSvc_
309  return self._evtSvc_[location]
310 
# =============================================================================
def _evtSvc
Trivial helper function to access Event Data and Event Data Service.
Definition: GaudiAlgs.py:294
def GaudiPython.GaudiAlgs._execute_ (   self)
private
The fictive 'execute' method, which MUST be overwitten by user

Definition at line 861 of file GaudiAlgs.py.

862 def _execute_ ( self ) :
863  """
864  The fictive 'execute' method, which MUST be overwitten by user
865  """
866  raise RuntimeError, 'Execute method is not implemented for %s' % self.name()
867 
868 GaudiAlgo.execute = _execute_
869 HistoAlgo.execute = _execute_
870 TupleAlgo.execute = _execute_
def GaudiPython.GaudiAlgs._exist_ (   self,
  location,
  rootInTES = True 
)
private

check the data from TES using GaudiCommon methods, respecting RootInTES

Check  the object in Transient Event Store using GaudiCommon machinery,
respecting RootInTES behaviour

Definition at line 400 of file GaudiAlgs.py.

401 def _exist_ ( self , location , rootInTES = True ) :
402  """
403  Check the object in Transient Event Store using GaudiCommon machinery,
404  respecting RootInTES behaviour
405  """
406  return AlgDecorator.exist_ ( self , location , rootInTES )
407 
# =============================================================================
def _exist_
check the data from TES using GaudiCommon methods, respecting RootInTES
Definition: GaudiAlgs.py:400
def GaudiPython.GaudiAlgs._finalize_ (   self)
private

The default finalization (finalization of base C++ class)

The default finalization : finalize the base C++ class

Definition at line 426 of file GaudiAlgs.py.

427 def _finalize_ ( self ) :
428  """
429  The default finalization : finalize the base C++ class
430  """
431  status = self._Base.finalize_ ( self )
432  return status
# =============================================================================
def _finalize_
The default finalization (finalization of base C++ class)
Definition: GaudiAlgs.py:426
def GaudiPython.GaudiAlgs._get (   self,
  location 
)
private

Trivial function to access the data in TES.

Trivial function to access the data in TES using the data service

Definition at line 376 of file GaudiAlgs.py.

377 def _get ( self , location ) :
378  """
379  Trivial function to access the data in TES using the data service
380  """
381  return self._evtSvc_[location]
382 
# =============================================================================
def _get
Trivial function to access the data in TES.
Definition: GaudiAlgs.py:376
def GaudiPython.GaudiAlgs._get_ (   self,
  location,
  rootInTES = True 
)
private

get the data from TES using GaudiCommon methods, respecting RootInTES

Get the object from Transient Event Store using GaudiCommon machinery,
respecting RootInTES behaviour

Definition at line 392 of file GaudiAlgs.py.

393 def _get_ ( self , location , rootInTES = True ) :
394  """
395  Get the object from Transient Event Store using GaudiCommon machinery,
396  respecting RootInTES behaviour
397  """
398  return AlgDecorator.get_ ( self , location , rootInTES )
# =============================================================================
def _get_
get the data from TES using GaudiCommon methods, respecting RootInTES
Definition: GaudiAlgs.py:392
def GaudiPython.GaudiAlgs._get_all_counters_ (   self,
  method,
  name = None 
)
private

get all counters

get all counters

Definition at line 1260 of file GaudiAlgs.py.

1261 def _get_all_counters_ ( self , method , name = None ) :
1262  """
1263  get all counters
1264  """
1265  _cnts = std.vector('const StatEntity*')()
1266  _nams = std.vector('std::string') ()
1267  _func = getattr ( AlgDecorator , method )
1268  _num = _func ( self , _nams , _cnts )
1269  if _nams.size() != _num or _cnts.size() != _num :
1270  raise RuntimeError, 'Unable to extract Counters'
1271  _res = {}
1272  for _i in range(0,_num) :
1273  _nam = _nams[_i]
1274  _cnt = _cnts[_i]
1275  _res [ _nam ] = _cnt
1276  if not name : return _res
1277  return _res.get( name , None )
# =============================================================================
def _get_all_counters_
get all counters
Definition: GaudiAlgs.py:1260
NamedRange_< CONTAINER > range(const CONTAINER &cnt, const std::string &name)
simple function to create the named range form arbitrary container
Definition: NamedRange.h:133
def GaudiPython.GaudiAlgs._get_all_histos_ (   component,
  method,
  name 
)
private
Get All histogram form the component

Definition at line 1368 of file GaudiAlgs.py.

1369 def _get_all_histos_ ( component , method , name ) :
1370  """
1371  Get All histogram form the component
1372  """
1373  _res = {}
1374  for _his in ( std.vector('AIDA::IProfile2D*' ) ,
1375  std.vector('AIDA::IProfile1D*' ) ,
1376  std.vector('AIDA::IHistogram3D*' ) ,
1377  std.vector('AIDA::IHistogram2D*' ) ,
1378  std.vector('AIDA::IHistogram1D*' ) ) :
1379  _his = _his()
1380  _ids = std.vector('GaudiAlg::ID') ()
1381  _fun = getattr ( HistoDecorator , method )
1382  _num = _fun ( component , _ids , _his )
1383  if _ids.size() != _num or _his.size() != _num :
1384  raise RuntimeError, 'Unable to extract Histos!'
1385  for _i in range(0,_num) :
1386  _id = _ids[ _i ]
1387  if _id.numeric() : _id = _id.numericID ()
1388  elif _id.literal() : _id = _id.literalID ()
1389  else : _id = _is.idAsString ()
1390  _res[ _id ] = _his[ _i ]
1391 
1392  if not name : return _res ## return the dictionary
1393 
1394  id = cpp.GaudiAlg.ID ( name )
1395  for i in ( name ,
1396  id.literalID () ,
1397  id.numericID () ,
1398  id.idAsString() , id ) :
1399  h = _res.get( i , None )
1400  if not not h : return h ## return the histogram
1401 
1402  return None
# =============================================================================
NamedRange_< CONTAINER > range(const CONTAINER &cnt, const std::string &name)
simple function to create the named range form arbitrary container
Definition: NamedRange.h:133
def GaudiPython.GaudiAlgs._get_all_tools_ (   self,
  method 
)
private
Get all tools

Definition at line 1210 of file GaudiAlgs.py.

1211 def _get_all_tools_ ( self , method ) :
1212  """
1213  Get all tools
1214  """
1215  _tools = std.vector('IAlgTool*')()
1216  _func = getattr ( AlgDecorator , method )
1217  _num = _func ( self , _tools )
1218  if _tools.size() != _num :
1219  raise RuntimeError, 'Unable to extract Tools'
1220  _res = []
1221  for _tool in _tools : _res += [ iAlgTool ( _tool.name() , _tool ) ]
1222  return _res
# =============================================================================
def GaudiPython.GaudiAlgs._get_attr_ (   self,
  pname 
)
private

get the attribute or property

Get the attribute (or property)
- if the attribute name corresponds to the property name, property value is returned

Definition at line 467 of file GaudiAlgs.py.

468 def _get_attr_ ( self , pname ) :
469  """
470  Get the attribute (or property)
471  - if the attribute name corresponds to the property name, property value is returned
472  """
473  if self.hasProperty( pname ) :
474  return iAlgorithm.__getattr__ ( self , pname )
475  raise AttributeError, 'attribute/property %s does not exist' % pname
476 
# =============================================================================
def _get_attr_
get the attribute or property
Definition: GaudiAlgs.py:467
def GaudiPython.GaudiAlgs._get_counter_ (   self,
  method,
  name 
)
private
get the counter

Definition at line 1325 of file GaudiAlgs.py.

1326 def _get_counter_ ( self , method , name ) :
1327  """
1328  get the counter
1329  """
1330  _func = getattr ( AlgDecorator , method )
1331  return _func ( self , name )
# ==============================================================================
def GaudiPython.GaudiAlgs._getDet (   self,
  location 
)
private

Trivial function to access the data in TDS.

Trivial function to access the data in TDS using data service

Definition at line 384 of file GaudiAlgs.py.

385 def _getDet ( self , location ) :
386  """
387  Trivial function to access the data in TDS using data service
388  """
389  return self._detSvc_[location]
390 
# =============================================================================
def _getDet
Trivial function to access the data in TDS.
Definition: GaudiAlgs.py:384
def GaudiPython.GaudiAlgs._getProperty_ (   self,
  pname 
)
private

get the value of the given property

Get the property by name

Definition at line 447 of file GaudiAlgs.py.

448 def _getProperty_ ( self , pname ) :
449  """
450  Get the property by name
451  """
452  if not self.hasProperty( pname ) :
453  raise AttributeError, 'property %s does not exist' % pname
454  return iAlgorithm.__getattr__( self , pname )
455 
# =============================================================================
def _getProperty_
get the value of the given property
Definition: GaudiAlgs.py:447
def GaudiPython.GaudiAlgs._hasProperty_ (   self,
  pname 
)
private

check the existence of the property with the given name

The trivial function which checks the existence of the property with given name

Definition at line 439 of file GaudiAlgs.py.

440 def _hasProperty_ ( self , pname ) :
441  """
442  The trivial function which checks the existence of the property with given name
443  """
444  return cpp.Gaudi.Utils.hasProperty ( self , pname )
445 
# =============================================================================
def _hasProperty_
check the existence of the property with the given name
Definition: GaudiAlgs.py:439
def GaudiPython.GaudiAlgs._help_ ( )
private

Definition at line 1471 of file GaudiAlgs.py.

1472 def _help_() :
1473  print __doc__ , __author__
1474  print '\t\t\tDoc-string for class GaudiAlgo \n' , GaudiAlgo.__doc__
1475  print '\t\t\tDoc-string for class HistoAlgo \n' , HistoAlgo.__doc__
1476  print '\t\t\tDoc-string for class TupleAlgo \n' , TupleAlgo.__doc__
1477 
1478 # =============================================================================
1479 # pseudo-test suite
# =============================================================================
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 1403 of file GaudiAlgs.py.

1404 def _Histos_a_ ( self , name = None ) :
1405  """
1406  Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1407 
1408  >>> alg = ... ## get the algorithm
1409  >>> histos = alg.Histos() ## get all histograms & profiles
1410  >>> for key in histos :
1411  ... print key, histos[key]
1412 
1413  Retrive the histogram with the certain ID :
1414 
1415  >>> alg = ... ## get the algorithm
1416  >>> histo = alg.Histos('some histo ID') ## get the histo by ID
1417  >>> print histo
1418 
1419  """
1420  _cmp = getattr ( self , '_ialg' )
1421  if not _cmp : self.retrieveInterface()
1422  _cmp = getattr ( self , '_ialg' )
1423  return _get_all_histos_ ( _cmp , '_histos_a_' , name )
# =============================================================================
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 1424 of file GaudiAlgs.py.

1425 def _Histos_t_ ( self , name = None ) :
1426  """
1427  Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1428 
1429  >>> tool = ... ## get the tool
1430  >>> histos = tool.Histos() ## get all histograms & profiles
1431  >>> for key in histos :
1432  ... print key, histos[key]
1433 
1434  Retrive the historgam with certain ID :
1435 
1436  >>> tool = ... ## get the tool
1437  >>> histo = tool.Histos('some histo ID') ## get the histo by ID
1438  >>> print histo
1439 
1440  """
1441  _cmp = getattr ( self , '_itool' )
1442  if not _cmp : self.retrieveInterface()
1443  _cmp = getattr ( self , '_itool' )
1444  return _get_all_histos_ ( _cmp , '_histos_t_' , name )
1445 # =============================================================================
1446 
def GaudiPython.GaudiAlgs._histoSvc (   self,
  address = None 
)
private

Trivial helper function to access Histogram Data and Histogram Data Service.

Usage:

1 # get histogram data service
2 svc = self.histoSvc()
3 
4 # get the data
5 histo = self.histoSvc('/stat/Calo/1')
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26
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 359 of file GaudiAlgs.py.

360 def _histoSvc ( self , address = None ) :
361  """
362  Trivial helper function to access Histogram Data and Histogram Data Service
363 
364  Usage:
365 
366  # get histogram data service
367  svc = self.histoSvc()
368 
369  # get the data
370  histo = self.histoSvc('/stat/Calo/1')
371  """
372  if not address : return self._histoSvc_
373  return self._histoSvc_[ address ]
374 
# =============================================================================
def _histoSvc
Trivial helper function to access Histogram Data and Histogram Data Service.
Definition: GaudiAlgs.py:359
def GaudiPython.GaudiAlgs._init_ (   self,
  name,
  args 
)
private

The constructor from unique algorithm instance name,.

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26
The constructor from unique algorithm instance name & parameters

Definition at line 193 of file GaudiAlgs.py.

194 def _init_ ( self , name , **args ) :
195  """
196  The constructor from unique algorithm instance name & parameters
197  """
198  self._Base.__init__( self , self , name )
199  appMgr = AppMgr()
200  algMgr = appMgr._algmgr
201  status = algMgr.addAlgorithm( self )
202  if status.isFailure() :
203  raise RuntimeError, 'Unable to add Algorithm "' + name + '"'
204  iAlgorithm.__init__ ( self , name , self )
205  for key in args : setattr ( self , key , args[key] )
206  # take some care about the ownership of the algorithms
207  if not appMgr.__dict__.has_key ( 'GaudiPythonAlgos') :
208  appMgr.__dict__[ 'GaudiPythonAlgos'] = []
209  appMgr.__dict__[ 'GaudiPythonAlgos'].append( self )
210 
# =============================================================================
def _init_
The constructor from unique algorithm instance name,.
Definition: GaudiAlgs.py:193
def GaudiPython.GaudiAlgs._initialize_ (   self)
private

The default initialization (initialization of base C++ class + data.

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26
The default initialization (initialization of base C++ class + data)

Definition at line 215 of file GaudiAlgs.py.

216 def _initialize_ ( self ) :
217  """
218  The default initialization (initialization of base C++ class + data)
219  """
220  status = self._Base.initialize_( self )
221  if status.isFailure() : return status
222 
223  # set the basic services
224  _e = self._Base.evtSvc( self )
225  _s = InterfaceCast(cpp.IService)(_e)
226  self._evtSvc_ = iDataSvc ( _s.name() , _e )
227 
228  _d = self._Base.detSvc( self )
229  _s = InterfaceCast(cpp.IService)(_d)
230  self._detSvc_ = iDataSvc ( _s.name() , _d )
231 
232  return status
233 
# =============================================================================
def _initialize_
The default initialization (initialization of base C++ class + data.
Definition: GaudiAlgs.py:215
def GaudiPython.GaudiAlgs._initialize_histo_ (   self)
private

The default initialization (initialization of base C++ class + data members)

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26
The default initialization (initialization of base C++ class + data members)

Definition at line 238 of file GaudiAlgs.py.

239 def _initialize_histo_ ( self ) :
240  """
241  The default initialization (initialization of base C++ class + data members)
242  """
243  status = _initialize_( self )
244  if status.isFailure() : return status
245 
246  # set the basic services
247  _h = self._Base.histoSvc( self )
248  _s = InterfaceCast(cpp.IService)(_h)
249  self._histoSvc_ = iHistogramSvc ( _s.name() , _h )
250 
251  return status
252 
# =============================================================================
def _initialize_
The default initialization (initialization of base C++ class + data.
Definition: GaudiAlgs.py:215
def _initialize_histo_
The default initialization (initialization of base C++ class + data members)
Definition: GaudiAlgs.py:238
def GaudiPython.GaudiAlgs._initialize_tuple_ (   self)
private

The default initialization (initialization of base C++ class + data members)

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26
The default initialization (initialization of base C++ class + data members)

Definition at line 257 of file GaudiAlgs.py.

258 def _initialize_tuple_ ( self ) :
259  """
260  The default initialization (initialization of base C++ class + data members)
261  """
262  status = _initialize_histo_( self )
263  if status.isFailure() : return status
264 
265  # set the basic services
266  if self.produceNTuples() :
267  _n = self._Base.ntupleSvc( self )
268  _s = InterfaceCast(cpp.IService)(_n)
269  self._ntupleSvc_ = iNTupleSvc ( _s.name() , _n )
270 
271  if self.produceEvtCols() :
272  _n = self._Base.evtColSvc( self )
273  _s = InterfaceCast(cpp.IService)(_n)
274  self._evtcolSvc_ = iNTupleSvc ( _s.name() , _n )
275 
276  return status
277 
# =============================================================================
def _initialize_tuple_
The default initialization (initialization of base C++ class + data members)
Definition: GaudiAlgs.py:257
def _initialize_histo_
The default initialization (initialization of base C++ class + data members)
Definition: GaudiAlgs.py:238
def GaudiPython.GaudiAlgs._nTuple_ (   s,
  a 
)
private
Retrieve (book-on-demand) N-Tuple object

Definition at line 1009 of file GaudiAlgs.py.

1010 def _nTuple_ ( s , *a ) :
1011  """
1012  Retrieve (book-on-demand) N-Tuple object
1013  """
1014  return TupleAlgDecorator.nTuple ( s , *a )
# =============================================================================
def GaudiPython.GaudiAlgs._ntupleSvc (   self)
private

Trivial helper function to access NTuple Service.

Trivial function to access N-Tuple Service

Definition at line 409 of file GaudiAlgs.py.

410 def _ntupleSvc ( self ) :
411  """
412  Trivial function to access N-Tuple Service
413  """
414  return self._ntupleSvc_
415 
# =============================================================================
def _ntupleSvc
Trivial helper function to access NTuple Service.
Definition: GaudiAlgs.py:409
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 883 of file GaudiAlgs.py.

884 def _plot1D_ ( s, *a ) :
885  """
886  The basic method to fill (book-on-demand) 1D-histogram
887 
888  The histogram will be created/booked dautomatically according to the
889  specifications:
890 
891  - literal or numerical ID (optional)
892  - title
893  - low edge
894  - high edge
895  - number of bins (default is 100)
896 
897  The reference to the histogram is returned and could be used for later manipulations
898 
899  """
900  return HistoDecorator.plot1D (s,*a)
# =============================================================================
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 901 of file GaudiAlgs.py.

902 def _plot2D_ ( s, *a ) :
903  """
904  The basic method to fill (book-on-demand) 2D-histogram
905 
906  The histogram will be created/booked dautomatically according to the
907  specifications:
908 
909  - literal or numerical ID (optional)
910  - title
911  - low X-edge
912  - high X-edge
913  - low Y-edge
914  - high Y-edge
915  - number of X-bins (default is 50)
916  - number of Y-bins (default is 50)
917 
918  The reference to the histogram is returned and could be used for later manipulations
919 
920  """
921  return HistoDecorator.plot2D (s,*a)
# =============================================================================
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 922 of file GaudiAlgs.py.

923 def _plot3D_ ( s, *a ) :
924  """
925  The basic method to fill (book-on-demand) 3D-histogram
926 
927  The histogram will be created/booked dautomatically according to the
928  specifications:
929 
930  - literal or numerical ID (optional)
931  - title
932  - low X-edge
933  - high X-edge
934  - low Y-edge
935  - high Y-edge
936  - low Z-edge
937  - high Z-edge
938  - number of X-bins (default is 10)
939  - number of Y-bins (default is 10)
940  - number of Y-bins (default is 10)
941 
942  The reference to the histogram is returned and could be used for later manipulations
943 
944  """
945  return HistoDecorator.plot3D (s,*a)
# =============================================================================
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 946 of file GaudiAlgs.py.

947 def _profile1D_ ( s, *a ) :
948  """
949  The basic method to fill (book-on-demand) 1D profile histogram
950 
951  The profile histogram will be created/booked dautomatically
952  according to the specifications:
953 
954  - literal or numerical ID (optional)
955  - title
956  - low X-edge
957  - high X-edge
958  - number of X-bins (default is 100)
959 
960  The reference to the histogram is returned and could be used for later manipulations
961 
962  """
963  return HistoDecorator.profile1D (s,*a)
# =============================================================================
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 964 of file GaudiAlgs.py.

965 def _profile2D_ ( s, *a ) :
966  """
967  The basic method to fill (book-on-demand) 2D profile histiogram
968 
969  The profile histogram will be created/booked automatically
970  according to the specifications:
971 
972  - literal or numerical ID (optional)
973  - title
974  - low X-edge
975  - high X-edge
976  - low Y-edge
977  - high Y-edge
978  - number of X-bins (default is 50)
979  - number of Y-bins (default is 50)
980 
981  The reference to the histogram is returned and could be used for later manipulations
982 
983  """
984  return HistoDecorator.profile2D (s,*a)
985 # =============================================================================
def GaudiPython.GaudiAlgs._service_ (   self,
  interface,
  name,
  create = True 
)
private

Useful method to locate a service:

Usage:

1 ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26
Useful method to locate a service:

Usage:

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

Definition at line 170 of file GaudiAlgs.py.

171  create = True ) :
172  """
173  Useful method to locate a service:
174 
175  Usage:
176 
177  ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
178 
179  """
180  if not interface : interface = cpp.IInterface
181  _svc = AlgDecorator.svc_ ( self , name , create )
182  if not _svc : 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 
# =============================================================================
def GaudiPython.GaudiAlgs._set_attr_ (   self,
  pname,
  pvalue 
)
private

set the attribute or property

Set the attribute (or property) :
- if the attribute name corresponds to the property name, the property is updated

Definition at line 478 of file GaudiAlgs.py.

479 def _set_attr_ ( self , pname , pvalue ) :
480  """
481  Set the attribute (or property) :
482  - if the attribute name corresponds to the property name, the property is updated
483  """
484  if not self.hasProperty( pname ) : self.__dict__[pname] = pvalue
485  else : iAlgorithm.__setattr__ ( self , pname , pvalue )
486 
def _set_attr_
set the attribute or property
Definition: GaudiAlgs.py:478
def GaudiPython.GaudiAlgs._setProperty_ (   self,
  pname,
  pvalue 
)
private

set the value for the given property

Set the property from the value

Definition at line 457 of file GaudiAlgs.py.

458 def _setProperty_ ( self , pname , pvalue ) :
459  """
460  Set the property from the value
461  """
462  if not self.hasProperty( pname ) :
463  raise AttributeError, 'property %s does not exist' % pname
464  return iAlgorithm.__setattr__ ( self , pname , pvalue )
465 
# =============================================================================
def _setProperty_
set the value for the given property
Definition: GaudiAlgs.py:457
def GaudiPython.GaudiAlgs._start_ (   self)
private
The stub 'start' method needed by the internal implementation of PyAlg<>.

Definition at line 850 of file GaudiAlgs.py.

851 def _start_ ( self ) :
852  """
853  The stub 'start' method needed by the internal implementation of PyAlg<>.
854  """
855  # return self._Base.start_(self)
856  return SUCCESS
857 
858 GaudiAlgo.start = _start_
859 HistoAlgo.start = _start_
860 TupleAlgo.start = _start_
def GaudiPython.GaudiAlgs._stop_ (   self)
private
The stub 'stop' method needed by the internal implementation of PyAlg<>.

Definition at line 871 of file GaudiAlgs.py.

872 def _stop_ ( self ) :
873  """
874  The stub 'stop' method needed by the internal implementation of PyAlg<>.
875  """
876  # return self._Base.stop_(self)
877  return SUCCESS
878 
879 GaudiAlgo.stop = _stop_
880 HistoAlgo.stop = _stop_
881 TupleAlgo.stop = _stop_
882 
# =============================================================================
def GaudiPython.GaudiAlgs._success_ (   self)
private

Dummy method returning success.

Definition at line 434 of file GaudiAlgs.py.

435 def _success_ ( self ) : return SUCCESS
436 
437 
# =============================================================================
def _success_
Dummy method returning success.
Definition: GaudiAlgs.py:434
def GaudiPython.GaudiAlgs._t_array_ (   s,
  a 
)
private
Fill the fixed-size array column

Definition at line 1103 of file GaudiAlgs.py.

1104 def _t_array_ ( s , *a ) :
1105  """
1106  Fill the fixed-size array column
1107  """
return _Dec.array ( s , *a )
def GaudiPython.GaudiAlgs._t_column_ (   s,
  a 
)
private
Fill the certain column to n-tuple

Definition at line 1088 of file GaudiAlgs.py.

1089 def _t_column_ ( s , *a ) :
1090  """
1091  Fill the certain column to n-tuple
1092  """
return _Dec.column ( s , *a )
def GaudiPython.GaudiAlgs._t_column_ll_ (   s,
  a 
)
private
Fill the 'long long' column

Definition at line 1093 of file GaudiAlgs.py.

1094 def _t_column_ll_ ( s , *a ) :
1095  """
1096  Fill the 'long long' column
1097  """
return _Dec.column_ll ( s , *a )
def GaudiPython.GaudiAlgs._t_column_ull_ (   s,
  a 
)
private
Fill the 'unsigned long long' column

Definition at line 1098 of file GaudiAlgs.py.

1099 def _t_column_ull_ ( s , *a ) :
1100  """
1101  Fill the 'unsigned long long' column
1102  """
return _Dec.column_ull ( s , *a )
def GaudiPython.GaudiAlgs._t_farray_ (   s,
  a 
)
private
Fill the floating-size array column

Definition at line 1113 of file GaudiAlgs.py.

1114 def _t_farray_ ( s , *a ) :
1115  """
1116  Fill the floating-size array column
1117  """
return _Dec.farray ( s , *a )
def GaudiPython.GaudiAlgs._t_fmatrix_ (   s,
  a 
)
private
Fill the floating-size matrix column

Definition at line 1118 of file GaudiAlgs.py.

1119 def _t_fmatrix_ ( s , *a ) :
1120  """
1121  Fill the floating-size matrix column
1122  """
1123  return _Dec.fmatrix ( s , *a )
def GaudiPython.GaudiAlgs._t_matrix_ (   s,
  a 
)
private
Fill the fixed-size matrix column

Definition at line 1108 of file GaudiAlgs.py.

1109 def _t_matrix_ ( s , *a ) :
1110  """
1111  Fill the fixed-size matrix column
1112  """
return _Dec.matrix ( s , *a )
def GaudiPython.GaudiAlgs._t_nTuple_ (   s,
  a 
)
private
Access to underlying INTuple object

Definition at line 1068 of file GaudiAlgs.py.

1069 def _t_nTuple_ ( s , *a ) :
1070  """
1071  Access to underlying INTuple object
1072  """
return _Dec.nTuple ( s , *a )
def GaudiPython.GaudiAlgs._t_ntuple_ (   s,
  a 
)
private
Access to underlying NTuple::Tuple object

Definition at line 1073 of file GaudiAlgs.py.

1074 def _t_ntuple_ ( s , *a ) :
1075  """
1076  Access to underlying NTuple::Tuple object
1077  """
return _Dec.ntuple ( s , *a )
def GaudiPython.GaudiAlgs._t_valid_ (   s,
  a 
)
private
Valid NTuple::Tuple object?

Definition at line 1078 of file GaudiAlgs.py.

1079 def _t_valid_ ( s , *a ) :
1080  """
1081  Valid NTuple::Tuple object?
1082  """
return _Dec.valid ( s , *a )
def GaudiPython.GaudiAlgs._t_write_ (   s,
  a 
)
private
Commit the row/record to n-tuple

Definition at line 1083 of file GaudiAlgs.py.

1084 def _t_write_ ( s , *a ) :
1085  """
1086  Commit the row/record to n-tuple
1087  """
return _Dec.write ( s , *a )
def GaudiPython.GaudiAlgs._tool_ (   self,
  interface,
  typename,
  name = None,
  parent = None,
  create = True 
)
private

Useful method to locate the tool a certain.

Usage:

1 # locate public tool
2 t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator')
3 # locate private tool
4 t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self)
5 # locate public tool with defined name
6 t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1')
7 # locate private tool with defined name
8 t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self)
9 # locate public tool with defined name
10 t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3')
11 # locate private tool with defined name
12 t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self)
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26
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 123 of file GaudiAlgs.py.

124  create = True ) :
125  """
126  Useful method to locate the tool a certain
127 
128  Usage:
129 
130  # locate public tool
131  t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator')
132  # locate private tool
133  t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self)
134  # locate public tool with defined name
135  t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1')
136  # locate private tool with defined name
137  t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self)
138  # locate public tool with defined name
139  t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3')
140  # locate private tool with defined name
141  t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self)
142 
143  """
144  if not interface : interface = cpp.IAlgTool
145  if not parent : parent = self
146  if name : typename += '/' + name
147  _tool = AlgDecorator.tool_( self , typename , parent , create )
148  if not _tool : return None
149  _tool = InterfaceCast(interface)(_tool)
150  if not _tool :
151  self.Warning('Invalid cast to interface %s' % interface )
152  return None
153  return _tool
154 
# =============================================================================
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 1223 of file GaudiAlgs.py.

1224 def _Tools_a_ ( self ) :
1225  """
1226  Retrieve the list of tools,
1227  aquired by component through GaudiCommon<TYPE> base:
1228 
1229  >>> alg = ... ## get the algorithm
1230  >>> tools = alg.Tools() ## get the tools
1231  >>> for tool in tools :
1232  ... print tool
1233 
1234  """
1235  _cmp = getattr ( self , '_ialg' )
1236  if not _cmp : self.retrieveInterface()
1237  _cmp = getattr ( self , '_ialg' )
1238  return _get_all_tools_ ( _cmp , '_tools_a_' )
# =============================================================================
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 1239 of file GaudiAlgs.py.

1240 def _Tools_t_ ( self ) :
1241  """
1242  Retrieve the list of tools,
1243  aquired by component through GaudiCommon<TYPE> base:
1244 
1245  >>> tool = ... ## get the tool
1246  >>> tools = tool.Tools() ## get the tools
1247  >>> for t in tools :
1248  ... print t
1249 
1250  """
1251  _cmp = getattr ( self , '_itool' )
1252  if not _cmp : self.retrieveInterface()
1253  _cmp = getattr ( self , '_itool' )
1254  return _get_all_tools_ ( _cmp , '_tools_t_' )
1255 
1256 
1257 # =============================================================================
1258 # get the list of counters
# =============================================================================
def GaudiPython.GaudiAlgs.mapvct (   func,
  sequence,
  ovct = None 
)
Helper function to fill histogram/ntuple using 'map'-operation 

Definition at line 1189 of file GaudiAlgs.py.

1190 def mapvct ( func , sequence , ovct = None ) :
1191  """ Helper function to fill histogram/ntuple using 'map'-operation """
1192  if not ovct :
1193  vct = GaudiPython.Vector
1194  else :
1195  vct = ovct
1196  if hasattr( sequence, 'size' ) :
1197  vct.reserve ( vct.size() + sequence.size() )
1198  elif hasattr( sequence, '__len__' ) :
1199  vct.reserve ( vct.size() + len( sequence ) )
1200  for object in sequence :
1201  vct.push_back( func( object ) )
1202  if not ovct : return vct
1203 # =============================================================================
1204 
1205 
1206 
1207 
1208 # =============================================================================
1209 # get the list of tools
# =============================================================================

Variable Documentation

tuple GaudiPython.GaudiAlgs.__all__
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 43 of file GaudiAlgs.py.

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

Definition at line 39 of file GaudiAlgs.py.

dictionary GaudiPython.GaudiAlgs._alg_map_
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' : _hasProperty_ , # check the existence of property with given name
19  'getProperty' : _getProperty_ , # get the property value with given name
20  'setProperty' : _setProperty_ , # set the property with given name
21  '__setattr__' : _set_attr_ , # set the attribute/property with given name
22  '__getattr__' : _get_attr_ # set the attribute/property with given name
23  }

Definition at line 1148 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._Dec = TupleDecorator

Definition at line 1044 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._detSvc_

Definition at line 229 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._evtcolSvc_

Definition at line 273 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._evtSvc_

Definition at line 225 of file GaudiAlgs.py.

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

Definition at line 487 of file GaudiAlgs.py.

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

Definition at line 488 of file GaudiAlgs.py.

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

Definition at line 489 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._histoSvc_

Definition at line 248 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._ntupleSvc_

Definition at line 268 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.AlgDecorator = cpp.GaudiPython.AlgDecorator

get the decorator:

Definition at line 89 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.HID = cpp.GaudiAlg.ID

histogram and N-Tuple universal identifier

Definition at line 83 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.HistoDecorator = cpp.GaudiPython.HistoDecorator

Definition at line 90 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.HistoID = HID

Definition at line 84 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.iAlgorithm = GaudiPython.Bindings.iAlgorithm

The basic module.

Definition at line 56 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.iAlgTool = GaudiPython.Bindings.iAlgTool

Definition at line 57 of file GaudiAlgs.py.

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

"typedef" for GaudiPython::Matrix

Definition at line 80 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.std = cpp.std

Definition at line 75 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TID = HID

Definition at line 85 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.Tuple = cpp.Tuples.Tuple

Definition at line 1043 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator

Definition at line 91 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleDecorator = cpp.GaudiPython.TupleDecorator

Definition at line 92 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleID = TID

Definition at line 86 of file GaudiAlgs.py.

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

"typedef" for GaudiPython::Vector

Definition at line 78 of file GaudiAlgs.py.