예제 #1
0
파일: heppy_loop.py 프로젝트: p2l1pfp/cmssw
def runLoop( comp, outDir, config, options):
    fullName = '/'.join( [outDir, comp.name ] )
    # import pdb; pdb.set_trace()
    config.components = [comp]
    loop = Looper( fullName,
                   config,
                   options.nevents, 0,
                   nPrint = options.nprint,
                   timeReport = options.timeReport,
                   quiet = options.quiet)
    # print loop
    if options.iEvent is None:
        loop.loop()
        loop.write()
        # print loop
    else:
        # loop.InitOutput()
        iEvent = int(options.iEvent)
        loop.process( iEvent )
    return loop
예제 #2
0
def runLoop( comp, outDir, config, options):
    fullName = '/'.join( [outDir, comp.name ] )
    config.components = [comp]
    memcheck = 2 if getattr(options,'memCheck',False) else -1
    loop = Looper( fullName,
                   config,
                   options.nevents, 0,
                   nPrint = options.nprint,
                   timeReport = options.timeReport,
                   quiet = options.quiet,
                   memCheckFromEvent = memcheck,
                   stopFlag = _globalGracefulStopFlag)
    # print loop
    if options.iEvent is None:
        loop.loop()
        loop.write()
        # print loop
    else:
        # loop.InitOutput()
        iEvent = int(options.iEvent)
        loop.process( iEvent )
    return loop