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

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

Definition at line 35 of file presentation.py.

References list().

Referenced by produceOfflineValidationTex.main().

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

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

Referenced by writePageReg().

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

References writePage().

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

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