CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
checklumidiff Namespace Reference

Functions

def findlpcdir
 
def parseplotcache
 

Variables

int dellumi = 0
 
int delta = 0
 
int fillmin = 2450
 
tuple l = open(lpcfile,'rb')
 
tuple line = line.strip()
 
tuple lpcdelperrun = float(rundataline[3])
 
string lpcdir = '/afs/cern.ch/cms/CAF/CMSCOMM/COMM_GLOBAL/LHCFILES/'
 
tuple lpcfile = os.path.join(lpcdir,str(fill),str(fill)+'_summary_CMS.txt')
 
tuple lpcfill2012 = findlpcdir(lpcdir,fillmin)
 
dictionary lpcresult = {}
 
int lumi_lpc = 0
 
int lumi_pplot = 0
 
int nrun_lpc = 0
 
int nruns_pplot = 0
 
tuple ofile = open('checklumi.log','w')
 
string plotcachedir = '/afs/cern.ch/cms/lumi/www/publicplots/public_lumi_plots_cache/pp_all'
 
list plotfiles = [f for f in glob.glob(os.path.join(plotcachedir,'lumicalc_cache_2012-??-??.csv')) if os.path.getsize(f)>0]
 
dictionary plotfilldata = {}
 
tuple rundataline = line.split()
 
list runs = plotfilldata[fill]
 
 tot_diff = tot_lumipplot-tot_lumilpc
 
int tot_lumilpc = 0
 
int tot_lumipplot = 0
 
int tot_nrunlpc = 0
 
int tot_nrunpplot = 0
 
int tot_rel = 0
 

Function Documentation

def checklumidiff.findlpcdir (   lpcdir,
  fillmin 
)

Definition at line 24 of file checklumidiff.py.

24 
25 def findlpcdir(lpcdir,fillmin):
26  result=[]
27  cachedir=lpcdir
28  lpcfilldir=[f for f in glob.glob(cachedir+'/????') if os.path.isdir(f) ]
29  lpcfills=[os.path.split(f)[1] for f in lpcfilldir]
30  #print lpcfills
31  result=[int(f) for f in lpcfills if int(f)>=fillmin]
32  return result
def checklumidiff.parseplotcache (   filelist,
  fillmin,
  fillmax 
)

Definition at line 2 of file checklumidiff.py.

References split.

2 
3 def parseplotcache(filelist,fillmin,fillmax):
4  result={}#{fill:{run:delivered}}
5  for f in filelist:
6  fileobj=open(f,'rb')
7  plotreader=csv.reader(fileobj,delimiter=',')
8  idx=0
9  for row in plotreader:
10  if idx!=0:
11  [run,fill]=row[0].split(':')
12  [lumils,cmsls]=row[1].split(':')
13  if int(fill) not in range(fillmin,fillmax+1):
14  continue
15  delivered=float(row[5])
16  if int(fill) not in result:
17  result[int(fill)]={}
18  if int(run) in result[int(fill)]:
19  result[int(fill)][int(run)]+=delivered
20  else:
21  result[int(fill)][int(run)]=delivered
22  idx+=1
23  fileobj.close()
return result
double split
Definition: MVATrainer.cc:139

Variable Documentation

int checklumidiff.dellumi = 0

Definition at line 60 of file checklumidiff.py.

checklumidiff.delta = 0

Definition at line 61 of file checklumidiff.py.

int checklumidiff.fillmin = 2450

Definition at line 38 of file checklumidiff.py.

tuple checklumidiff.l = open(lpcfile,'rb')

Definition at line 65 of file checklumidiff.py.

tuple checklumidiff.line = line.strip()

Definition at line 67 of file checklumidiff.py.

tuple checklumidiff.lpcdelperrun = float(rundataline[3])

Definition at line 70 of file checklumidiff.py.

string checklumidiff.lpcdir = '/afs/cern.ch/cms/CAF/CMSCOMM/COMM_GLOBAL/LHCFILES/'

Definition at line 35 of file checklumidiff.py.

tuple checklumidiff.lpcfile = os.path.join(lpcdir,str(fill),str(fill)+'_summary_CMS.txt')

Definition at line 62 of file checklumidiff.py.

tuple checklumidiff.lpcfill2012 = findlpcdir(lpcdir,fillmin)

Definition at line 39 of file checklumidiff.py.

dictionary checklumidiff.lpcresult = {}

Definition at line 41 of file checklumidiff.py.

int checklumidiff.lumi_lpc = 0

Definition at line 59 of file checklumidiff.py.

int checklumidiff.lumi_pplot = 0

Definition at line 58 of file checklumidiff.py.

int checklumidiff.nrun_lpc = 0

Definition at line 57 of file checklumidiff.py.

tuple checklumidiff.nruns_pplot = 0

Definition at line 56 of file checklumidiff.py.

tuple checklumidiff.ofile = open('checklumi.log','w')

Definition at line 34 of file checklumidiff.py.

Referenced by CalibrationHistosUsingDb.create(), ExclusionBandPlot.dumpToFile(), LEPBandPlot.dumpToFile(), reco::ExpressionEvaluator.ExpressionEvaluator(), FileBlob.write(), and PedeSteererWeakModeConstraints.writeOutput().

string checklumidiff.plotcachedir = '/afs/cern.ch/cms/lumi/www/publicplots/public_lumi_plots_cache/pp_all'

Definition at line 36 of file checklumidiff.py.

list checklumidiff.plotfiles = [f for f in glob.glob(os.path.join(plotcachedir,'lumicalc_cache_2012-??-??.csv')) if os.path.getsize(f)>0]

Definition at line 37 of file checklumidiff.py.

tuple checklumidiff.plotfilldata = {}

Definition at line 43 of file checklumidiff.py.

tuple checklumidiff.rundataline = line.split()

Definition at line 68 of file checklumidiff.py.

list checklumidiff.runs = plotfilldata[fill]

Definition at line 77 of file checklumidiff.py.

checklumidiff.tot_diff = tot_lumipplot-tot_lumilpc

Definition at line 93 of file checklumidiff.py.

int checklumidiff.tot_lumilpc = 0

Definition at line 52 of file checklumidiff.py.

int checklumidiff.tot_lumipplot = 0

Definition at line 50 of file checklumidiff.py.

int checklumidiff.tot_nrunlpc = 0

Definition at line 53 of file checklumidiff.py.

int checklumidiff.tot_nrunpplot = 0

Definition at line 51 of file checklumidiff.py.

int checklumidiff.tot_rel = 0

Definition at line 94 of file checklumidiff.py.