| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Classes | Functions | Variables
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_ (self, interface, typename, name=None, parent=None, create=True)
| Useful method to locate the tool a certain. More...
def | _service_ (self, interface, name, create=True)
| 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 (self, location=None)
| 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 (self, address=None)
| 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_ (self, location, rootInTES=True)
| get the data from TES using GaudiCommon methods, respecting RootInTES More...
def | _exist_ (self, location, rootInTES=True)
| 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 (func, sequence, ovct=None)
def | _get_all_tools_ (self, method)
def | _Tools_a_ (self)
def | _Tools_t_ (self)
def | _get_all_counters_ (self, method, name=None)
| get all counters More...
def | _Counters_a_ (self, name=None)
| get all counters More...
def | _Counters_t_ (self, name=None)
def | _get_counter_ (self, method, name)
def | _Counter_a_ (self, name)
def | _Counter_t_ (self, name)
def | _get_all_histos_ (component, method, name)
def | _Histos_a_ (self, name=None)
def | _Histos_t_ (self, name=None)
def | _help_ ()

## Variables
string | __author__ = 'Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr'
tuple | __all__
| iAlgorithm = GaudiPython.Bindings.iAlgorithm
| The basic module. More...
| iAlgTool = GaudiPython.Bindings.iAlgTool
| std = cpp.std
| Vector = std.vector('double')
| "typedef" for GaudiPython::Vector More...
| 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
| _GaudiAlgorithm = cpp.GaudiPython.PyAlg( 'GaudiAlgorithm' )
| _GaudiHistoAlg = cpp.GaudiPython.PyAlg( 'GaudiHistoAlg' )
| _GaudiTupleAlg = cpp.GaudiPython.PyAlg( 'GaudiTupleAlg' )
| Tuple = cpp.Tuples.Tuple
| _Dec = TupleDecorator
| column
| nTuple
| ntuple
| valid
| write
| column_ll
| column_ull
| array
| matrix
| farray
| fmatrix
dictionary | _alg_map_
| Tools
| Counters
| Counter
| Histos
| _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 1337 of file GaudiAlgs.py.

1337 def _Counter_a_ ( self , name ) :
1338 """
1339 Retrieve the counter managed GaudiCommon<TYPE> base by name:
1340
1341 >>> alg = ... ## get the algorithm
1342 >>> cnt = alg.Counter('#accept') ## get the counter
1343 >>> print cnt
1344
1345 """
1346 _cmp = getattr ( self , '_ialg' )
1347 if not _cmp : self.retrieveInterface()
1348 _cmp = getattr ( self , '_ialg' )
1349 return _get_counter_ ( _cmp , '_counter_a_' , name )
1350 # ==============================================================================
GaudiPython.GaudiAlgs._Counter_a_
def _Counter_a_(self, name)
Definition: GaudiAlgs.py:1337

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

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

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

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

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

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

def GaudiPython.GaudiAlgs._decorate_algs_ | ( |  | klasses | ) |
| private

Definition at line 1179 of file GaudiAlgs.py.

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

def GaudiPython.GaudiAlgs._decorate_plots_ | ( |  | klasses | ) |
| private

Definition at line 990 of file GaudiAlgs.py.

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

def GaudiPython.GaudiAlgs._decorate_tuples_ | ( |  | klasses | ) |
| private

Definition at line 1022 of file GaudiAlgs.py.

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

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.

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

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

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.

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

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

859 def _execute_ ( self ) :
860 """
861 The fictive 'execute' method, which MUST be overwitten by user
862 """
863 raise RuntimeError, 'Execute method is not implemented for %s' % self.name()
864
865 GaudiAlgo.execute = _execute_
866 HistoAlgo.execute = _execute_
867 TupleAlgo.execute = _execute_
868
GaudiPython.GaudiAlgs._execute_
def _execute_(self)
Definition: GaudiAlgs.py:859

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.

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

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

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

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

