CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
utils.py
Go to the documentation of this file.
1 ################################################################################
2 # RelMon: a tool for automatic Release Comparison
3 # https://twiki.cern.ch/twiki/bin/view/CMSPublic/RelMon
4 #
5 # $Author: anorkus $
6 # $Date: 2013/03/18 14:29:46 $
7 # $Revision: 1.13 $
8 #
9 #
10 # Danilo Piparo CERN - danilo.piparo@cern.ch
11 #
12 ################################################################################
13 
14 
15 import array
16 import os
17 import re
18 import sys
19 from cPickle import load
20 from os.path import dirname,basename,join,isfile
21 from threading import Thread
22 from time import asctime
23 
24 theargv=sys.argv
25 sys.argv=[]
26 from ROOT import *
27 import ROOT
28 ROOT.gErrorIgnoreLevel=1001
29 ROOT.gROOT.SetBatch(True)
30 sys.argv=theargv
31 
32 from urllib2 import Request,build_opener,urlopen
33 
34 if os.environ.has_key("RELMON_SA"):
35  from definitions import *
36  from authentication import X509CertOpen
37  from utils import __file__ as this_module_name
38 else:
39  from Utilities.RelMon.definitions import *
40  from Utilities.RelMon.authentication import X509CertOpen
41  from Utilities.RelMon.utils import __file__ as this_module_name
42 
43 #ROOT.gErrorIgnoreLevel=1001
44 
45 
46 _log_level=10
47 def logger(msg_level,message):
48  if msg_level>=_log_level:
49  print "[%s] %s" %(asctime(),message)
50 
51 #-------------------------------------------------------------------------------
52 def setTDRStyle():
53  this_dir=dirname(this_module_name)
54  this_dir_one_up=this_dir[:this_dir.rfind("/")+1]
55  #this_dir_two_up=this_dir_one_up[:this_dir_one_up.rfind("/")+1]
56  style_file=''
57  if os.environ.has_key("RELMON_SA"):
58  style_file=this_dir_one_up+"data/tdrstyle_mod.C"
59  else:
60  style_file="%s/src/Utilities/RelMon/data/tdrstyle_mod.C"%(os.environ["CMSSW_BASE"])
61  try:
62  gROOT.ProcessLine(".L %s" %style_file)
63  gROOT.ProcessLine("setTDRStyle()")
64  except:
65  "Print could not set the TDR style. File %s not found?" %style_file
66 
67 
68 #-------------------------------------------------------------------------------
69 def literal2root (literal,rootType):
70  bitsarray = array.array('B')
71  bitsarray.fromstring(literal.decode('hex'))
72 
73  tbuffer=0
74  try:
75  tbuffer = TBufferFile(TBufferFile.kRead, len(bitsarray), bitsarray, False,0)
76  except:
77  print "could not transform to object array:"
78  print [ i for i in bitsarray ]
79 
80  # replace a couple of shortcuts with the real root class name
81  if rootType == 'TPROF':
82  rootType = 'TProfile'
83  if rootType == 'TPROF2D':
84  rootType = 'TProfile2D'
85 
86  root_class=eval(rootType+'.Class()')
87 
88  return tbuffer.ReadObject(root_class)
89 
90 #-------------------------------------------------------------------------------
91 
92 def getNbins(h):
93  biny=h.GetNbinsY()
94  if biny>1:biny+=1
95  binz=h.GetNbinsZ()
96  if binz>1:binz+=1
97  return (h.GetNbinsX()+1)*(biny)*(binz)
98 
99 #-------------------------------------------------------------------------------
100 
101 
103  def __init__(self,threshold):
104  self.name=""
105  self.h1=None
106  self.h2=None
107  self.threshold=float(threshold)
108  self.rank=-1
109  self.is_init=False
110 
111  def set_operands(self,h1,h2):
112  self.h1=h1
113  self.h2=h2
114 
115  def get_rank(self):
116  if not self.is_init:
117  if self.rank < 0:
118  type1=type(self.h1)
119  type2=type(self.h2)
120  if (type1 != type2):
121  logger(1,"*** ERROR: object types in comparison don't match: %s!=%s" %(type1,type2))
122  self.rank=test_codes["DIFF_TYPES"]
123  elif not self.h2.InheritsFrom("TH1"):
124  logger(1,"*** ERROR: object type is not histogram but a %s" %(type1))
125  self.rank=test_codes["NO_HIST"]
126  # if histos are empty
127  #elif self.h1.InheritsFrom("TH2") and not "BinToBin" in self.name:
128  ## 2D!
129  #return test_codes["2D"]
130  else:
131  is_empty1=is_empty(self.h1)
132  is_empty2=is_empty(self.h2)
133  are_empty=is_empty1 and is_empty2
134  one_empty=is_empty1 or is_empty2
135 
136  Nbins1= getNbins(self.h1)
137  Nbins2= getNbins(self.h2)
138 
139  if are_empty:
140  #return -103
141  # Conversation with JeanRoch and David 5 April
142  return 1
143  elif one_empty:
144  #return -103
145  # Conversation with JeanRoch and David 5 April
146  return 1
147 
148  # if histos have different number of bins
149  if Nbins1!=Nbins2:
150  return test_codes["DIFF_BIN"]
151 
152  self.rank=self.do_test()
153  self.is_init=True
154  return self.rank
155 
156  def get_status(self):
157  status = SUCCESS
158  if self.get_rank()<0:
159  status=NULL
160  logger(0,"+++ Test %s FAILED: rank is %s and threshold is %s ==> %s" %(self.name, self.rank, self.threshold, status))
161  elif self.get_rank() < self.threshold:
162  status=FAIL
163  logger(0,"+++ Test %s: rank is %s and threshold is %s ==> %s" %(self.name, self.rank, self.threshold, status))
164  return status
165 
166  def do_test(self):
167  pass
168 
169 #-------------------------------------------------------------------------------
170 
171 def is_empty(h):
172  for i in xrange(1,getNbins(h)):
173  if h.GetBinContent(i)!=0: return False
174  return True
175  #return h.GetSumOfWeights()==0
176 
177 #-------------------------------------------------------------------------------
178 
179 def is_sparse(h):
180  filled_bins=0.
181  nbins=h.GetNbinsX()
182  for ibin in xrange(nbins):
183  if h.GetBinContent(ibin)>0:
184  filled_bins+=1
185  #print "%s %s --> %s" %(filled_bins,nbins,filled_bins/nbins)
186  if filled_bins/nbins < .5:
187  return True
188  else:
189  return False
190 
191 #-------------------------------------------------------------------------------
192 
194  def __init__(self, threshold):
195  StatisticalTest.__init__(self,threshold)
196  self.name="KS"
197 
198  def do_test(self):
199 
200  # Calculate errors if not there...
201  for h in self.h1,self.h2:
202  w2s=h.GetSumw2()
203  if w2s.GetSize()==0:
204  h.Sumw2()
205 
206  ## If errors are 0:
207  #zero_errors=True
208  #for h in self.h1,self.h2:
209  #for ibin in xrange(Nbins1):
210  #if h.GetBinError(ibin+1) >0:
211  #zero_errors=False
212  #break
213  #if zero_errors:
214  #return test_codes["ZERO_ERR"]
215 
216  return self.h1.KolmogorovTest(self.h2)
217 
218 #-------------------------------------------------------------------------------
219 import array
220 def profile2histo(profile):
221  if not profile.InheritsFrom("TH1"):
222  return profile
223 
224  bin_low_edges=[]
225  n_bins=profile.GetNbinsX()
226 
227  for ibin in xrange(1,n_bins+2):
228  bin_low_edges.append(profile.GetBinLowEdge(ibin))
229  bin_low_edges=array.array('f',bin_low_edges)
230  histo=TH1F(profile.GetName(),profile.GetTitle(),n_bins,bin_low_edges)
231  for ibin in xrange(0,n_bins+1):
232  histo.SetBinContent(ibin,profile.GetBinContent(ibin))
233  histo.SetBinError(ibin,profile.GetBinError(ibin))
234 
235  return histo
236 #-------------------------------------------------------------------------------
237 
239  def __init__(self, threshold):
240  StatisticalTest.__init__(self,threshold)
241  self.name="Chi2"
242 
243  def check_filled_bins(self,min_filled):
244  nbins=self.h1.GetNbinsX()
245  n_filled_l=[]
246  for h in self.h1,self.h2:
247  nfilled=0.
248  for ibin in xrange(1,nbins+1):
249  if h.GetBinContent(ibin)>0:
250  nfilled+=1
251  n_filled_l.append(nfilled)
252  return len(filter (lambda x:x>=min_filled,n_filled_l) )>0
253 
254  def absval(self):
255  nbins=getNbins(self.h1)
256  binc=0
257  for i in xrange(1,nbins):
258  for h in self.h1,self.h2:
259  binc=h.GetBinContent(i)
260  if binc<0:
261  h.SetBinContent(i,-1*binc)
262  if h.GetBinError(i)==0 and binc!=0:
263  #print "Histo ",h.GetName()," Bin:",i,"-Content:",h.GetBinContent(i)," had zero error"
264  h.SetBinContent(i,0)
265 
266  def check_histograms(self, histogram):
267  if histogram.InheritsFrom("TProfile") or (histogram.GetEntries()!=histogram.GetSumOfWeights()):
268  return 'W'
269  else:
270  return 'U'
271 
272  def do_test(self):
273  self.absval()
274  if self.check_filled_bins(3):
275  #if self.h1.InheritsFrom("TProfile") or (self.h1.GetEntries()!=self.h1.GetSumOfWeights()):
276  # chi2=self.h1.Chi2Test(self.h2,'WW')
277  # #if chi2==0: print "DEBUG",self.h1.GetName(),"Chi2 is:", chi2
278  # return chi2
279  #else:
280  # return self.h1.Chi2Test(self.h2,'UU')
281  hist1 = self.check_histograms(self.h1)
282  hist2 = self.check_histograms(self.h2)
283  if hist1 =='W' and hist2 =='W': ##in case
284  chi2 = self.h1.Chi2Test(self.h2,'WW') ## the both histograms are weighted
285  return chi2
286  elif hist1 == 'U' and hist2 == 'U':
287  chi2 = self.h1.Chi2Test(self.h2,'UU') ##the both histograms are unweighted
288  return chi2
289  elif hist1 == 'U' and hist2 == 'W':
290  chi2 = self.h1.Chi2Test(self.h2,'UW') ## 1st histogram is unweighted, 2nd weighted
291  return chi2
292  elif hist1 == 'W' and hist2 == 'U':
293  chi2 = self.h2.Chi2Test(self.h1,'UW') ## 1 is wieghted, 2nd unweigthed. so flip order to make a UW comparison
294  return chi2
295  else:
296  return 1
297  #return test_codes["FEW_BINS"]
298 
299 #-------------------------------------------------------------------------------
300 
302  """The bin to bin comparison builds a fake pvalue. It is 0 if the number of
303  bins is different. It is % of corresponding bins otherwhise.
304  A threshold of 1 is needed to require a 1 to 1 correspondance between
305  hisograms.
306  """
307  def __init__(self, threshold=1):
308  StatisticalTest.__init__(self, threshold)
309  self.name='BinToBin'
310  self.epsilon= 0.000001
311 
313  if self.h1.GetNbinsX() != self.h2.GetNbinsX() \
314  or self.h1.GetNbinsY() != self.h2.GetNbinsY() \
315  or self.h1.GetNbinsZ() != self.h2.GetNbinsZ() \
316  or abs(self.h1.GetXaxis().GetXmin() - self.h2.GetXaxis().GetXmin()) >self.epsilon \
317  or abs(self.h1.GetYaxis().GetXmin() - self.h2.GetYaxis().GetXmin()) >self.epsilon \
318  or abs(self.h1.GetZaxis().GetXmin() - self.h2.GetZaxis().GetXmin()) >self.epsilon \
319  or abs(self.h1.GetXaxis().GetXmax() - self.h2.GetXaxis().GetXmax()) >self.epsilon \
320  or abs(self.h1.GetYaxis().GetXmax() - self.h2.GetYaxis().GetXmax()) >self.epsilon \
321  or abs(self.h1.GetZaxis().GetXmax() - self.h2.GetZaxis().GetXmax()) >self.epsilon:
322  return False
323  return True
324 
325  def do_test(self):
326  # fist check that binning matches
327  if not self.checkBinningMatches():
328  return test_codes["DIFF_BIN"]
329  # then do the real check
330  equal = 1
331  nbins = getNbins(self.h1)
332  n_ok_bins=0.0
333  for ibin in xrange(0,nbins):
334  h1bin=self.h1.GetBinContent(ibin)
335  h2bin=self.h2.GetBinContent(ibin)
336  bindiff=h1bin-h2bin
337 
338  binavg=.5*(h1bin+h2bin)
339 
340  if binavg==0 or abs(bindiff) < self.epsilon:
341  n_ok_bins+=1
342  #print "Bin %ibin: bindiff %s" %(ibin,bindiff)
343  else:
344  print "Bin %ibin: bindiff %s" %(ibin,bindiff)
345 
346  #if abs(bindiff)!=0 :
347  #print "Bin %ibin: bindiff %s" %(ibin,bindiff)
348 
349  rank=n_ok_bins/nbins
350 
351  if rank!=1:
352  print "Histogram %s differs: nok: %s ntot: %s" %(self.h1.GetName(),n_ok_bins,nbins)
353 
354  return rank
355 
356 #-------------------------------------------------------------------------------
357 
359  """The bin to bin comparison builds a fake pvalue. It is 0 if the number of
360  bins is different. It is % of corresponding bins otherwhise.
361  A threshold of 1 is needed to require a 1 to 1 correspondance between
362  hisograms.
363  """
364  def __init__(self, threshold=1):
365  StatisticalTest.__init__(self, threshold)
366  self.name='BinToBin1percent'
367  self.epsilon= 0.000001
368  self.tolerance= 0.01
369 
371  if self.h1.GetNbinsX() != self.h2.GetNbinsX() \
372  or self.h1.GetNbinsY() != self.h2.GetNbinsY() \
373  or self.h1.GetNbinsZ() != self.h2.GetNbinsZ() \
374  or abs(self.h1.GetXaxis().GetXmin() - self.h2.GetXaxis().GetXmin()) >self.epsilon \
375  or abs(self.h1.GetYaxis().GetXmin() - self.h2.GetYaxis().GetXmin()) >self.epsilon \
376  or abs(self.h1.GetZaxis().GetXmin() - self.h2.GetZaxis().GetXmin()) >self.epsilon \
377  or abs(self.h1.GetXaxis().GetXmax() - self.h2.GetXaxis().GetXmax()) >self.epsilon \
378  or abs(self.h1.GetYaxis().GetXmax() - self.h2.GetYaxis().GetXmax()) >self.epsilon \
379  or abs(self.h1.GetZaxis().GetXmax() - self.h2.GetZaxis().GetXmax()) >self.epsilon:
380  return False
381  return True
382 
383  def do_test(self):
384  # fist check that binning matches
385  if not self.checkBinningMatches():
386  return test_codes["DIFF_BIN"]
387  # then do the real check
388  equal = 1
389  nbins = getNbins(self.h1)
390  n_ok_bins=0.0
391  for ibin in xrange(0,nbins):
392  ibin+=1
393  h1bin=self.h1.GetBinContent(ibin)
394  h2bin=self.h2.GetBinContent(ibin)
395  bindiff=h1bin-h2bin
396 
397  binavg=.5*(h1bin+h2bin)
398 
399  if binavg==0 or 100*abs(bindiff)/binavg < self.tolerance:
400  n_ok_bins+=1
401  #print "Bin %i bin: bindiff %s" %(ibin,bindiff)
402  else:
403  print "-->Bin %i bin: bindiff %s (%s - %s )" %(ibin,bindiff,h1bin,h2bin)
404 
405  #if abs(bindiff)!=0 :
406  #print "Bin %ibin: bindiff %s" %(ibin,bindiff)
407 
408  rank=n_ok_bins/nbins
409 
410  if rank!=1:
411  print "%s nok: %s ntot: %s" %(self.h1.GetName(),n_ok_bins,nbins)
412 
413  return rank
414 #-------------------------------------------------------------------------------
415 Statistical_Tests={"KS":KS,
416  "Chi2":Chi2,
417  "BinToBin":BinToBin,
418  "BinToBin1percent":BinToBin1percent,
419  "Bin2Bin":BinToBin,
420  "b2b":BinToBin,}
421 #-------------------------------------------------------------------------------
422 
423 def ask_ok(prompt, retries=4, complaint='yes or no'):
424  while True:
425  ok = raw_input(prompt)
426  if ok in ('y', 'ye', 'yes'):
427  return True
428  if ok in ('n', 'no'):
429  return False
430  retries = retries - 1
431  if retries < 0:
432  raise IOError('refusenik user')
433  print complaint
434 
435 #-------------------------------------------------------------------------------
436 
437 class unpickler(Thread):
438  def __init__(self,filename):
439  Thread.__init__(self)
440  self.filename=filename
441  self.directory=""
442 
443  def run(self):
444  print "Reading directory from %s" %(self.filename)
445  ifile=open(self.filename,"rb")
446  self.directory=load(ifile)
447  ifile.close()
448 
449 #-------------------------------------------------------------------------------
450 
451 def wget(url):
452  """ Fetch the WHOLE file, not in bunches... To be optimised.
453  """
454  opener=build_opener(X509CertOpen())
455  datareq = Request(url)
456  datareq.add_header('authenticated_wget', "The ultimate wgetter")
457  bin_content=None
458  try:
459  filename=basename(url)
460  print "Checking existence of file %s on disk..."%filename
461  if not isfile("./%s"%filename):
462  bin_content=opener.open(datareq).read()
463  else:
464  print "File %s exists, skipping.." %filename
465  except ValueError:
466  print "Error: Unknown url %s" %url
467 
468  if bin_content!=None:
469  ofile = open(filename, 'wb')
470  ofile.write(bin_content)
471  ofile.close()
472 
473 #-------------------------------------------------------------------------------
474 ##----------------- Make files pairs: RelValData utils --------------------
475 
477  """Returns unique relvaldata ID for a given file."""
478  run_id = re.search('R\d{9}', file)
479  run = re.search('_RelVal_([\w\d]*)-v\d__', file)
480  if not run:
481  run = re.search('GR_R_\d*_V\d*C?_([\w\d]*)-v\d__', file)
482  if run_id and run:
483  return (run_id.group(), run.group(1))
484  return None
485 
487  """Returns tuple (CMSSW release, GR_R version) for specified RelValData file."""
488  cmssw_release = re.findall('(CMSSW_\d*_\d*_\d*(?:_[\w\d]*)?)-', file)
489  gr_r_version = re.findall('-(GR_R_\d*_V\d*\w?)(?:_RelVal)?_', file)
490  if not gr_r_version:
491  gr_r_version = re.findall('CMSSW_\d*_\d*_\d*(?:_[\w\d]*)?-(\w*)_RelVal_', file)
492  if cmssw_release and gr_r_version:
493  return (cmssw_release[0], gr_r_version[0])
494 
496  """Returns tuple (CMSSW version, run version) for specified file."""
497  cmssw_version = re.findall('DQM_V(\d*)_', file)
498  run_version = re.findall('_RelVal_[\w\d]*-v(\d)__', file)
499  if not run_version:
500  run_version = re.findall('GR_R_\d*_V\d*C?_[\w\d]*-v(\d)__', file)
501  if cmssw_version and run_version:
502  return (int(cmssw_version[0]), int(run_version[0]))
503 
505  """Returns file with maximum version at a) beggining of the file,
506  e.g. DQM_V000M b) at the end of run, e.g. _run2012-vM. M has to be max."""
507  max_file = files[0]
508  max_v = get_relvaldata_version(files[0])
509  for file in files:
510  file_v = get_relvaldata_version(file)
511  if file_v[1] > max_v[1] or ((file_v[1] == max_v[1]) and (file_v[0] > max_v[0])):
512  max_file = file
513  max_v = file_v
514  return max_file
515 
516 ##------------------- Make files pairs: RelVal utils ---------------------
518  """Returns tuple (CMSSW version, run version) for specified file."""
519  cmssw_version = re.findall('DQM_V(\d*)_', file)
520  run_version = re.findall('CMSSW_\d*_\d*_\d*(?:_[\w\d]*)?-[\w\d]*_V\d*\w?(?:_[\w\d]*)?-v(\d*)__', file)
521  if cmssw_version and run_version:
522  return (int(cmssw_version[0]), int(run_version[0]))
523 
525  """Returns file with maximum version at a) beggining of the file,
526  e.g. DQM_V000M b) at the end of run, e.g. _run2012-vM. M has to be max."""
527  max_file = files[0]
528  max_v = get_relval_version(files[0])
529  for file in files:
530  file_v = get_relval_version(file)
531  if file_v[1] > max_v[1] or ((file_v[1] == max_v[1]) and (file_v[0] > max_v[0])):
532  max_file = file
533  max_v = file_v
534  return max_file
535 
537  cmssw_release = re.findall('(CMSSW_\d*_\d*_\d*(?:_[\w\d]*)?)-', file)
538  gr_r_version = re.findall('CMSSW_\d*_\d*_\d*(?:_[\w\d]*)?-([\w\d]*)_V\d*\w?(_[\w\d]*)?-v', file)
539  if cmssw_release and gr_r_version:
540  return (cmssw_release[0], gr_r_version[0])
541 
542 def get_relval_id(file):
543  """Returns unique relval ID (dataset name) for a given file."""
544  dataset_name = re.findall('R\d{9}__([\w\d]*)__CMSSW_', file)
545  return dataset_name[0]
546 
547 ##------------------------- Make files pairs --------------------------
548 def is_relvaldata(files):
549  is_relvaldata_re = re.compile('_RelVal_')
550  return any([is_relvaldata_re.search(filename) for filename in files])
551 
552 def make_files_pairs(files, verbose=True):
553  ## Select functions to use
554  if is_relvaldata(files):
555  is_relval_data = True
556  get_cmssw_version = get_relvaldata_cmssw_version
557  get_id = get_relvaldata_id
558  get_max_version = get_relvaldata_max_version
559  # print 'Pairing Data RelVal files.'
560  else:
561  is_relval_data = False
562  get_cmssw_version = get_relval_cmssw_version
563  get_id = get_relval_id
564  get_max_version = get_relval_max_version
565  # print 'Pairing Monte Carlo RelVal files.'
566 
567  ## Divide files into groups
568  versions_files = dict()
569  for file in files:
570  version = get_cmssw_version(file)
571  if versions_files.has_key(version):
572  versions_files[version].append(file)
573  else:
574  versions_files[version] = [file]
575 
576  ## Print the division into groups
577  if verbose:
578  print '\nFound versions:'
579  for version in versions_files:
580  print '%s: %d files' % (str(version), len(versions_files[version]))
581 
582  if len(versions_files.keys()) <= 1:
583  print '\nFound too little versions, there is nothing to pair. Exiting...\n'
584  exit()
585 
586  ## Select two biggest groups.
587  versions = versions_files.keys()
588  sizes = [len(value) for value in versions_files.values()]
589  v1 = versions[sizes.index(max(sizes))]
590  versions.remove(v1)
591  sizes.remove(max(sizes))
592  v2 = versions[sizes.index(max(sizes))]
593 
594  ## Print two biggest groups.
595  if verbose:
596  print '\nPairing %s (%d files) and %s (%d files)' % (str(v1),
597  len(versions_files[v1]), str(v2), len(versions_files[v2]))
598 
599  ## Pairing two versions
600  print '\nGot pairs:'
601  pairs = []
602  for unique_id in set([get_id(file) for file in versions_files[v1]]):
603  if is_relval_data:
604  dataset_re = re.compile(unique_id[0]+'_')
605  run_re = re.compile(unique_id[1])
606  c1_files = [file for file in versions_files[v1] if dataset_re.search(file) and run_re.search(file)]
607  c2_files = [file for file in versions_files[v2] if dataset_re.search(file) and run_re.search(file)]
608  else:
609  dataset_re = re.compile(unique_id+'_')
610  c1_files = [file for file in versions_files[v1] if dataset_re.search(file)]
611  c2_files = [file for file in versions_files[v2] if dataset_re.search(file)]
612 
613  if len(c1_files) > 0 and len(c2_files) > 0:
614  first_file = get_max_version(c1_files)
615  second_file = get_max_version(c2_files)
616  print '%s\n%s\n' % (first_file, second_file)
617  pairs.extend((first_file, second_file))
618  if verbose:
619  print "Paired and got %d files.\n" % len(pairs)
620  return pairs
def is_sparse
Definition: utils.py:179
def literal2root
Definition: utils.py:69
def do_test
Definition: utils.py:272
def absval
Definition: utils.py:254
#define abs(x)
Definition: mlp_lapack.h:159
def __init__
Definition: utils.py:194
def check_filled_bins
Definition: utils.py:243
def get_relval_version
-------------—— Make files pairs: RelVal utils ---------------——
Definition: utils.py:517
def __init__
Definition: utils.py:239
def profile2histo
Definition: utils.py:220
const T & max(const T &a, const T &b)
def is_relvaldata
----------------------— Make files pairs -----------------------—
Definition: utils.py:548
def load
Definition: svgfig.py:546
def get_relvaldata_cmssw_version
Definition: utils.py:486
def wget
Definition: utils.py:451
def ask_ok
Definition: utils.py:423
def __init__
Definition: utils.py:307
def check_histograms
Definition: utils.py:266
def __init__
Definition: utils.py:438
def get_relvaldata_id
-----------—— Make files pairs: RelValData utils --------------——
Definition: utils.py:476
def get_relval_cmssw_version
Definition: utils.py:536
def setTDRStyle
Definition: utils.py:52
def get_relvaldata_version
Definition: utils.py:495
rank
2D! return test_codes[&quot;2D&quot;]
Definition: utils.py:108
def get_relval_id
Definition: utils.py:542
def logger
Definition: utils.py:47
def make_files_pairs
Definition: utils.py:552
list object
Definition: dbtoconf.py:77
def is_empty
Definition: utils.py:171
def do_test
Definition: utils.py:198
def get_relvaldata_max_version
Definition: utils.py:504
def getNbins
Definition: utils.py:92
def get_relval_max_version
Definition: utils.py:524
def do_test
Definition: utils.py:325
def checkBinningMatches
Definition: utils.py:312
void set(const std::string &name, int value)
set the flag, with a run-time name