def configure( gaudi = None ) : """ Configuration of the job """ if not gaudi : from GaudiPython.Bindings import AppMgr gaudi = AppMgr() gaudi.JobOptionsType = 'NONE' gaudi.EvtSel = 'NONE' gaudi.HistogramPersistency = 'ROOT' gaudi.ExtSvc += ["NTupleSvc" ] ntSvc = gaudi.service('NTupleSvc') ntSvc.Output = [ "MYLUN DATAFILE='TupleEx.root' OPT='NEW' TYP='ROOT'" ] gaudi.config() gaudi.DLLs = [ 'GaudiAlg', 'RootHistCnv', ] alg = TupleEx( ## configure the property NTupleLUN = 'MYLUN' ) gaudi.setAlgorithms( [alg] ) return SUCCESS
def configure( gaudi = None ) : """ Configuration of the job """ if not gaudi : from GaudiPython.Bindings import AppMgr gaudi = AppMgr() gaudi.JobOptionsType = 'NONE' gaudi.EvtSel = 'NONE' gaudi.HistogramPersistency = 'ROOT' gaudi.config() gaudi.DLLs = [ 'GaudiAlg', 'RootHistCnv', ] alg = HistoEx('HistoEx') gaudi.setAlgorithms( [alg] ) alg.HistoPrint = True hsvc = gaudi.service('HistogramPersistencySvc') hsvc.OutputFile = "histo1.root" # This does not harm and tests bug #50389 getMyalgBack = gaudi.algorithm ( 'HistoEx' ) return SUCCESS
## go to dynamic configuration from GaudiPython.Bindings import AppMgr, loaddict from GaudiPython.Bindings import gbl as cpp import GaudiPython.TupleUtils as TupleUtils ## get the application manager (create if needed) gaudi = AppMgr() import atexit atexit.register ( gaudi.exit ) gaudi.EvtSel = 'NONE' ## no external event input #gaudi.HistogramPersistency = 'HBOOK' ## define the persistency type for N-tuples gaudi.HistogramPersistency = 'ROOT' ## define the persistency type for N-tuples ## configure & initialize gaudi.config() gaudi.initialize() ## get some random numbers Rndm = cpp.Rndm IRndmGenSvc = cpp.IRndmGenSvc rndmSvc = gaudi.service('RndmGenSvc',IRndmGenSvc) if not rndmSvc : gaudi.createSvc('RndmGenSvc') rndmSvc = gaudi.service('RndmGenSvc',IRndmGenSvc)
from GaudiPython.Bindings import AppMgr from GaudiPython.Bindings import gbl as cpp from GaudiPython.HistoUtils import ( book , fill , aida2root ) print __doc__ ## get the application manager (create if needed) gaudi = AppMgr() ## no external input gaudi.EvtSel = 'NONE' ## define the histogram persistency gaudi.HistogramPersistency = "ROOT" ## define the name of the output file with histograms: hsvc = gaudi.service('HistogramPersistencySvc') hsvc.OutputFile = "HistoUtilsEx.root" ## configure & initialize gaudi.config() gaudi.initialize() ## get some random numbers Rndm = cpp.Rndm IRndmGenSvc = cpp.IRndmGenSvc