1265 def _get_all_counters_ ( self , method , name = None ) :
1266 """
1267 get all counters
1268 """
1269 _cnts = std.vector('const StatEntity*')()
1270 _nams = std.vector('std::string') ()
1271 _func = getattr ( AlgDecorator , method )
1272 _num = _func ( self , _nams , _cnts )
1273 if _nams.size() != _num or _cnts.size() != _num :
1274 raise RuntimeError, 'Unable to extract Counters'
1275 _res = {}
1276 for _i in range(0,_num) :
1277 _nam = _nams[_i]
1278 _cnt = _cnts[_i]
1279 _res [ _nam ] = _cnt
1280 if not name : return _res
1281 return _res.get( name , None )
1282 # =============================================================================
Gaudi::Functional::details::zip::range
decltype(auto) range(Args &&...args)
Zips multiple containers together to form a single range.
Definition: FunctionalDetails.h:57
GaudiPython.GaudiAlgs._get_all_counters_
def _get_all_counters_(self, method, name=None)
get all counters
Definition: GaudiAlgs.py:1265
std::vector
STL class.

def GaudiPython.GaudiAlgs._get_all_histos_ | ( |  | component,
|  |  | method,
|  |  | name
| ) |  |
| private

    Get All histogram form the component

Definition at line 1373 of file GaudiAlgs.py.

1373 def _get_all_histos_ ( component , method , name ) :
1374 """
1375 Get All histogram form the component
1376 """
1377 _res = {}
1378 for _his in ( std.vector('AIDA::IProfile2D*' ) ,
1379 std.vector('AIDA::IProfile1D*' ) ,
1380 std.vector('AIDA::IHistogram3D*' ) ,
1381 std.vector('AIDA::IHistogram2D*' ) ,
1382 std.vector('AIDA::IHistogram1D*' ) ) :
1383 _his = _his()
1384 _ids = std.vector('GaudiAlg::ID') ()
1385 _fun = getattr ( HistoDecorator , method )
1386 _num = _fun ( component , _ids , _his )
1387 if _ids.size() != _num or _his.size() != _num :
1388 raise RuntimeError, 'Unable to extract Histos!'
1389 for _i in range(0,_num) :
1390 _id = _ids[ _i ]
1391 if _id.numeric() : _id = _id.numericID ()
1392 elif _id.literal() : _id = _id.literalID ()
1393 else : _id = _is.idAsString ()
1394 _res[ _id ] = _his[ _i ]
1395
1396 if not name : return _res ## return the dictionary
1397
1398 id = cpp.GaudiAlg.ID ( name )
1399 for i in ( name ,
1400 id.literalID () ,
1401 id.numericID () ,
1402 id.idAsString() , id ) :
1403 h = _res.get( i , None )
1404 if not not h : return h ## return the histogram
1405
1406 return None
1407 # =============================================================================
Gaudi::Functional::details::zip::range
decltype(auto) range(Args &&...args)
Zips multiple containers together to form a single range.
Definition: FunctionalDetails.h:57
GaudiPython.GaudiAlgs._get_all_histos_
def _get_all_histos_(component, method, name)
Definition: GaudiAlgs.py:1373
std::vector
STL class.

def GaudiPython.GaudiAlgs._get_all_tools_ | ( |  | self,
|  |  | method
| ) |  |
| private

    Get all tools

Definition at line 1215 of file GaudiAlgs.py.

1215 def _get_all_tools_ ( self , method ) :
1216 """
1217 Get all tools
1218 """
1219 _tools = std.vector('IAlgTool*')()
1220 _func = getattr ( AlgDecorator , method )
1221 _num = _func ( self , _tools )
1222 if _tools.size() != _num :
1223 raise RuntimeError, 'Unable to extract Tools'
1224 _res = []
1225 for _tool in _tools : _res += [ iAlgTool ( _tool.name() , _tool ) ]
1226 return _res
1227 # =============================================================================
std::vector
STL class.
GaudiPython.GaudiAlgs._get_all_tools_
def _get_all_tools_(self, method)
Definition: GaudiAlgs.py:1215

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.

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

def GaudiPython.GaudiAlgs._get_counter_ | ( |  | self,
|  |  | method,
|  |  | name
| ) |  |
| private

    get the counter

Definition at line 1330 of file GaudiAlgs.py.

1330 def _get_counter_ ( self , method , name ) :
1331 """
1332 get the counter
1333 """
1334 _func = getattr ( AlgDecorator , method )
1335 return _func ( self , name )
1336 # ==============================================================================
GaudiPython.GaudiAlgs._get_counter_
def _get_counter_(self, method, name)
Definition: GaudiAlgs.py:1330

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.

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

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

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

def GaudiPython.GaudiAlgs._help_ | ( |  | ) |
| private

Definition at line 1476 of file GaudiAlgs.py.

