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

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
 AIDA -> ROTO converter. More...
 
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 1307 of file GaudiAlgs.py.

1308 def _Counter_a_ ( self , name ) :
1309  """
1310  Retrieve the counter managed GaudiCommon<TYPE> base by name:
1311 
1312  >>> alg = ... ## get the algorithm
1313  >>> cnt = alg.Counter('#accept') ## get the counter
1314  >>> print cnt
1315 
1316  """
1317  _cmp = getattr ( self , '_ialg' )
1318  if not _cmp : self.retrieveInterface()
1319  _cmp = getattr ( self , '_ialg' )
1320  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 1321 of file GaudiAlgs.py.

1322 def _Counter_t_ ( self , name ) :
1323  """
1324  Retrieve the counter managed GaudiCommon<TYPE> base by name:
1325 
1326  >>> tool = ... ## get the tool
1327  >>> cnt = tool.Counter('#accept') ## get the counter
1328  >>> print cnt
1329 
1330  """
1331  _cmp = getattr ( self , '_itool' )
1332  if not _cmp : self.retrieveInterface()
1333  _cmp = getattr ( self , '_itool' )
1334  return _get_counter_ ( _cmp , '_counter_t_' , name )
1335 
1336 # =============================================================================
1337 # get all histos
1338 # =============================================================================
1339 cpp.GaudiAlg.ID .__repr__ = cpp.GaudiAlg.ID.idAsString
1340 cpp.GaudiAlg.ID . __str__ = cpp.GaudiAlg.ID.idAsString
1341 cpp.StatEntity .__repr__ = cpp.StatEntity.toString
1342 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 1254 of file GaudiAlgs.py.

1255 def _Counters_a_ ( self , name = None ) :
1256  """
1257  Retrieve the counters, managed GaudiCommon<TYPE> base:
1258 
1259  >>> alg = ... ## get the algorithm
1260  >>> cnts = alg.Counters() ## get the counters
1261  >>> for key in cnts :
1262  ... print key, cnts[key]
1263 
1264 
1265  Retrieve the counter, managed GaudiCommon<TYPE> base by name:
1266 
1267  >>> alg = ... ## get the algorithm
1268  >>> cnt = alg.Counters('MyCounter') ## get the counter
1269  >>> print cnt
1270 
1271  """
1272  _cmp = getattr ( self , '_ialg' )
1273  if not _cmp : self.retrieveInterface()
1274  _cmp = getattr ( self , '_ialg' )
1275  return _get_all_counters_ ( _cmp , '_counters_a_' , name )
# =============================================================================
def _Counters_a_
get all counters
Definition: GaudiAlgs.py:1254
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 1276 of file GaudiAlgs.py.

1277 def _Counters_t_ ( self , name = None ) :
1278  """
1279  Retrieve the counters, managed GaudiCommon<TYPE> base:
1280 
1281  >>> tool = ... ## get the tool
1282  >>> cnts = tool.Counters() ## get the counters
1283  >>> for key in cnts :
1284  ... print key, cnts[key]
1285 
1286 
1287  Retrieve the counter, managed GaudiCommon<TYPE> base by name:
1288 
1289  >>> tool = ... ## get the tool
1290  >>> cnt = tool.Counters('MyCounter') ## get the counter
1291  >>> print cnt
1292 
1293  """
1294  _cmp = getattr ( self , '_itool' )
1295  if not _cmp : self.retrieveInterface()
1296  _cmp = getattr ( self , '_itool' )
1297  return _get_all_counters_ ( _cmp , '_counters_t_' , name )
1298 # =============================================================================
1299 # get the counter
# =============================================================================
def GaudiPython.GaudiAlgs._decorate_algs_ (   klasses)
private

Definition at line 1149 of file GaudiAlgs.py.

1150 def _decorate_algs_ ( klasses ) :
1151  t = type( klasses )
1152  if not issubclass ( t , list ) and \
1153  not issubclass ( t , tuple ) : klasses = [ klasses ]
1154  for _alg in klasses :
1155  for key in _alg_map_ : setattr( _alg , key , _alg_map_[key] )
1156 
# =
string type
Definition: gaudirun.py:126
def GaudiPython.GaudiAlgs._decorate_plots_ (   klasses)
private

Definition at line 990 of file GaudiAlgs.py.

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

Definition at line 1022 of file GaudiAlgs.py.

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

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

Definition at line 1013 of file GaudiAlgs.py.

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

416 def _evtcolSvc ( self ) :
417  """
418  Trivial function to access Event Collection Service
419  """
420  return self._evtcolSvc_
421 
422 
# =============================================================================
def _evtcolSvc
Trivial helper function to access Event Collection Service.
Definition: GaudiAlgs.py:415
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 292 of file GaudiAlgs.py.

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

