test
CMS 3D CMS Logo

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

Functions

def main
 

Variables

string help = "DQM file to plot the validation plots from"
 
tuple opts = parser.parse_args()
 
tuple parser = argparse.ArgumentParser(description="Create standard set of tracking validation plots from one or more DQM files.")
 

Function Documentation

def makeTrackValidationPlots.main (   opts)

Definition at line 11 of file makeTrackValidationPlots.py.

11 
12 def main(opts):
13  files = opts.files
14  labels = [f.replace(".root", "") for f in files]
15 
16  drawArgs={}
17  if opts.ratio:
18  drawArgs["ratio"] = True
19  if opts.separate:
20  drawArgs["separate"] = True
21  if opts.png:
22  drawArgs["saveFormat"] = ".png"
23  if opts.verbose:
24  plotting.verbose = True
25 
26  val = SimpleValidation(files, labels, opts.outputDir)
27  kwargs = {}
28  if opts.html:
29  htmlReport = val.createHtmlReport(validationName=opts.html_validation_name)
30  htmlReport.beginSample(SimpleSample(opts.html_prefix, opts.html_sample))
31  kwargs["htmlReport"] = htmlReport
32  val.doPlots(trackingPlots.plotter, subdirprefix=opts.subdirprefix, plotterDrawArgs=drawArgs, **kwargs)
33  val.doPlots(trackingPlots.timePlotter, subdirprefix=opts.subdirprefix, plotterDrawArgs=drawArgs, **kwargs)
34  val.doPlots(vertexPlots.plotter, subdirprefix=opts.subdirprefix, plotterDrawArgs=drawArgs, **kwargs)
35  print
36  if opts.html:
37  htmlReport.write()
38  print "Plots and HTML report created into directory '%s'. You can just move it to some www area and access the pages via web browser" % opts.outputDir
39  else:
40  print "Plots created into directory '%s'." % opts.outputDir

Variable Documentation

string makeTrackValidationPlots.help = "DQM file to plot the validation plots from"

Definition at line 44 of file makeTrackValidationPlots.py.

tuple makeTrackValidationPlots.opts = parser.parse_args()

Definition at line 68 of file makeTrackValidationPlots.py.

tuple makeTrackValidationPlots.parser = argparse.ArgumentParser(description="Create standard set of tracking validation plots from one or more DQM files.")

Definition at line 42 of file makeTrackValidationPlots.py.