1476 def _help_() :
1477 print __doc__ , __author__
1478 print '\t\t\tDoc-string for class GaudiAlgo \n' , GaudiAlgo.__doc__
1479 print '\t\t\tDoc-string for class HistoAlgo \n' , HistoAlgo.__doc__
1480 print '\t\t\tDoc-string for class TupleAlgo \n' , TupleAlgo.__doc__
1481
1482 # =============================================================================
1483 # pseudo-test suite
1484 # =============================================================================
GaudiPython.GaudiAlgs._help_
def _help_()
Definition: GaudiAlgs.py:1476

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

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

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

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

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.

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

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

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.

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

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

255 def _initialize_tuple_ ( self ) :
256 """
257 The default initialization (initialization of base C++ class + data members)
258 """
259 status = _initialize_histo_( self )
260 if status.isFailure() : return status
261
262 # set the basic services
263 if self.produceNTuples() :
264 _n = self._Base.ntupleSvc( self )
265 _s = InterfaceCast(cpp.IService)(_n)
266 self._ntupleSvc_ = iNTupleSvc ( _s.name() , _n )
267
268 if self.produceEvtCols() :
269 _n = self._Base.evtColSvc( self )
270 _s = InterfaceCast(cpp.IService)(_n)
271 self._evtcolSvc_ = iNTupleSvc ( _s.name() , _n )
272
273 return status
274
275 # =============================================================================
GaudiPython.Bindings.InterfaceCast
Definition: Bindings.py:86
GaudiPython.GaudiAlgs._initialize_tuple_
def _initialize_tuple_(self)
The default initialization (initialization of base C++ class + data members)
Definition: GaudiAlgs.py:255
GaudiPython.GaudiAlgs._initialize_histo_
def _initialize_histo_(self)
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.

1007 def _nTuple_ ( s , *a ) :
1008 """
1009 Retrieve (book-on-demand) N-Tuple object
1010 """
1011 return TupleAlgDecorator.nTuple ( s , *a )
1012 # =============================================================================
GaudiPython.GaudiAlgs._nTuple_
def _nTuple_(s, a)
Definition: GaudiAlgs.py:1007

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.

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

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

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.

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

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.

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

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.

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

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.

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

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.

168 create = True ) :
169 """
170 Useful method to locate a service:
171
172 Usage:
173
174 ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
175
176 """
177 if not interface : interface = cpp.IInterface
178 _svc = AlgDecorator.svc_ ( self , name , create )
179 if not _svc : return None
180 _svc = InterfaceCast(interface)(_svc)
181 if not _svc :
182 self.Warning('Invalid cast to interface %s' % interface )
183 return None
184 return _svc
185
186 # =============================================================================
GaudiPython.Bindings.InterfaceCast
Definition: Bindings.py:86

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.

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

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

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

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.

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

def GaudiPython.GaudiAlgs._success_ | ( |  | self | ) |
| private

Dummy method returning success.

Definition at line 432 of file GaudiAlgs.py.

432 def _success_ ( self ) : return SUCCESS
433
434
435 # =============================================================================
GaudiPython.GaudiAlgs._success_
def _success_(self)
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 1108 of file GaudiAlgs.py.

1108 def _t_array_ ( s , *a ) :
1109 """
1110 Fill the fixed-size array column
1111 """
1112 return _Dec.array ( s , *a )
GaudiPython.GaudiAlgs._t_array_
def _t_array_(s, a)
Definition: GaudiAlgs.py:1108

def GaudiPython.GaudiAlgs._t_column_ | ( |  | s,
|  |  | a
| ) |  |
| private

    Fill the certain column to n-tuple

Definition at line 1093 of file GaudiAlgs.py.

1093 def _t_column_ ( s , *a ) :
1094 """
1095 Fill the certain column to n-tuple
1096 """
1097 return _Dec.column ( s , *a )
GaudiPython.GaudiAlgs._t_column_
def _t_column_(s, a)
Definition: GaudiAlgs.py:1093

def GaudiPython.GaudiAlgs._t_column_ll_ | ( |  | s,
|  |  | a
| ) |  |
| private

    Fill the 'long long' column

Definition at line 1098 of file GaudiAlgs.py.

1098 def _t_column_ll_ ( s , *a ) :
1099 """
1100 Fill the 'long long' column
1101 """
1102 return _Dec.column_ll ( s , *a )
GaudiPython.GaudiAlgs._t_column_ll_
def _t_column_ll_(s, a)
Definition: GaudiAlgs.py:1098

