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_ (self, name, args)
 The constructor from unique algorithm instance name,. More...
 
def _initialize_ (self)
 The default initialization (initialization of base C++ class + data. More...
 
def _initialize_histo_ (self)
 The default initialization (initialization of base C++ class + data members) More...
 
def _initialize_tuple_ (self)
 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 (self)
 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 (self, location)
 Trivial function to access the data in TES. More...
 
def _getDet (self, location)
 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 (self)
 Trivial helper function to access NTuple Service. More...
 
def _evtcolSvc (self)
 Trivial helper function to access Event Collection Service. More...
 
def _finalize_ (self)
 The default finalization (finalization of base C++ class) More...
 
def _success_ (self)
 Dummy method returning success. More...
 
def _hasProperty_ (self, pname)
 check the existence of the property with the given name More...
 
def _getProperty_ (self, pname)
 get the value of the given property More...
 
def _setProperty_ (self, pname, pvalue)
 set the value for the given property More...
 
def _get_attr_ (self, pname)
 get the attribute or property More...
 
def _set_attr_ (self, pname, pvalue)
 set the attribute or property More...
 
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
 
def _get_all_tools_ (self, method)
 
def _Tools_a_ (self)
 
def _Tools_t_ (self)
 
def _get_all_counters_
 get all counters More...
 
def _Counters_a_
 get all counters More...
 
def _Counters_t_
 
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_
 
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 1339 of file GaudiAlgs.py.

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

1353 def _Counter_t_ ( self , name ) :
1354  """
1355  Retrieve the counter managed GaudiCommon<TYPE> base by name:
1356 
1357  >>> tool = ... ## get the tool
1358  >>> cnt = tool.Counter('#accept') ## get the counter
1359  >>> print cnt
1360 
1361  """
1362  _cmp = getattr ( self , '_itool' )
1363  if not _cmp : self.retrieveInterface()
1364  _cmp = getattr ( self , '_itool' )
1365  return _get_counter_ ( _cmp , '_counter_t_' , name )
1366 
1367 # =============================================================================
1368 # get all histos
1369 # =============================================================================
1370 cpp.GaudiAlg.ID .__repr__ = cpp.GaudiAlg.ID.idAsString
1371 cpp.GaudiAlg.ID . __str__ = cpp.GaudiAlg.ID.idAsString
1372 cpp.StatEntity .__repr__ = cpp.StatEntity.toString
1373 cpp.StatEntity . __str__ = cpp.StatEntity.toString
1374 # =============================================================================
def _Counter_t_(self, name)
Definition: GaudiAlgs.py:1353
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 1286 of file GaudiAlgs.py.

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

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

Definition at line 1181 of file GaudiAlgs.py.

1181 def _decorate_algs_ ( klasses ) :
1182  t = type( klasses )
1183  if not issubclass ( t , list ) and \
1184  not issubclass ( t , tuple ) : klasses = [ klasses ]
1185  for _alg in klasses :
1186  for key in _alg_map_ : setattr( _alg , key , _alg_map_[key] )
1187 
1188 # =
def _decorate_algs_(klasses)
Definition: GaudiAlgs.py:1181
string type
Definition: gaudirun.py:151
def GaudiPython.GaudiAlgs._decorate_plots_ (   klasses)
private

Definition at line 992 of file GaudiAlgs.py.

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

Definition at line 1024 of file GaudiAlgs.py.

1024 def _decorate_tuples_ ( klasses ) :
1025  t = type( klasses )
1026  if not issubclass ( t , list ) and \
1027  not issubclass ( t , tuple ) : klasses = [ klasses ]
1028  for klass in klasses :
1029  klass . nTuple = _nTuple_
1030  klass . evtCol = _evtCol_
1031  klass . ntupleSvc = _ntupleSvc
1032  klass . tupleSvc = _ntupleSvc
1033  klass . ntupSvc = _ntupleSvc
1034  klass . tupSvc = _ntupleSvc
1035  klass . evtColSvc = _evtcolSvc
1036  klass . evtcolSvc = _evtcolSvc
1037 
1038 # ==========================================================
def _decorate_tuples_(klasses)
Definition: GaudiAlgs.py:1024
string type
Definition: gaudirun.py:151
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.

327 def _detSvc ( self ) :
328  """
329  Trivial helper function to access Detector Data and Event Data Service
330 
331  Usage:
332  # get detector data service
333  svc = self.detSvc()
334 
335  # get the data
336  lhcb = self.detSvc('/dd/Structure/LHCb')
337  """
338  if not location :
339  return self._detSvc_
340  return self._detSvc_[location]
341 
342 # =============================================================================
def _detSvc(self)
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.

1015 def _evtCol_ ( s , *a ) :
1016  """
1017  Retrieve (book-on-demand) N-Tuple object for Event Tag Collections
1018  """
1019  return TupleAlgDecorator.evtCol ( s , *a )
1020 
1021 _nTuple_.__doc__ += '\n' + TupleAlgDecorator.nTuple.__doc__
1022 _evtCol_.__doc__ += '\n' + TupleAlgDecorator.evtCol.__doc__
1023 
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.

417 def _evtcolSvc ( self ) :
418  """
419  Trivial function to access Event Collection Service
420  """
421  return self._evtcolSvc_
422 
423 
424 # =============================================================================
def _evtcolSvc(self)
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.

294 def _evtSvc ( self , location = None ) :
295  """
296  Trivial helper function to access Event Data and Event Data Service
297 
298  Usage:
299 
300  # get event data service
301  svc = self.evtSvc()
302 
303  # get the data
304  hits = self.evtSvc('MC/Calo/Hits')
305  """
306  if not location :
307  return self._evtSvc_
308  return self._evtSvc_[location]
309 
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.

861 def _execute_ ( self ) :
862  """
863  The fictive 'execute' method, which MUST be overwitten by user
864  """
865  raise RuntimeError, 'Execute method is not implemented for %s' % self.name()
866 
867 GaudiAlgo.execute = _execute_
868 HistoAlgo.execute = _execute_
869 TupleAlgo.execute = _execute_
870 
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.

400 def _exist_ ( self , location , rootInTES = True ) :
401  """
402  Check the object in Transient Event Store using GaudiCommon machinery,
403  respecting RootInTES behaviour
404  """
405  return AlgDecorator.exist_ ( self , location , rootInTES )
406 
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.

426 def _finalize_ ( self ) :
427  """
428  The default finalization : finalize the base C++ class
429  """
430  status = self._Base.finalize_ ( self )
431  return status
432 # =============================================================================
def _finalize_(self)
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.

376 def _get ( self , location ) :
377  """
378  Trivial function to access the data in TES using the data service
379  """
380  return self._evtSvc_[location]
381 
382 # =============================================================================
def _get(self, location)
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.

392 def _get_ ( self , location , rootInTES = True ) :
393  """
394  Get the object from Transient Event Store using GaudiCommon machinery,
395  respecting RootInTES behaviour
396  """
397  return AlgDecorator.get_ ( self , location , rootInTES )
398 # =============================================================================
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 1267 of file GaudiAlgs.py.

1267 def _get_all_counters_ ( self , method , name = None ) :
1268  """
1269  get all counters
1270  """
1271  _cnts = std.vector('const StatEntity*')()
1272  _nams = std.vector('std::string') ()
1273  _func = getattr ( AlgDecorator , method )
1274  _num = _func ( self , _nams , _cnts )
1275  if _nams.size() != _num or _cnts.size() != _num :
1276  raise RuntimeError, 'Unable to extract Counters'
1277  _res = {}
1278  for _i in range(0,_num) :
1279  _nam = _nams[_i]
1280  _cnt = _cnts[_i]
1281  _res [ _nam ] = _cnt
1282  if not name : return _res
1283  return _res.get( name , None )
1284 # =============================================================================
def _get_all_counters_
get all counters
Definition: GaudiAlgs.py:1267
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 1375 of file GaudiAlgs.py.

1375 def _get_all_histos_ ( component , method , name ) :
1376  """
1377  Get All histogram form the component
1378  """
1379  _res = {}
1380  for _his in ( std.vector('AIDA::IProfile2D*' ) ,
1381  std.vector('AIDA::IProfile1D*' ) ,
1382  std.vector('AIDA::IHistogram3D*' ) ,
1383  std.vector('AIDA::IHistogram2D*' ) ,
1384  std.vector('AIDA::IHistogram1D*' ) ) :
1385  _his = _his()
1386  _ids = std.vector('GaudiAlg::ID') ()
1387  _fun = getattr ( HistoDecorator , method )
1388  _num = _fun ( component , _ids , _his )
1389  if _ids.size() != _num or _his.size() != _num :
1390  raise RuntimeError, 'Unable to extract Histos!'
1391  for _i in range(0,_num) :
1392  _id = _ids[ _i ]
1393  if _id.numeric() : _id = _id.numericID ()
1394  elif _id.literal() : _id = _id.literalID ()
1395  else : _id = _is.idAsString ()
1396  _res[ _id ] = _his[ _i ]
1397 
1398  if not name : return _res ## return the dictionary
1399 
1400  id = cpp.GaudiAlg.ID ( name )
1401  for i in ( name ,
1402  id.literalID () ,
1403  id.numericID () ,
1404  id.idAsString() , id ) :
1405  h = _res.get( i , None )
1406  if not not h : return h ## return the histogram
1407 
1408  return None
1409 # =============================================================================
def _get_all_histos_(component, method, name)
Definition: GaudiAlgs.py:1375
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 1217 of file GaudiAlgs.py.

1217 def _get_all_tools_ ( self , method ) :
1218  """
1219  Get all tools
1220  """
1221  _tools = std.vector('IAlgTool*')()
1222  _func = getattr ( AlgDecorator , method )
1223  _num = _func ( self , _tools )
1224  if _tools.size() != _num :
1225  raise RuntimeError, 'Unable to extract Tools'
1226  _res = []
1227  for _tool in _tools : _res += [ iAlgTool ( _tool.name() , _tool ) ]
1228  return _res
1229 # =============================================================================
def _get_all_tools_(self, method)
Definition: GaudiAlgs.py:1217
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.

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

Definition at line 1332 of file GaudiAlgs.py.

1332 def _get_counter_ ( self , method , name ) :
1333  """
1334  get the counter
1335  """
1336  _func = getattr ( AlgDecorator , method )
1337  return _func ( self , name )
1338 # ==============================================================================
def _get_counter_(self, method, name)
Definition: GaudiAlgs.py:1332
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.

384 def _getDet ( self , location ) :
385  """
386  Trivial function to access the data in TDS using data service
387  """
388  return self._detSvc_[location]
389 
390 # =============================================================================
def _getDet(self, location)
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.

447 def _getProperty_ ( self , pname ) :
448  """
449  Get the property by name
450  """
451  if not self.hasProperty( pname ) :
452  raise AttributeError, 'property %s does not exist' % pname
453  return iAlgorithm.__getattr__( self , pname )
454 
455 # =============================================================================
def _getProperty_(self, pname)
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.

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

Definition at line 1478 of file GaudiAlgs.py.

1478 def _help_() :
1479  print __doc__ , __author__
1480  print '\t\t\tDoc-string for class GaudiAlgo \n' , GaudiAlgo.__doc__
1481  print '\t\t\tDoc-string for class HistoAlgo \n' , HistoAlgo.__doc__
1482  print '\t\t\tDoc-string for class TupleAlgo \n' , TupleAlgo.__doc__
1483 
1484 # =============================================================================
1485 # pseudo-test suite
1486 # =============================================================================
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 1410 of file GaudiAlgs.py.

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

1431 def _Histos_t_ ( self , name = None ) :
1432  """
1433  Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1434 
1435  >>> tool = ... ## get the tool
1436  >>> histos = tool.Histos() ## get all histograms & profiles
1437  >>> for key in histos :
1438  ... print key, histos[key]
1439 
1440  Retrive the historgam with certain ID :
1441 
1442  >>> tool = ... ## get the tool
1443  >>> histo = tool.Histos('some histo ID') ## get the histo by ID
1444  >>> print histo
1445 
1446  """
1447  _cmp = getattr ( self , '_itool' )
1448  if not _cmp : self.retrieveInterface()
1449  _cmp = getattr ( self , '_itool' )
1450  return _get_all_histos_ ( _cmp , '_histos_t_' , name )
1451 # =============================================================================
1452 
1453 
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.

359 def _histoSvc ( self , address = None ) :
360  """
361  Trivial helper function to access Histogram Data and Histogram Data Service
362 
363  Usage:
364 
365  # get histogram data service
366  svc = self.histoSvc()
367 
368  # get the data
369  histo = self.histoSvc('/stat/Calo/1')
370  """
371  if not address : return self._histoSvc_
372  return self._histoSvc_[ address ]
373 
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.

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

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

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

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

Definition at line 1009 of file GaudiAlgs.py.

1009 def _nTuple_ ( s , *a ) :
1010  """
1011  Retrieve (book-on-demand) N-Tuple object
1012  """
1013  return TupleAlgDecorator.nTuple ( s , *a )
1014 # =============================================================================
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.

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

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

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

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

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

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

170  create = True ) :
171  """
172  Useful method to locate a service:
173 
174  Usage:
175 
176  ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
177 
178  """
179  if not interface : interface = cpp.IInterface
180  _svc = AlgDecorator.svc_ ( self , name , create )
181  if not _svc : return None
182  _svc = InterfaceCast(interface)(_svc)
183  if not _svc :
184  self.Warning('Invalid cast to interface %s' % interface )
185  return None
186  return _svc
187 
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.

