CMS 3D CMS Logo

Classes | Functions
presentation Namespace Reference

Classes

class  PageLayout
 
class  SubsectionBase
 
class  SubsectionFromList
 
class  SubsectionOnePage
 
class  SummarySection
 
class  ValidationPlots
 

Functions

def plotSortKey (plot)
 
def validationclasses (validations)
 
def writePage (plots, title, layout)
 
def writePageReg (identifier, title, validations, layout=0)
 

Function Documentation

def presentation.plotSortKey (   plot)

Definition at line 180 of file presentation.py.

180 def plotSortKey(plot):
181  # Move normchi2 before chi2Prob
182  if plot.find('normchi2') != -1:
183  return 'chi2a'
184  if plot.find('chi2Prob') != -1:
185  return 'chi2b'
186  return plot
187 
def plotSortKey(plot)
def presentation.validationclasses (   validations)

Definition at line 36 of file presentation.py.

References list().

Referenced by produceOfflineValidationTex.main().

36 def validationclasses(validations):
37  from collections import OrderedDict
38  classes = [validation.validationclass for validation in validations]
39  #remove duplicates - http://stackoverflow.com/a/39835527/5228524
40  classes = list(OrderedDict.fromkeys(classes))
41  return classes
42 
43 # Layout of plots on a page:
def validationclasses(validations)
Definition: presentation.py:36
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def presentation.writePage (   plots,
  title,
  layout 
)

Definition at line 164 of file presentation.py.

References join(), python.rootplot.root2matplotlib.replace(), and str.

Referenced by writePageReg().

164 def writePage(plots, title, layout):
165  plotrows = []
166  for row in layout.pattern:
167  plotrow = []
168  for i in xrange(len(row)):
169  plotrow.append(plotTemplate.replace('[width]', str(layout.width)).\
170  replace('[height]', str(layout.height)).\
171  replace('[path]', plots[row[i]-1]))
172  plotrows.append('\n'.join(plotrow))
173  script = ' \\\\\n'.join(plotrows)
174 
175  return frameTemplate.replace('[plots]', script).replace('[title]', title)
176 
177 
178 # Sort key to rearrange a plot list.
179 # Arguments: plot: to be sorted.
def replace(string, replacements)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def writePage(plots, title, layout)
#define str(s)
def presentation.writePageReg (   identifier,
  title,
  validations,
  layout = 0 
)

Definition at line 140 of file presentation.py.

References edm.print(), and writePage().

Referenced by presentation.SubsectionOnePage.pages(), and presentation.SubsectionFromList.pages().

140 def writePageReg(identifier, title, validations, layout=0):
141  plots = []
142  for validation in validations:
143  valiplots = [validation.path+plot for plot in validation.plots
144  if re.search(identifier, plot)]
145  valiplots.sort(key=plotSortKey)
146  plots.append(valiplots)
147  if sum(len(p) for p in plots) == 0:
148  print('Warning: no plots matching ' + identifier)
149  return ''
150 
151  # Create layout, if not given.
152  if layout == 0:
153  layout = PageLayout()
154  layout.fit(plots)
155 
156  return writePage([p for vali in plots for p in vali], title, layout)
157 
158 
159 # Write the given plots on a page.
160 # Arguments: plots: paths of plots to be drawn on the page
161 # title: title of the plot type
162 # layout: a PageLayout object definig the layout.
163 # Returns the parsed script.
def writePageReg(identifier, title, validations, layout=0)
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def writePage(plots, title, layout)