def GaudiPython.GaudiAlgs._t_column_ull_ | ( |  | s,
|  |  | a
| ) |  |
| private

    Fill the 'unsigned long long' column

Definition at line 1103 of file GaudiAlgs.py.

1103 def _t_column_ull_ ( s , *a ) :
1104 """
1105 Fill the 'unsigned long long' column
1106 """
1107 return _Dec.column_ull ( s , *a )
GaudiPython.GaudiAlgs._t_column_ull_
def _t_column_ull_(s, a)
Definition: GaudiAlgs.py:1103

def GaudiPython.GaudiAlgs._t_farray_ | ( |  | s,
|  |  | a
| ) |  |
| private

    Fill the floating-size array column

Definition at line 1118 of file GaudiAlgs.py.

1118 def _t_farray_ ( s , *a ) :
1119 """
1120 Fill the floating-size array column
1121 """
1122 return _Dec.farray ( s , *a )
GaudiPython.GaudiAlgs._t_farray_
def _t_farray_(s, a)
Definition: GaudiAlgs.py:1118

def GaudiPython.GaudiAlgs._t_fmatrix_ | ( |  | s,
|  |  | a
| ) |  |
| private

    Fill the floating-size matrix column

Definition at line 1123 of file GaudiAlgs.py.

1123 def _t_fmatrix_ ( s , *a ) :
1124 """
1125 Fill the floating-size matrix column
1126 """
1127 return _Dec.fmatrix ( s , *a )
1128
GaudiPython.GaudiAlgs._t_fmatrix_
def _t_fmatrix_(s, a)
Definition: GaudiAlgs.py:1123

def GaudiPython.GaudiAlgs._t_matrix_ | ( |  | s,
|  |  | a
| ) |  |
| private

    Fill the fixed-size matrix column

Definition at line 1113 of file GaudiAlgs.py.

1113 def _t_matrix_ ( s , *a ) :
1114 """
1115 Fill the fixed-size matrix column
1116 """
1117 return _Dec.matrix ( s , *a )
GaudiPython.GaudiAlgs._t_matrix_
def _t_matrix_(s, a)
Definition: GaudiAlgs.py:1113

def GaudiPython.GaudiAlgs._t_nTuple_ | ( |  | s,
|  |  | a
| ) |  |
| private

    Access to underlying INTuple object

Definition at line 1073 of file GaudiAlgs.py.

1073 def _t_nTuple_ ( s , *a ) :
1074 """
1075 Access to underlying INTuple object
1076 """
1077 return _Dec.nTuple ( s , *a )
GaudiPython.GaudiAlgs._t_nTuple_
def _t_nTuple_(s, a)
Definition: GaudiAlgs.py:1073

def GaudiPython.GaudiAlgs._t_ntuple_ | ( |  | s,
|  |  | a
| ) |  |
| private

    Access to underlying NTuple::Tuple object

Definition at line 1078 of file GaudiAlgs.py.

1078 def _t_ntuple_ ( s , *a ) :
1079 """
1080 Access to underlying NTuple::Tuple object
1081 """
1082 return _Dec.ntuple ( s , *a )
GaudiPython.GaudiAlgs._t_ntuple_
def _t_ntuple_(s, a)
Definition: GaudiAlgs.py:1078

def GaudiPython.GaudiAlgs._t_valid_ | ( |  | s,
|  |  | a
| ) |  |
| private

    Valid NTuple::Tuple object?

Definition at line 1083 of file GaudiAlgs.py.

1083 def _t_valid_ ( s , *a ) :
1084 """
1085 Valid NTuple::Tuple object?
1086 """
1087 return _Dec.valid ( s , *a )
GaudiPython.GaudiAlgs._t_valid_
def _t_valid_(s, a)
Definition: GaudiAlgs.py:1083

def GaudiPython.GaudiAlgs._t_write_ | ( |  | s,
|  |  | a
| ) |  |
| private

    Commit the row/record to n-tuple

Definition at line 1088 of file GaudiAlgs.py.

1088 def _t_write_ ( s , *a ) :
1089 """
1090 Commit the row/record to n-tuple
1091 """
1092 return _Dec.write ( s , *a )
GaudiPython.GaudiAlgs._t_write_
def _t_write_(s, a)
Definition: GaudiAlgs.py:1088

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.

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

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

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

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