Definition at line 859 of file GaudiAlgs.py.

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

399 def _exist_ ( self , location , rootInTES = True ) :
400  """
401  Check the object in Transient Event Store using GaudiCommon machinery,
402  respecting RootInTES behaviour
403  """
404  return AlgDecorator.exist_ ( self , location , rootInTES )
405 
# =============================================================================
def _exist_
check the data from TES using GaudiCommon methods, respecting RootInTES
Definition: GaudiAlgs.py:398
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 424 of file GaudiAlgs.py.

425 def _finalize_ ( self ) :
426  """
427  The default finalization : finalize the base C++ class
428  """
429  status = self._Base.finalize_ ( self )
430  return status
# =============================================================================
def _finalize_
The default finalization (finalization of base C++ class)
Definition: GaudiAlgs.py:424
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 374 of file GaudiAlgs.py.

375 def _get ( self , location ) :
376  """
377  Trivial function to access the data in TES using the data service
378  """
379  return self._evtSvc_[location]
380 
# =============================================================================
def _get
Trivial function to access the data in TES.
Definition: GaudiAlgs.py:374
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 390 of file GaudiAlgs.py.

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

get all counters

get all counters

Definition at line 1235 of file GaudiAlgs.py.

1236 def _get_all_counters_ ( self , method , name = None ) :
1237  """
1238  get all counters
1239  """
1240  _cnts = std.vector('const StatEntity*')()
1241  _nams = std.vector('std::string') ()
1242  _func = getattr ( AlgDecorator , method )
1243  _num = _func ( self , _nams , _cnts )
1244  if _nams.size() != _num or _cnts.size() != _num :
1245  raise RuntimeError, 'Unable to extract Counters'
1246  _res = {}
1247  for _i in range(0,_num) :
1248  _nam = _nams[_i]
1249  _cnt = _cnts[_i]
1250  _res [ _nam ] = _cnt
1251  if not name : return _res
1252  return _res.get( name , None )
# =============================================================================
def _get_all_counters_
get all counters
Definition: GaudiAlgs.py:1235
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 1343 of file GaudiAlgs.py.

1344 def _get_all_histos_ ( component , method , name ) :
1345  """
1346  Get All histogram form the component
1347  """
1348  _res = {}
1349  for _his in ( std.vector('AIDA::IProfile2D*' ) ,
1350  std.vector('AIDA::IProfile1D*' ) ,
1351  std.vector('AIDA::IHistogram3D*' ) ,
1352  std.vector('AIDA::IHistogram2D*' ) ,
1353  std.vector('AIDA::IHistogram1D*' ) ) :
1354  _his = _his()
1355  _ids = std.vector('GaudiAlg::ID') ()
1356  _fun = getattr ( HistoDecorator , method )
1357  _num = _fun ( component , _ids , _his )
1358  if _ids.size() != _num or _his.size() != _num :
1359  raise RuntimeError, 'Unable to extract Histos!'
1360  for _i in range(0,_num) :
1361  _id = _ids[ _i ]
1362  if _id.numeric() : _id = _id.numericID ()
1363  elif _id.literal() : _id = _id.literalID ()
1364  else : _id = _is.idAsString ()
1365  _res[ _id ] = _his[ _i ]
1366 
1367  if not name : return _res ## return the dictionary
1368 
1369  id = cpp.GaudiAlg.ID ( name )
1370  for i in ( name ,
1371  id.literalID () ,
1372  id.numericID () ,
1373  id.idAsString() , id ) :
1374  h = _res.get( i , None )
1375  if not not h : return h ## return the histogram
1376 
1377  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 1185 of file GaudiAlgs.py.

1186 def _get_all_tools_ ( self , method ) :
1187  """
1188  Get all tools
1189  """
1190  _tools = std.vector('IAlgTool*')()
1191  _func = getattr ( AlgDecorator , method )
1192  _num = _func ( self , _tools )
1193  if _tools.size() != _num :
1194  raise RuntimeError, 'Unable to extract Tools'
1195  _res = []
1196  for _tool in _tools : _res += [ iAlgTool ( _tool.name() , _tool ) ]
1197  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 465 of file GaudiAlgs.py.

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

Definition at line 1300 of file GaudiAlgs.py.

1301 def _get_counter_ ( self , method , name ) :
1302  """
1303  get the counter
1304  """
1305  _func = getattr ( AlgDecorator , method )
1306  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 382 of file GaudiAlgs.py.

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

get the value of the given property

Get the property by name

