19 ******************************************************************************* 20 * * 'Physisics do not like it, * 21 * * physisics do not need it, * 22 * * physisics do not use it' * 23 * * **************************** 25 * Helper module, which effectively 'imports' few useful C++ algorithmic * 26 * base classes into Python * 28 ******************************************************************************* 29 * The major imported classes are : * 31 * (1) GaudiAlgo - analogue for GaudiAlgorithm C++ class from GaudiAlg package * 32 * (2) HistoAlgo - analogue for GaudiHistoAlg C++ class from GaudiAlg package * 33 * (3) TupleAlgo - analogue for GaudiTupleAlg C++ class from GaudiAlg package * 34 ******************************************************************************* 37 __author__ =
'Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr' 69 from GaudiKernel
import ROOT6WorkAroundEnabled
87 AlgDecorator = cpp.GaudiPython.AlgDecorator
88 HistoDecorator = cpp.GaudiPython.HistoDecorator
89 TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator
90 TupleDecorator = cpp.GaudiPython.TupleDecorator
118 def _tool_(self, interface, typename, name=None, parent=None, create=True):
120 Useful method to locate the tool a certain 125 t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator') 126 # locate private tool 127 t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self) 128 # locate public tool with defined name 129 t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1') 130 # locate private tool with defined name 131 t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self) 132 # locate public tool with defined name 133 t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3') 134 # locate private tool with defined name 135 t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self) 139 interface = cpp.IAlgTool
143 typename +=
'/' + name
144 _tool = AlgDecorator.tool_(self, typename, parent, create)
149 self.Warning(
'Invalid cast to interface %s' % interface)
171 Useful method to locate a service: 175 ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' ) 179 interface = cpp.IInterface
180 _svc = AlgDecorator.svc_(self, name, create)
185 self.Warning(
'Invalid cast to interface %s' % interface)
199 The constructor from unique algorithm instance name & parameters 201 self._Base.__init__(self, self, name)
203 algMgr = appMgr._algmgr
204 status = algMgr.addAlgorithm(self)
205 if status.isFailure():
206 raise RuntimeError,
'Unable to add Algorithm "' + name +
'"' 207 iAlgorithm.__init__(self, name, self)
209 setattr(self, key, args[key])
211 if not appMgr.__dict__.has_key(
'GaudiPythonAlgos'):
212 appMgr.__dict__[
'GaudiPythonAlgos'] = []
213 appMgr.__dict__[
'GaudiPythonAlgos'].append(self)
225 The default initialization (initialization of base C++ class + data) 227 status = self._Base.initialize_(self)
228 if status.isFailure():
232 _e = self._Base.evtSvc(self)
236 _d = self._Base.detSvc(self)
252 The default initialization (initialization of base C++ class + data members) 255 if status.isFailure():
259 _h = self._Base.histoSvc(self)
275 The default initialization (initialization of base C++ class + data members) 278 if status.isFailure():
282 if self.produceNTuples():
283 _n = self._Base.ntupleSvc(self)
287 if self.produceEvtCols():
288 _n = self._Base.evtColSvc(self)
316 Trivial helper function to access Event Data and Event Data Service 320 # get event data service 324 hits = self.evtSvc('MC/Calo/Hits') 328 return self._evtSvc_[location]
352 Trivial helper function to access Detector Data and Event Data Service 355 # get detector data service 359 lhcb = self.detSvc('/dd/Structure/LHCb') 363 return self._detSvc_[location]
387 Trivial helper function to access Histogram Data and Histogram Data Service 391 # get histogram data service 392 svc = self.histoSvc() 395 histo = self.histoSvc('/stat/Calo/1') 398 return self._histoSvc_
399 return self._histoSvc_[address]
408 Trivial function to access the data in TES using the data service 410 return self._evtSvc_[location]
419 Trivial function to access the data in TDS using data service 421 return self._detSvc_[location]
428 def _get_(self, location, rootInTES=True):
430 Get the object from Transient Event Store using GaudiCommon machinery, 431 respecting RootInTES behaviour 433 return AlgDecorator.get_(self, location, rootInTES)
442 Check the object in Transient Event Store using GaudiCommon machinery, 443 respecting RootInTES behaviour 445 return AlgDecorator.exist_(self, location, rootInTES)
454 Trivial function to access N-Tuple Service 456 return self._ntupleSvc_
465 Trivial function to access Event Collection Service 467 return self._evtcolSvc_
474 The default finalization : finalize the base C++ class 476 status = self._Base.finalize_(self)
492 The trivial function which checks the existence of the property with given name 494 return cpp.Gaudi.Utils.hasProperty(self, pname)
503 Get the property by name 505 if not self.hasProperty(pname):
506 raise AttributeError,
'property %s does not exist' % pname
507 return iAlgorithm.__getattr__(self, pname)
516 Set the property from the value 518 if not self.hasProperty(pname):
519 raise AttributeError,
'property %s does not exist' % pname
520 return iAlgorithm.__setattr__(self, pname, pvalue)
529 Get the attribute (or property) 530 - if the attribute name corresponds to the property name, property value is returned 532 if self.hasProperty(pname):
533 return iAlgorithm.__getattr__(self, pname)
534 raise AttributeError,
'attribute/property %s does not exist' % pname
543 Set the attribute (or property) : 544 - if the attribute name corresponds to the property name, the property is updated 546 if not self.hasProperty(pname):
547 self.__dict__[pname] = pvalue
549 iAlgorithm.__setattr__(self, pname, pvalue)
552 _GaudiAlgorithm = cpp.GaudiPython.PyAlg(
'GaudiAlgorithm')
553 _GaudiHistoAlg = cpp.GaudiPython.PyAlg(
'GaudiHistoAlg')
554 _GaudiTupleAlg = cpp.GaudiPython.PyAlg(
'GaudiTupleAlg')
623 ******************************************************************************* 624 * * 'Physisics do not like it, * 625 * * physisics do not need it, * 626 * * physisics do not use it' * 627 * * **************************** 630 * from GaudiPython.GaudiAlgs import GaudiAlgo, SUCCESS * 632 * class MyClass(GaudiAlgo) : * 633 * ' My specific Algorithm, derived from GaudiAlgo base class ' * 634 * def __init__( self , name , **args ) : * 635 * 'Constructor from algorithm instance name & parameters' * 636 * #invoke the constructor of base class * 637 * GaudiAlgo.__init__(self , name , **args ) * 639 * def initialize ( self ) : * 640 * 'Algorithm initialization' * 641 * # initialize the base class * 642 * status = GaudiAlgo.initialize( self ) * 643 * if status.isFailure() : return status * 645 * # locate the services and tools * 647 * # locate some tool: * 648 * extrapolator = self.tool(ITrExtrapolator,'TrExtrapolator') * 650 * # locate the service * 651 * rndmSvc = self.svc(IRndmGenSvc, 'RndmGenSvc') * 656 * def execute ( self ) : * 657 * 'Major method (from IAlgorithm interface)' * 659 * # get some data from Transient Event Store * 660 * tracks = self.get('/Event/Rec/Tracks') * 663 * c1 = self.counter('#Tracks') * 664 * c2 = self.counter('No Tracks') * 665 * if tracks.empty : * 667 * c1 += tracks->size() * 669 * if 1000 < tracks.size() : * 670 * return self.Error('The event is *VERY* busy') * 674 ******************************************************************************* 752 ******************************************************************************* 753 * * 'Physisics do not like it, * 754 * * physisics do not need it, * 755 * * physisics do not use it' * 756 * * **************************** 759 * from GaudiPython.GaudiAlgs import HistoAlgo, SUCCESS * 761 * class MyClass(HistoAlgo) : * 762 * ' My specific Algorithm, derived from GaudiAlgo base class ' * 763 * def __init__( self , name , **args ) : * 764 * 'Constructor from algorithm instance name' * 765 * #invoke the constructor of base class * 766 * HistoAlgo.__init__(self , name , **args ) * 768 * def execute ( self ) : * 769 * 'Major method (from IAlgorithm interface)' * 771 * # get some data from Transient Event Store * 772 * tracks = self.get('/Event/Rec/Tracks') * 774 * self.plot1D ( tracks->size() , '#tracks' , 0 , 100 ) * 778 * Alternatively the histogram could be booked in advance: * 780 * class MyClass(HistoAlgo) : * 781 * ' My specific Algorithm, derived from GaudiAlgo base class ' * 782 * def __init__( self , name ) : * 783 * 'Constructor from algorithm instance name' * 784 * #invoke the constructor of base class * 785 * HistoAlgo.__init__(self , name ) * 787 * def initialize ( self ) : * 788 * 'Algorithm initialization' * 789 * # initialize the base class * 790 * status = HistoAlgo.initialize( self ) * 791 * if status.isFailure() : return status * 793 * # book the histogram * 794 * self.h1 = selff.book1D ( '#tracks' , 0 , 100 ) * 799 * def execute ( self ) : * 800 * 'Major method (from IAlgorithm interface)' * 802 * # get some data from Transient Event Store * 803 * tracks = self.get('/Event/Rec/Tracks') * 805 * # fill the histogram * 806 * self.h1.fill ( tracks->size() ) * 810 ******************************************************************************* 865 ******************************************************************************* 866 * * 'Physisics do not like it, * 867 * * physisics do not need it, * 868 * * physisics do not use it' * 869 * * **************************** 872 * from GaudiPython.GaudiAlgs import TupleAlgo, SUCCESS * 874 * class MyClass(TupleAlgo) : * 875 * ' My specific Algorithm, derived from TupleAlgo base class ' * 876 * def __init__( self , name , **args ) : * 877 * 'Constructor from algorithm instance name & parameters' * 878 * #invoke the constructor of base class * 879 * TupleAlgo.__init__(self , name , **args ) * 881 * def execute ( self ) : * 882 * 'Major method (from IAlgorithm interface)' * 884 * # get some data from Transient Event Store * 885 * tracks = self.get('/Event/Rec/Tracks') * 887 * tup = self.nTuple('My N-Tuple') * 889 * for track in tracks : * 893 * chi2 = track.chi2 () * 896 * tup.column ( 'pt' , pt ) * 897 * tup.column ( 'p' , p ) * 898 * tup.column ( 'chi2' , chi2 ) * 904 ******************************************************************************* 918 GaudiAlgo._Base = _GaudiAlgorithm
919 HistoAlgo._Base = _GaudiHistoAlg
920 TupleAlgo._Base = _GaudiTupleAlg
923 GaudiAlgo.initialize = _initialize_
924 HistoAlgo.initialize = _initialize_histo_
925 TupleAlgo.initialize = _initialize_tuple_
930 The stub 'start' method needed by the internal implementation of PyAlg<>. 936 GaudiAlgo.start = _start_
937 HistoAlgo.start = _start_
938 TupleAlgo.start = _start_
943 The fictive 'execute' method, which MUST be overwitten by user 945 raise RuntimeError,
'Execute method is not implemented for %s' % self.name(
949 GaudiAlgo.execute = _execute_
950 HistoAlgo.execute = _execute_
951 TupleAlgo.execute = _execute_
956 The stub 'stop' method needed by the internal implementation of PyAlg<>. 962 GaudiAlgo.stop = _stop_
963 HistoAlgo.stop = _stop_
964 TupleAlgo.stop = _stop_
971 The basic method to fill (book-on-demand) 1D-histogram 973 The histogram will be created/booked dautomatically according to the 976 - literal or numerical ID (optional) 980 - number of bins (default is 100) 982 The reference to the histogram is returned and could be used for later manipulations 985 return HistoDecorator.plot1D(s, *a)
993 The basic method to fill (book-on-demand) 2D-histogram 995 The histogram will be created/booked dautomatically according to the 998 - literal or numerical ID (optional) 1004 - number of X-bins (default is 50) 1005 - number of Y-bins (default is 50) 1007 The reference to the histogram is returned and could be used for later manipulations 1010 return HistoDecorator.plot2D(s, *a)
1018 The basic method to fill (book-on-demand) 3D-histogram 1020 The histogram will be created/booked dautomatically according to the 1023 - literal or numerical ID (optional) 1031 - number of X-bins (default is 10) 1032 - number of Y-bins (default is 10) 1033 - number of Y-bins (default is 10) 1035 The reference to the histogram is returned and could be used for later manipulations 1038 return HistoDecorator.plot3D(s, *a)
1046 The basic method to fill (book-on-demand) 1D profile histogram 1048 The profile histogram will be created/booked dautomatically 1049 according to the specifications: 1051 - literal or numerical ID (optional) 1055 - number of X-bins (default is 100) 1057 The reference to the histogram is returned and could be used for later manipulations 1060 return HistoDecorator.profile1D(s, *a)
1068 The basic method to fill (book-on-demand) 2D profile histiogram 1070 The profile histogram will be created/booked automatically 1071 according to the specifications: 1073 - literal or numerical ID (optional) 1079 - number of X-bins (default is 50) 1080 - number of Y-bins (default is 50) 1082 The reference to the histogram is returned and could be used for later manipulations 1085 return HistoDecorator.profile2D(s, *a)
1090 _plot1D_.__doc__ +=
'\n' + HistoDecorator.plot1D.__doc__
1091 _plot2D_.__doc__ +=
'\n' + HistoDecorator.plot2D.__doc__
1092 _plot3D_.__doc__ +=
'\n' + HistoDecorator.plot3D.__doc__
1093 _profile1D_.__doc__ +=
'\n' + HistoDecorator.profile1D.__doc__
1094 _profile2D_.__doc__ +=
'\n' + HistoDecorator.profile2D.__doc__
1099 if not issubclass(t, list)
and \
1100 not issubclass(t, tuple):
1102 for klass
in klasses:
1103 klass.plot = _plot1D_
1104 klass.plot1D = _plot1D_
1105 klass.plot2D = _plot2D_
1106 klass.plot3D = _plot3D_
1107 klass.profile1D = _profile1D_
1108 klass.profile2D = _profile2D_
1118 Retrieve (book-on-demand) N-Tuple object 1120 return TupleAlgDecorator.nTuple(s, *a)
1128 Retrieve (book-on-demand) N-Tuple object for Event Tag Collections 1130 return TupleAlgDecorator.evtCol(s, *a)
1133 _nTuple_.__doc__ +=
'\n' + TupleAlgDecorator.nTuple.__doc__
1134 _evtCol_.__doc__ +=
'\n' + TupleAlgDecorator.evtCol.__doc__
1139 if not issubclass(t, list)
and \
1140 not issubclass(t, tuple):
1142 for klass
in klasses:
1143 klass.nTuple = _nTuple_
1144 klass.evtCol = _evtCol_
1145 klass.ntupleSvc = _ntupleSvc
1146 klass.tupleSvc = _ntupleSvc
1147 klass.ntupSvc = _ntupleSvc
1148 klass.tupSvc = _ntupleSvc
1149 klass.evtColSvc = _evtcolSvc
1150 klass.evtcolSvc = _evtcolSvc
1157 Tuple = cpp.Tuples.Tuple
1158 _Dec = TupleDecorator
1162 '''Helper decorator class to workaround ROOT-6697''' 1168 mapping = {int:
'int', bool:
'bool', float:
'double'}
1170 signature =
'const Tuples::Tuple& tuple, const string& name, const %s value' % (
1172 mapping[k] = func.disp(signature)
1177 Explicitly call the explicit signature for the case with 3 arguments and 1178 the last one is 'int', 'bool' or 'float', for the other cases fall back 1179 on the default dispatcher. 1187 return self.
func(*a)
1196 Access to underlying INTuple object 1198 return _Dec.nTuple(s, *a)
1203 Access to underlying NTuple::Tuple object 1205 return _Dec.ntuple(s, *a)
1210 Valid NTuple::Tuple object? 1212 return _Dec.valid(s, *a)
1217 Commit the row/record to n-tuple 1219 return _Dec.write(s, *a)
1224 Fill the certain column to n-tuple 1226 return _Dec.column(s, *a)
1231 Fill the 'long long' column 1233 return _Dec.column_ll(s, *a)
1238 Fill the 'unsigned long long' column 1240 return _Dec.column_ull(s, *a)
1245 Fill the fixed-size array column 1247 return _Dec.array(s, *a)
1252 Fill the fixed-size matrix column 1254 return _Dec.matrix(s, *a)
1259 Fill the floating-size array column 1261 return _Dec.farray(s, *a)
1266 Fill the floating-size matrix column 1268 return _Dec.fmatrix(s, *a)
1271 _t_nTuple_.__doc__ +=
'\n' + _Dec.nTuple.__doc__
1272 _t_ntuple_.__doc__ +=
'\n' + _Dec.ntuple.__doc__
1273 _t_valid_.__doc__ +=
'\n' + _Dec.valid.__doc__
1274 _t_write_.__doc__ +=
'\n' + _Dec.write.__doc__
1275 _t_column_.__doc__ +=
'\n' + _Dec.column.__doc__
1276 _t_column_ll_.__doc__ +=
'\n' + _Dec.column_ll.__doc__
1277 _t_column_ull_.__doc__ +=
'\n' + _Dec.column_ull.__doc__
1278 _t_array_.__doc__ +=
'\n' + _Dec.array.__doc__
1279 _t_matrix_.__doc__ +=
'\n' + _Dec.matrix.__doc__
1280 _t_farray_.__doc__ +=
'\n' + _Dec.farray.__doc__
1281 _t_fmatrix_.__doc__ +=
'\n' + _Dec.fmatrix.__doc__
1283 Tuple.nTuple = _t_nTuple_
1284 Tuple.ntuple = _t_ntuple_
1285 Tuple.valid = _t_valid_
1286 Tuple.write = _t_write_
1287 Tuple.column = _t_column_
1288 Tuple.column_ll = _t_column_ll_
1289 Tuple.column_ull = _t_column_ull_
1290 Tuple.array = _t_array_
1291 Tuple.matrix = _t_matrix_
1292 Tuple.farray = _t_farray_
1293 Tuple.fmatrix = _t_fmatrix_
1300 'eventSvc': _evtSvc,
1302 'histoSvc': _histoSvc,
1303 'histSvc': _histoSvc,
1308 'finalize': _finalize_,
1309 'beginRun': _success_,
1310 'endRun': _success_,
1314 'getProperty': _getProperty_,
1315 'setProperty': _setProperty_,
1316 '__setattr__': _set_attr_,
1317 '__getattr__': _get_attr_
1324 if not issubclass(t, list)
and \
1325 not issubclass(t, tuple):
1327 for _alg
in klasses:
1328 for key
in _alg_map_:
1329 setattr(_alg, key, _alg_map_[key])
1343 """ Helper function to fill histogram/ntuple using 'map'-operation """ 1348 if hasattr(sequence,
'size'):
1349 vct.reserve(vct.size() + sequence.size())
1350 elif hasattr(sequence,
'__len__'):
1351 vct.reserve(vct.size() + len(sequence))
1352 for object
in sequence:
1353 vct.push_back(
func(object))
1369 _func = getattr(AlgDecorator, method)
1370 _num = _func(self, _tools)
1371 if _tools.size() != _num:
1372 raise RuntimeError,
'Unable to extract Tools' 1374 for _tool
in _tools:
1375 _res += [
iAlgTool(_tool.name(), _tool)]
1384 Retrieve the list of tools, 1385 aquired by component through GaudiCommon<TYPE> base: 1387 >>> alg = ... ## get the algorithm 1388 >>> tools = alg.Tools() ## get the tools 1389 >>> for tool in tools : 1393 _cmp = getattr(self,
'_ialg')
1395 self.retrieveInterface()
1396 _cmp = getattr(self,
'_ialg')
1405 Retrieve the list of tools, 1406 aquired by component through GaudiCommon<TYPE> base: 1408 >>> tool = ... ## get the tool 1409 >>> tools = tool.Tools() ## get the tools 1410 >>> for t in tools : 1414 _cmp = getattr(self,
'_itool')
1416 self.retrieveInterface()
1417 _cmp = getattr(self,
'_itool')
1431 _func = getattr(AlgDecorator, method)
1432 _num = _func(self, _nams, _cnts)
1433 if _nams.size() != _num
or _cnts.size() != _num:
1434 raise RuntimeError,
'Unable to extract Counters' 1436 for _i
in range(0, _num):
1442 return _res.get(name,
None)
1451 Retrieve the counters, managed GaudiCommon<TYPE> base: 1453 >>> alg = ... ## get the algorithm 1454 >>> cnts = alg.Counters() ## get the counters 1455 >>> for key in cnts : 1456 ... print key, cnts[key] 1459 Retrieve the counter, managed GaudiCommon<TYPE> base by name: 1461 >>> alg = ... ## get the algorithm 1462 >>> cnt = alg.Counters('MyCounter') ## get the counter 1466 _cmp = getattr(self,
'_ialg')
1468 self.retrieveInterface()
1469 _cmp = getattr(self,
'_ialg')
1478 Retrieve the counters, managed GaudiCommon<TYPE> base: 1480 >>> tool = ... ## get the tool 1481 >>> cnts = tool.Counters() ## get the counters 1482 >>> for key in cnts : 1483 ... print key, cnts[key] 1486 Retrieve the counter, managed GaudiCommon<TYPE> base by name: 1488 >>> tool = ... ## get the tool 1489 >>> cnt = tool.Counters('MyCounter') ## get the counter 1493 _cmp = getattr(self,
'_itool')
1495 self.retrieveInterface()
1496 _cmp = getattr(self,
'_itool')
1509 _func = getattr(AlgDecorator, method)
1510 return _func(self, name)
1518 Retrieve the counter managed GaudiCommon<TYPE> base by name: 1520 >>> alg = ... ## get the algorithm 1521 >>> cnt = alg.Counter('#accept') ## get the counter 1525 _cmp = getattr(self,
'_ialg')
1527 self.retrieveInterface()
1528 _cmp = getattr(self,
'_ialg')
1537 Retrieve the counter managed GaudiCommon<TYPE> base by name: 1539 >>> tool = ... ## get the tool 1540 >>> cnt = tool.Counter('#accept') ## get the counter 1544 _cmp = getattr(self,
'_itool')
1546 self.retrieveInterface()
1547 _cmp = getattr(self,
'_itool')
1554 cpp.GaudiAlg.ID.__repr__ = cpp.GaudiAlg.ID.idAsString
1555 cpp.GaudiAlg.ID.__str__ = cpp.GaudiAlg.ID.idAsString
1556 cpp.StatEntity.__repr__ = cpp.StatEntity.toString
1557 cpp.StatEntity.__str__ = cpp.StatEntity.toString
1564 Get All histogram form the component 1567 for _his
in (
std.vector(
'AIDA::IProfile2D*'),
1574 _fun = getattr(HistoDecorator, method)
1575 _num = _fun(component, _ids, _his)
1576 if _ids.size() != _num
or _his.size() != _num:
1577 raise RuntimeError,
'Unable to extract Histos!' 1578 for _i
in range(0, _num):
1581 _id = _id.numericID()
1583 _id = _id.literalID()
1585 _id = _is.idAsString()
1586 _res[_id] = _his[_i]
1591 id = cpp.GaudiAlg.ID(name)
1592 for i
in (name, id.literalID(), id.numericID(), id.idAsString(), id):
1593 h = _res.get(i,
None)
1605 Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base: 1607 >>> alg = ... ## get the algorithm 1608 >>> histos = alg.Histos() ## get all histograms & profiles 1609 >>> for key in histos : 1610 ... print key, histos[key] 1612 Retrive the histogram with the certain ID : 1614 >>> alg = ... ## get the algorithm 1615 >>> histo = alg.Histos('some histo ID') ## get the histo by ID 1619 _cmp = getattr(self,
'_ialg')
1621 self.retrieveInterface()
1622 _cmp = getattr(self,
'_ialg')
1631 Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base: 1633 >>> tool = ... ## get the tool 1634 >>> histos = tool.Histos() ## get all histograms & profiles 1635 >>> for key in histos : 1636 ... print key, histos[key] 1638 Retrive the historgam with certain ID : 1640 >>> tool = ... ## get the tool 1641 >>> histo = tool.Histos('some histo ID') ## get the histo by ID 1645 _cmp = getattr(self,
'_itool')
1647 self.retrieveInterface()
1648 _cmp = getattr(self,
'_itool')
1654 _Tools_a_.__doc__ +=
'\n' + AlgDecorator._tools_a_.__doc__
1655 _Tools_t_.__doc__ +=
'\n' + AlgDecorator._tools_t_.__doc__
1656 _Counters_a_.__doc__ +=
'\n' + AlgDecorator._counters_a_.__doc__
1657 _Counters_t_.__doc__ +=
'\n' + AlgDecorator._counters_t_.__doc__
1658 _Counter_a_.__doc__ +=
'\n' + AlgDecorator._counter_a_.__doc__
1659 _Counter_t_.__doc__ +=
'\n' + AlgDecorator._counter_t_.__doc__
1660 _Histos_a_.__doc__ +=
'\n' + HistoDecorator._histos_a_.__doc__
1661 _Histos_t_.__doc__ +=
'\n' + HistoDecorator._histos_t_.__doc__
1663 iAlgorithm.Tools = _Tools_a_
1664 iAlgTool.Tools = _Tools_t_
1665 iAlgorithm.Counters = _Counters_a_
1666 iAlgTool.Counters = _Counters_t_
1667 iAlgorithm.Counter = _Counter_a_
1668 iAlgTool.Counter = _Counter_t_
1669 iAlgorithm.Histos = _Histos_a_
1670 iAlgTool.Histos = _Histos_t_
1681 print __doc__, __author__
1682 print '\t\t\tDoc-string for class GaudiAlgo \n', GaudiAlgo.__doc__
1683 print '\t\t\tDoc-string for class HistoAlgo \n', HistoAlgo.__doc__
1684 print '\t\t\tDoc-string for class TupleAlgo \n', TupleAlgo.__doc__
1690 if __name__ ==
'__main__':
def _getDet(self, location)
def _Counter_a_(self, name)
def _Counter_t_(self, name)
def _decorate_tuples_(klasses)
def _get_all_counters_(self, method, name=None)
def _init_(self, name, args)
def _get_(self, location, rootInTES=True)
def _initialize_tuple_(self)
def ROOT6WorkAroundEnabled(id=None)
def mapvct(func, sequence, ovct=None)
def _evtSvc(self, location=None)
def _service_(self, interface, name, create=True)
def _get_all_histos_(component, method, name)
def _hasProperty_(self, pname)
def _decorate_algs_(klasses)
def _decorate_plots_(klasses)
def _get_counter_(self, method, name)
def _get_attr_(self, pname)
def _set_attr_(self, pname, pvalue)
def _Histos_t_(self, name=None)
def _Counters_a_(self, name=None)
decltype(auto) range(Args &&...args)
Zips multiple containers together to form a single range.
def _initialize_histo_(self)
def _Histos_a_(self, name=None)
def _get_all_tools_(self, method)
def _tool_(self, interface, typename, name=None, parent=None, create=True)
def _exist_(self, location, rootInTES=True)
def _histoSvc(self, address=None)
def _Counters_t_(self, name=None)
def _setProperty_(self, pname, pvalue)
def _getProperty_(self, pname)