1244 def _Tools_t_ ( self ) :
1245 """
1246 Retrieve the list of tools,
1247 aquired by component through GaudiCommon<TYPE> base:
1248
1249 >>> tool = ... ## get the tool
1250 >>> tools = tool.Tools() ## get the tools
1251 >>> for t in tools :
1252 ... print t
1253
1254 """
1255 _cmp = getattr ( self , '_itool' )
1256 if not _cmp : self.retrieveInterface()
1257 _cmp = getattr ( self , '_itool' )
1258 return _get_all_tools_ ( _cmp , '_tools_t_' )
1259
1260
1261 # =============================================================================
1262 # get the list of counters
1263 # =============================================================================
GaudiPython.GaudiAlgs._Tools_t_
def _Tools_t_(self)
Definition: GaudiAlgs.py:1244

def GaudiPython.GaudiAlgs.mapvct | ( |  | func,
|  |  | sequence,
|  |  | ovct = `None`
| ) |  |

    Helper function to fill histogram/ntuple using 'map'-operation

Definition at line 1194 of file GaudiAlgs.py.

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

## Variable Documentation

tuple GaudiPython.GaudiAlgs.__all__
| private

Initial value:
1 = (
2 'GaudiAlgo' , ## base class for algorithms
3 'HistoAlgo' , ## base class for histo-related algorithms
4 'TupleAlgo' , ## base class for tuple-related algorithms
5 'Tuple' , ## N-Tuple
6 'HistoID' , ## ID for N-tuples
7 'TupleID' , ## ID for Histograms
8 'aida2root' , ## AIDA -> ROOT converter
9 'SUCCESS' ## status code
10 )

Definition at line 41 of file GaudiAlgs.py.

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

Definition at line 37 of file GaudiAlgs.py.

dictionary GaudiPython.GaudiAlgs._alg_map_
| private

Initial value:
1 = {
2 '__init__' : _init_ , # constructor
3 'tool' : _tool_ , # service locator
4 'svc' : _service_ , # tool locator
5 'evtSvc' : _evtSvc , # event data service
6 'eventSvc' : _evtSvc , # event data service
7 'detSvc' : _detSvc , # detector data service
8 'histoSvc' : _histoSvc , # histogram data service
9 'histSvc' : _histoSvc , # histogram data service
10 'get' : _get , # access to event data
11 'get_' : _get_ , # access to event data
12 'exist_' : _exist_ , # check the event data
13 'getDet' : _getDet , # access to detector data
14 'finalize' : _finalize_ , # algorithm finalization
15 'beginRun' : _success_ , # dummy function returning success
16 'endRun' : _success_ , # dummy function returning success
17 #
18 'hasProperty' : _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 1153 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._Dec = TupleDecorator
| private

Definition at line 1042 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._detSvc_
| private

Definition at line 227 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._evtcolSvc_
| private

Definition at line 271 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._evtSvc_
| private

Definition at line 223 of file GaudiAlgs.py.

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

Definition at line 485 of file GaudiAlgs.py.

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

Definition at line 486 of file GaudiAlgs.py.

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

Definition at line 487 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._histoSvc_
| private

Definition at line 246 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs._ntupleSvc_
| private

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

Definition at line 1148 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.column

Definition at line 1071 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.column_ll

Definition at line 1146 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.column_ull

Definition at line 1147 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.Counter

Definition at line 1465 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.Counters

Definition at line 1463 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.farray

Definition at line 1150 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.fmatrix

Definition at line 1151 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.Histos

Definition at line 1467 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.iAlgorithm = GaudiPython.Bindings.iAlgorithm

The basic module.

Definition at line 54 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.iAlgTool = GaudiPython.Bindings.iAlgTool

Definition at line 55 of file GaudiAlgs.py.

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

"typedef" for GaudiPython::Matrix

Definition at line 78 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.matrix

Definition at line 1149 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.nTuple

Definition at line 1141 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.ntuple

Definition at line 1142 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.std = cpp.std

Definition at line 73 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TID = HID

Definition at line 83 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.Tools

Definition at line 1461 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.

GaudiPython.GaudiAlgs.valid

Definition at line 1143 of file GaudiAlgs.py.

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

"typedef" for GaudiPython::Vector

Definition at line 76 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.write

Definition at line 1144 of file GaudiAlgs.py.