15 parser = argparse.ArgumentParser(prog=os.path.basename(sys.argv[0]),description=
"list lumi data availability")
17 parser.add_argument(
'-c',dest=
'connect',action=
'store',required=
True,help=
'connect string to lumiDB')
19 parser.add_argument(
'-P',dest=
'authpath',action=
'store',help=
'path to authentication file')
20 parser.add_argument(
'-siteconfpath',dest=
'siteconfpath',action=
'store',
23 help=
'specific path to site-local-config.xml file, optional. If path undefined, fallback to cern proxy&server')
24 parser.add_argument(
'action',choices=[
'listrun'],help=
'command actions')
25 parser.add_argument(
'--minrun',
29 help=
'min run number')
30 parser.add_argument(
'--maxrun',
34 help=
'max run number')
35 parser.add_argument(
'--minfill',
39 help=
'min fill number')
40 parser.add_argument(
'--maxfill',
44 help=
'max fill number')
45 parser.add_argument(
'--verbose',
48 help=
'verbose mode for printing' )
49 parser.add_argument(
'--debug',dest=
'debug',action=
'store_true',help=
'debug')
51 options=parser.parse_args()
53 os.environ[
'CORAL_AUTH_PATH'] = options.authpath
55 session=svc.openSession(isReadOnly=
True,cpp2sqltype=[(
'unsigned int',
'NUMBER(10)'),(
'unsigned long long',
'NUMBER(20)')])
58 session.transaction().
start(
True)
59 schema=session.nominalSchema()
60 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)
61 session.transaction().commit()
62 if options.action ==
'listrun':
S & print(S &os, JobReport::InputFile const &f)
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')