478 def _set_attr_ ( self , pname , pvalue ) :
479  """
480  Set the attribute (or property) :
481  - if the attribute name corresponds to the property name, the property is updated
482  """
483  if not self.hasProperty( pname ) : self.__dict__[pname] = pvalue
484  else : iAlgorithm.__setattr__ ( self , pname , pvalue )
485 
486 
def _set_attr_(self, pname, pvalue)
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.

457 def _setProperty_ ( self , pname , pvalue ) :
458  """
459  Set the property from the value
460  """
461  if not self.hasProperty( pname ) :
462  raise AttributeError, 'property %s does not exist' % pname
463  return iAlgorithm.__setattr__ ( self , pname , pvalue )
464 
465 # =============================================================================
def _setProperty_(self, pname, pvalue)
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.

850 def _start_ ( self ) :
851  """
852  The stub 'start' method needed by the internal implementation of PyAlg<>.
853  """
854  # return self._Base.start_(self)
855  return SUCCESS
856 
857 GaudiAlgo.start = _start_
858 HistoAlgo.start = _start_
859 TupleAlgo.start = _start_
860 
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.

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

Dummy method returning success.

Definition at line 434 of file GaudiAlgs.py.

434 def _success_ ( self ) : return SUCCESS
435 
436 
437 # =============================================================================
def _success_(self)
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 1110 of file GaudiAlgs.py.

