if not options.outputfile: lumiReport.toScreenLSHlt(result, iresults=iresults) else: lumiReport.toScreenLSHlt(result, iresults=iresults, toFile=options.outputfile) if options.action == 'hltmenu': session.transaction().start(True) result = lumiCalcAPI.hltpathsForRange(session.nominalSchema(), irunlsdict, hltpathname=sname, hltpathpattern=spattern) session.transaction().commit() #print result if not options.outputfile: lumiReport.toScreenConfHlt(result, iresults) else: lumiReport.toScreenConfHlt(result, iresults, toFile=options.outputfile) if options.action == 'beambyls': session.transaction().start(True) dumpbeamintensity = False if options.outputfile and options.verbose: dumpbeamintensity = True result = lumiCalcAPI.beamForIds( session.nominalSchema(), irunlsdict, dataidmap, withBeamIntensity=options.withbeamintensity, minIntensity=options.minintensity)
else: lumiReport.toCSVLSHlt(result,options.outputfile,iresults,options.verbose) if options.action == 'trgconf': session.transaction().start(True) result=lumiCalcAPI.trgbitsForRange(session.nominalSchema(),irunlsdict,datatag=None) session.transaction().commit() if not options.outputfile: lumiReport.toScreenConfTrg(result,iresults,options.verbose) else: lumiReport.toCSVConfTrg(result,options.outputfile,iresults,options.verbose) if options.action == 'hltconf': session.transaction().start(True) result=lumiCalcAPI.hltpathsForRange(session.nominalSchema(),irunlsdict,hltpathname=sname,hltpathpattern=spattern) session.transaction().commit() if not options.outputfile: lumiReport.toScreenConfHlt(result,iresults,options.verbose) else: lumiReport.toCSVConfHlt(result,options.outputfile,iresults,options.verbose) if options.action == 'beambyls': session.transaction().start(True) dumpbeamintensity=False if options.outputfile and options.verbose: dumpbeamintensity=True result=lumiCalcAPI.beamForRange(session.nominalSchema(),irunlsdict,withBeamIntensity=options.withbeamintensity,minIntensity=options.minintensity) session.transaction().commit() if not options.outputfile: lumiReport.toScreenLSBeam(result,iresults=iresults,dumpIntensity=False) else: lumiReport.toCSVLSBeam(result,options.outputfile,resultlines=iresults,dumpIntensity=options.withbeamintensity,isverbose=options.verbose) if options.action == 'runsummary': session.transaction().start(True)
withL1Pass=True withHLTAccept=True session.transaction().start(True) result=lumiCalcAPI.hltForIds(session.nominalSchema(),irunlsdict,dataidmap,hltpathname=sname,hltpathpattern=spattern,withL1Pass=withL1Pass,withHLTAccept=withHLTAccept) session.transaction().commit() if not options.outputfile: lumiReport.toScreenLSHlt(result,iresults=iresults) else: lumiReport.toScreenLSHlt(result,iresults=iresults,toFile=options.outputfile) if options.action == 'hltmenu': session.transaction().start(True) result=lumiCalcAPI.hltpathsForRange(session.nominalSchema(),irunlsdict,hltpathname=sname,hltpathpattern=spattern) session.transaction().commit() #print result if not options.outputfile: lumiReport.toScreenConfHlt(result,iresults) else: lumiReport.toScreenConfHlt(result,iresults,toFile=options.outputfile) if options.action == 'beambyls': session.transaction().start(True) dumpbeamintensity=False if options.outputfile and options.verbose: dumpbeamintensity=True result=lumiCalcAPI.beamForIds(session.nominalSchema(),irunlsdict,dataidmap,withBeamIntensity=options.withbeamintensity,minIntensity=options.minintensity) session.transaction().commit() if not options.outputfile: lumiReport.toScreenLSBeam(result,iresults=iresults,dumpIntensity=False) else: lumiReport.toScreenLSBeam(result,iresults=iresults,dumpIntensity=options.withbeamintensity,toFile=options.outputfile) if options.action == 'runsummary': session.transaction().start(True)