Definition at line 445 of file GaudiAlgs.py.

446 def _getProperty_ ( self , pname ) :
447  """
448  Get the property by name
449  """
450  if not self.hasProperty( pname ) :
451  raise AttributeError, 'property %s does not exist' % pname
452  return iAlgorithm.__getattr__( self , pname )
453 
# =============================================================================
def _getProperty_
get the value of the given property
Definition: GaudiAlgs.py:445
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 437 of file GaudiAlgs.py.

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

Definition at line 1446 of file GaudiAlgs.py.

1447 def _help_() :
1448  print __doc__ , __author__
1449  print '\t\t\tDoc-string for class GaudiAlgo \n' , GaudiAlgo.__doc__
1450  print '\t\t\tDoc-string for class HistoAlgo \n' , HistoAlgo.__doc__
1451  print '\t\t\tDoc-string for class TupleAlgo \n' , TupleAlgo.__doc__
1452 
1453 # =============================================================================
1454 # 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 1378 of file GaudiAlgs.py.

1379 def _Histos_a_ ( self , name = None ) :
1380  """
1381  Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1382 
1383  >>> alg = ... ## get the algorithm
1384  >>> histos = alg.Histos() ## get all histograms & profiles
1385  >>> for key in histos :
1386  ... print key, histos[key]
1387 
1388  Retrive the histogram with the certain ID :
1389 
1390  >>> alg = ... ## get the algorithm
1391  >>> histo = alg.Histos('some histo ID') ## get the histo by ID
1392  >>> print histo
1393 
1394  """
1395  _cmp = getattr ( self , '_ialg' )
1396  if not _cmp : self.retrieveInterface()
1397  _cmp = getattr ( self , '_ialg' )
1398  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 1399 of file GaudiAlgs.py.

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

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

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

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

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

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

Definition at line 1007 of file GaudiAlgs.py.

1008 def _nTuple_ ( s , *a ) :
1009  """
1010  Retrieve (book-on-demand) N-Tuple object
1011  """
1012  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 407 of file GaudiAlgs.py.

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

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

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

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

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

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

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

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

set the value for the given property

Set the property from the value

Definition at line 455 of file GaudiAlgs.py.

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

Definition at line 848 of file GaudiAlgs.py.

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

Definition at line 869 of file GaudiAlgs.py.

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

Dummy method returning success.

Definition at line 432 of file GaudiAlgs.py.

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

Definition at line 1078 of file GaudiAlgs.py.

1079 def _t_array_ ( s , *a ) :
1080  """
1081  Fill the fixed-size array column
1082  """
return _Dec.array ( s , *a )
def GaudiPython.GaudiAlgs._t_column_ (   s,
  a 
)
private
Fill the certain column to n-tuple

Definition at line 1063 of file GaudiAlgs.py.

1064 def _t_column_ ( s , *a ) :
1065  """
1066  Fill the certain column to n-tuple
1067  """
return _Dec.column ( s , *a )
def GaudiPython.GaudiAlgs._t_column_ll_ (   s,
  a 
)
private
Fill the 'long long' column

Definition at line 1068 of file GaudiAlgs.py.

1069 def _t_column_ll_ ( s , *a ) :
1070  """
1071  Fill the 'long long' column
1072  """
return _Dec.column_ll ( s , *a )
def GaudiPython.GaudiAlgs._t_column_ull_ (   s,
  a 
)
private
Fill the 'unsigned long long' column

Definition at line 1073 of file GaudiAlgs.py.

1074 def _t_column_ull_ ( s , *a ) :
1075  """
1076  Fill the 'unsigned long long' column
1077  """
return _Dec.column_ull ( s , *a )
def GaudiPython.GaudiAlgs._t_farray_ (   s,
  a 
)
private
Fill the floating-size array column

Definition at line 1088 of file GaudiAlgs.py.

1089 def _t_farray_ ( s , *a ) :
1090  """
1091  Fill the floating-size array column
1092  """
return _Dec.farray ( s , *a )
def GaudiPython.GaudiAlgs._t_fmatrix_ (   s,
  a 
)
private
Fill the floating-size matrix column

Definition at line 1093 of file GaudiAlgs.py.

1094 def _t_fmatrix_ ( s , *a ) :
1095  """
1096  Fill the floating-size matrix column
1097  """
1098  return _Dec.fmatrix ( s , *a )
def GaudiPython.GaudiAlgs._t_matrix_ (   s,
  a 
)
private
Fill the fixed-size matrix column

Definition at line 1083 of file GaudiAlgs.py.

