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 182 of file presentation.py.

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

Definition at line 38 of file presentation.py.

References list().

Referenced by produceOfflineValidationTex.main().

38 def validationclasses(validations):
39  from collections import OrderedDict
40  classes = [validation.validationclass for validation in validations]
41  #remove duplicates - http://stackoverflow.com/a/39835527/5228524
42  classes = list(OrderedDict.fromkeys(classes))
43  return classes
44 
45 # Layout of plots on a page:
def validationclasses(validations)
Definition: presentation.py:38
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 166 of file presentation.py.

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

Referenced by writePageReg().

166 def writePage(plots, title, layout):
167  plotrows = []
168  for row in layout.pattern:
169  plotrow = []
170  for i in range(len(row)):
171  plotrow.append(plotTemplate.replace('[width]', str(layout.width)).\
172  replace('[height]', str(layout.height)).\
173  replace('[path]', plots[row[i]-1]))
174  plotrows.append('\n'.join(plotrow))
175  script = ' \\\\\n'.join(plotrows)
176 
177  return frameTemplate.replace('[plots]', script).replace('[title]', title)
178 
179 
180 # Sort key to rearrange a plot list.
181 # 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 142 of file presentation.py.

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

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

142 def writePageReg(identifier, title, validations, layout=0):
143  plots = []
144  for validation in validations:
145  valiplots = [validation.path+plot for plot in validation.plots
146  if re.search(identifier, plot)]
147  valiplots.sort(key=plotSortKey)
148  plots.append(valiplots)
149  if sum(len(p) for p in plots) == 0:
150  print('Warning: no plots matching ' + identifier)
151  return ''
152 
153  # Create layout, if not given.
154  if layout == 0:
155  layout = PageLayout()
156  layout.fit(plots)
157 
158  return writePage([p for vali in plots for p in vali], title, layout)
159 
160 
161 # Write the given plots on a page.
162 # Arguments: plots: paths of plots to be drawn on the page
163 # title: title of the plot type
164 # layout: a PageLayout object definig the layout.
165 # 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)