1110 def _t_array_ ( s , *a ) :
1111  """
1112  Fill the fixed-size array column
1113  """
1114  return _Dec.array ( s , *a )
def GaudiPython.GaudiAlgs._t_column_ (   s,
  a 
)
private
Fill the certain column to n-tuple

Definition at line 1095 of file GaudiAlgs.py.

1095 def _t_column_ ( s , *a ) :
1096  """
1097  Fill the certain column to n-tuple
1098  """
1099  return _Dec.column ( s , *a )
def GaudiPython.GaudiAlgs._t_column_ll_ (   s,
  a 
)
private
Fill the 'long long' column

Definition at line 1100 of file GaudiAlgs.py.

1100 def _t_column_ll_ ( s , *a ) :
1101  """
1102  Fill the 'long long' column
1103  """
1104  return _Dec.column_ll ( s , *a )
def _t_column_ll_(s, a)
Definition: GaudiAlgs.py:1100
def GaudiPython.GaudiAlgs._t_column_ull_ (   s,
  a 
)
private
Fill the 'unsigned long long' column

Definition at line 1105 of file GaudiAlgs.py.

1105 def _t_column_ull_ ( s , *a ) :
1106  """
1107  Fill the 'unsigned long long' column
1108  """
1109  return _Dec.column_ull ( s , *a )
def _t_column_ull_(s, a)
Definition: GaudiAlgs.py:1105
def GaudiPython.GaudiAlgs._t_farray_ (   s,
  a 
)
private
Fill the floating-size array column