1084 def _t_matrix_ ( s , *a ) :
1085  """
1086  Fill the fixed-size matrix column
1087  """
return _Dec.matrix ( s , *a )
def GaudiPython.GaudiAlgs._t_nTuple_ (   s,
  a 
)
private
Access to underlying INTuple object

Definition at line 1043 of file GaudiAlgs.py.

1044 def _t_nTuple_ ( s , *a ) :
1045  """
1046  Access to underlying INTuple object
1047  """
return _Dec.nTuple ( s , *a )
def GaudiPython.GaudiAlgs._t_ntuple_ (   s,
  a 
)
private
Access to underlying NTuple::Tuple object

Definition at line 1048 of file GaudiAlgs.py.

1049 def _t_ntuple_ ( s , *a ) :
1050  """
1051  Access to underlying NTuple::Tuple object
1052  """
return _Dec.ntuple ( s , *a )
def GaudiPython.GaudiAlgs._t_valid_ (   s,
  a 
)
private
Valid NTuple::Tuple object?

Definition at line 1053 of file GaudiAlgs.py.

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

Definition at line 1058 of file GaudiAlgs.py.

1059 def _t_write_ ( s , *a ) :
1060  """
1061  Commit the row/record to n-tuple
1062  """
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 121 of file GaudiAlgs.py.

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

1199 def _Tools_a_ ( self ) :
1200  """
1201  Retrieve the list of tools,
1202  aquired by component through GaudiCommon<TYPE> base:
1203 
1204  >>> alg = ... ## get the algorithm
1205  >>> tools = alg.Tools() ## get the tools
1206  >>> for tool in tools :
1207  ... print tool
1208 
1209  """
1210  _cmp = getattr ( self , '_ialg' )
1211  if not _cmp : self.retrieveInterface()
1212  _cmp = getattr ( self , '_ialg' )
1213  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 1214 of file GaudiAlgs.py.

1215 def _Tools_t_ ( self ) :
1216  """
1217  Retrieve the list of tools,
1218  aquired by component through GaudiCommon<TYPE> base:
1219 
1220  >>> tool = ... ## get the tool
1221  >>> tools = tool.Tools() ## get the tools
1222  >>> for t in tools :
1223  ... print t
1224 
1225  """
1226  _cmp = getattr ( self , '_itool' )
1227  if not _cmp : self.retrieveInterface()
1228  _cmp = getattr ( self , '_itool' )
1229  return _get_all_tools_ ( _cmp , '_tools_t_' )
1230 
1231 
1232 # =============================================================================
1233 # 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 1164 of file GaudiAlgs.py.

1165 def mapvct ( func , sequence , ovct = None ) :
1166  """ Helper function to fill histogram/ntuple using 'map'-operation """
1167  if not ovct :
1168  vct = GaudiPython.Vector
1169  else :
1170  vct = ovct
1171  if hasattr( sequence, 'size' ) :
1172  vct.reserve ( vct.size() + sequence.size() )
1173  elif hasattr( sequence, '__len__' ) :
1174  vct.reserve ( vct.size() + len( sequence ) )
1175  for object in sequence :
1176  vct.push_back( func( object ) )
1177  if not ovct : return vct
1178 # =============================================================================
1179 
1180 
1181 
1182 
1183 # =============================================================================
1184 # 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 1123 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._Dec = TupleDecorator

Definition at line 1042 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._detSvc_

Definition at line 227 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._evtcolSvc_

Definition at line 271 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._evtSvc_

Definition at line 223 of file GaudiAlgs.py.

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

Definition at line 485 of file GaudiAlgs.py.

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

Definition at line 486 of file GaudiAlgs.py.

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

Definition at line 487 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._histoSvc_

Definition at line 246 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._ntupleSvc_

Definition at line 266 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.AlgDecorator = cpp.GaudiPython.AlgDecorator

get the decorator:

Definition at line 87 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.HID = cpp.GaudiAlg.ID

histogram and N-Tuple universal identifier

Definition at line 81 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.HistoDecorator = cpp.GaudiPython.HistoDecorator

Definition at line 88 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.HistoID = HID

Definition at line 82 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.iAlgorithm = GaudiPython.Bindings.iAlgorithm

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

GaudiPython.GaudiAlgs.std = cpp.std

AIDA -> ROTO converter.

Definition at line 73 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TID = HID

Definition at line 83 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.Tuple = cpp.Tuples.Tuple

Definition at line 1041 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator

Definition at line 89 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleDecorator = cpp.GaudiPython.TupleDecorator

Definition at line 90 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleID = TID

Definition at line 84 of file GaudiAlgs.py.

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

"typedef" for GaudiPython::Vector

Definition at line 76 of file GaudiAlgs.py.