CMS 3D CMS Logo

Functions | Variables
lumiData2 Namespace Reference

Functions

def listRemoveDuplicate (inlist)
 
def main ()
 

Variables

 VERSION
 

Function Documentation

def lumiData2.listRemoveDuplicate (   inlist)

Definition at line 8 of file lumiData2.py.

Referenced by main().

8 def listRemoveDuplicate(inlist):
9  d={}
10  for x in inlist:
11  d[x]=x
12  return d.values()
13 
def listRemoveDuplicate(inlist)
Definition: lumiData2.py:8
def lumiData2.main ( )

Definition at line 14 of file lumiData2.py.

References listRemoveDuplicate(), edm.print(), and lumiCalcAPI.runList().

14 def main():
15  parser = argparse.ArgumentParser(prog=os.path.basename(sys.argv[0]),description="list lumi data availability")
16  # add required arguments
17  parser.add_argument('-c',dest='connect',action='store',required=True,help='connect string to lumiDB')
18  # add optional arguments
19  parser.add_argument('-P',dest='authpath',action='store',help='path to authentication file')
20  parser.add_argument('-siteconfpath',dest='siteconfpath',action='store',
21  default=None,
22  required=False,
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',
26  dest='minrun',
27  action='store',
28  type=int,
29  help='min run number')
30  parser.add_argument('--maxrun',
31  dest='maxrun',
32  action='store',
33  type=int,
34  help='max run number')
35  parser.add_argument('--minfill',
36  dest='minfill',
37  type=int,
38  action='store',
39  help='min fill number')
40  parser.add_argument('--maxfill',
41  dest='maxfill',
42  type=int,
43  action='store',
44  help='max fill number')
45  parser.add_argument('--verbose',
46  dest='verbose',
47  action='store_true',
48  help='verbose mode for printing' )
49  parser.add_argument('--debug',dest='debug',action='store_true',help='debug')
50  # parse arguments
51  options=parser.parse_args()
52  if options.authpath:
53  os.environ['CORAL_AUTH_PATH'] = options.authpath
54  svc=sessionManager.sessionManager(options.connect,authpath=options.authpath,debugON=options.debug)
55  session=svc.openSession(isReadOnly=True,cpp2sqltype=[('unsigned int','NUMBER(10)'),('unsigned long long','NUMBER(20)')])
56  reqTrg=True
57  reqHLT=False
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':
63  if not runlist:
64  print('[]')
65  sys.exit(0)
66  singlelist=sorted(listRemoveDuplicate(runlist))
67  print(singlelist)
68  del session
69  del svc
Definition: start.py:1
def main()
Definition: lumiData2.py:14
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def listRemoveDuplicate(inlist)
Definition: lumiData2.py:8
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')
Definition: lumiCalcAPI.py:48

Variable Documentation

lumiData2.VERSION

Definition at line 3 of file lumiData2.py.