Definition at line 1120 of file GaudiAlgs.py.

1120 def _t_farray_ ( s , *a ) :
1121  """
1122  Fill the floating-size array column
1123  """
1124  return _Dec.farray ( s , *a )
def GaudiPython.GaudiAlgs._t_fmatrix_ (   s,
  a 
)
private
Fill the floating-size matrix column

Definition at line 1125 of file GaudiAlgs.py.

1125 def _t_fmatrix_ ( s , *a ) :
1126  """
1127  Fill the floating-size matrix column
1128  """
1129  return _Dec.fmatrix ( s , *a )
1130 
def GaudiPython.GaudiAlgs._t_matrix_ (   s,
  a 
)
private
Fill the fixed-size matrix column

Definition at line 1115 of file GaudiAlgs.py.

1115 def _t_matrix_ ( s , *a ) :
1116  """
1117  Fill the fixed-size matrix column
1118  """
1119  return _Dec.matrix ( s , *a )
def GaudiPython.GaudiAlgs._t_nTuple_ (   s,
  a 
)
private
Access to underlying INTuple object

Definition at line 1075 of file GaudiAlgs.py.

1075 def _t_nTuple_ ( s , *a ) :
1076  """
1077  Access to underlying INTuple object
1078  """
1079  return _Dec.nTuple ( s , *a )
def GaudiPython.GaudiAlgs._t_ntuple_ (   s,
  a 
)
private
Access to underlying NTuple::Tuple object

Definition at line 1080 of file GaudiAlgs.py.

1080 def _t_ntuple_ ( s , *a ) :
1081  """
1082  Access to underlying NTuple::Tuple object
1083  """
1084  return _Dec.ntuple ( s , *a )
def GaudiPython.GaudiAlgs._t_valid_ (   s,
  a 
)
private
Valid NTuple::Tuple object?

Definition at line 1085 of file GaudiAlgs.py.

1085 def _t_valid_ ( s , *a ) :
1086  """
1087  Valid NTuple::Tuple object?
1088  """
1089  return _Dec.valid ( s , *a )
def GaudiPython.GaudiAlgs._t_write_ (   s,
  a 
)
private
Commit the row/record to n-tuple

Definition at line 1090 of file GaudiAlgs.py.

1090 def _t_write_ ( s , *a ) :
1091  """
1092  Commit the row/record to n-tuple
1093  """
1094  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.

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

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

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

Definition at line 1196 of file GaudiAlgs.py.

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

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 1155 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.