Beispiel #1
0
     if not options.name:
         print '[ERROR] --name option is required by hltbyls, do nothing'
         sys.exit(0)
     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:
     session.transaction().commit()
     if not options.outputfile:
         lumiReport.toScreenLSTrg(result,iresults=iresults,isverbose=isdetail)
     else:
         lumiReport.toCSVLSTrg(result,options.outputfile,iresults=iresults,isverbose=isdetail)
 if options.action == 'hltbyls':
     withL1Pass=False
     withHLTAccept=False
     if options.verbose:
         withL1Pass=True
         withHLTAccept=True
     session.transaction().start(True)
     result=lumiCalcAPI.hltForRange(session.nominalSchema(),irunlsdict,hltpathname=sname,hltpathpattern=spattern,withL1Pass=withL1Pass,withHLTAccept=withHLTAccept)
     session.transaction().commit()
     if not options.outputfile:
         lumiReport.toScreenLSHlt(result,iresults=iresults,isverbose=options.verbose)
     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:
Beispiel #3
0
         lumiReport.toScreenLSTrg(result,iresults=iresults,irunlsdict=irunlsdict,noWarning=options.nowarning,withoutmask=options.withoutmask)
     else:
         lumiReport.toScreenLSTrg(result,iresults=iresults,irunlsdict=irunlsdict,noWarning=options.nowarning,toFile=options.outputfile,withoutmask=options.withoutmask)
 #print result
     sys.exit(0)
 if options.action == 'hltbyls':
     if not options.name:
         print('[ERROR] --name option is required by hltbyls, do nothing')
         sys.exit(0)
     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: