14 parser = argparse.ArgumentParser(prog=os.path.basename(sys.argv[0]),description=
"list lumi data availability")
16 parser.add_argument(
'-c',dest=
'connect',action=
'store',required=
True,help=
'connect string to lumiDB')
18 parser.add_argument(
'-P',dest=
'authpath',action=
'store',help=
'path to authentication file')
19 parser.add_argument(
'-siteconfpath',dest=
'siteconfpath',action=
'store',
22 help=
'specific path to site-local-config.xml file, optional. If path undefined, fallback to cern proxy&server')
23 parser.add_argument(
'action',choices=[
'listrun'],help=
'command actions')
24 parser.add_argument(
'--minrun',
28 help=
'min run number')
29 parser.add_argument(
'--maxrun',
33 help=
'max run number')
34 parser.add_argument(
'--minfill',
38 help=
'min fill number')
39 parser.add_argument(
'--maxfill',
43 help=
'max fill number')
44 parser.add_argument(
'--verbose',
47 help=
'verbose mode for printing' )
48 parser.add_argument(
'--debug',dest=
'debug',action=
'store_true',help=
'debug')
50 options=parser.parse_args()
52 os.environ[
'CORAL_AUTH_PATH'] = options.authpath
54 session=svc.openSession(isReadOnly=
True,cpp2sqltype=[(
'unsigned int',
'NUMBER(10)'),(
'unsigned long long',
'NUMBER(20)')])
57 session.transaction().
start(
True)
58 schema=session.nominalSchema()
59 runlist=
lumiCalcAPI.runList(schema,
None,runmin=options.minrun,runmax=options.maxrun,startT=
None,stopT=
None,l1keyPattern=
None,hltkeyPattern=
None,amodetag=
None,nominalEnergy=
None,energyFlut=
None,requiretrg=reqTrg,requirehlt=reqHLT)
60 session.transaction().commit()
61 if options.action ==
'listrun':
def listRemoveDuplicate(inlist)
def runList(schema, datatagid, runmin=None, runmax=None, fillmin=None, fillmax=None, startT=None, stopT=None, l1keyPattern=None, hltkeyPattern=None, amodetag=None, nominalEnergy=None, energyFlut=0.2, requiretrg=True, requirehlt=True, preselectedruns=None, lumitype='HF')