22 *******************************************************************************
24 * Simple example which illustrate the usage of useful *
25 * algorithm base class for N-Tuple manipulations *
27 *******************************************************************************
29 from __future__
import print_function
31 __author__ =
'Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr'
51 Simple algorithm which implicitely book&fill N-Tuples
58 TupleAlgo.__init__(self, name, **args)
63 The major method 'execute', it is invoked for each event
68 tup = self.nTuple(
'My trivial N-tuple')
69 for i
in range(0, 100):
70 tup.column(
'a', math.sin(i))
71 tup.column(
'b', math.cos(i))
72 tup.column(
'c', math.tan(i))
73 tup.column(
'g',
gauss())
84 """ Configuration of the job """
90 gaudi.JobOptionsType =
'NONE'
92 gaudi.HistogramPersistency =
'ROOT'
94 gaudi.ExtSvc += [
"NTupleSvc"]
96 ntSvc = gaudi.service(
'NTupleSvc')
97 ntSvc.Output = [
"MYLUN DATAFILE='TupleEx.root' OPT='NEW' TYP='ROOT'"]
110 gaudi.setAlgorithms([alg])
119 if '__main__' == __name__: