CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
presentation.PageLayout Class Reference
Inheritance diagram for presentation.PageLayout:

Public Member Functions

def __init__ (self, pattern=[], width=1, height=1)
 
def fit (self, plots)
 

Public Attributes

 height
 
 pattern
 
 width
 

Detailed Description

Definition at line 46 of file presentation.py.

Constructor & Destructor Documentation

def presentation.PageLayout.__init__ (   self,
  pattern = [],
  width = 1,
  height = 1 
)

Definition at line 47 of file presentation.py.

47  def __init__(self, pattern=[], width=1, height=1):
48  self.pattern = [] # List of rows; row contains the order numbers
49  # of its plots; e.g. [[1,2,3], [4,5,6]]
50  self.width = width # Maximum width of one plot,
51  # with respect to textwidth.
52  self.height = height # Maximum height of one plot,
53  # with respect to textheight.
54 
def __init__(self, pattern=[], width=1, height=1)
Definition: presentation.py:47

Member Function Documentation

def presentation.PageLayout.fit (   self,
  plots 
)

Definition at line 57 of file presentation.py.

References presentation.PageLayout.height, svgfig.Plot.height, svgfig.Frame.height, svgfig.Dots.height, createfilelist.int, list(), presentation.PageLayout.pattern, presentation.PageLayout.width, svgfig.Plot.width, svgfig.Frame.width, and svgfig.Dots.width.

Referenced by trackingPlots.Iteration.modules().

57  def fit(self, plots):
58  rowlengths = []
59  # First, try to place plots in a square.
60  nplots = sum(len(p) for p in plots)
61  length = int(math.ceil(math.sqrt(nplots)))
62  # Then, fill the square from the bottom and remove extra rows.
63  fullRows = int(nplots/length)
64  residual = nplots - length*fullRows
65  nrows = fullRows
66  if residual != 0:
67  rowlengths.append(residual)
68  nrows += 1
69  for _ in range(fullRows):
70  rowlengths.append(length)
71 
72  # Now, fill the pattern.
73  self.pattern = []
74  if residual == 0 and len(plots[0])%length != 0 and\
75  len(plots[0])%nrows == 0:
76  # It's better to arrange plots in columns, not rows.
77  self.pattern.extend(list(range(i, i+nrows*(length-1)+1, nrows))
78  for i in range(1, nrows+1))
79  else:
80  if residual != 0:
81  self.pattern.append(list(range(1, 1+residual)))
82  self.pattern.extend(list(range(i, i+length)) for i in
83  range(residual+1, nplots-length+2, length))
84 
85  self.width = 1.0/length
86  self.height = 0.8/nrows
87 
88 
89 # Write a set of pages, one for each subdetector.
90 # Arguments: identifier: regular expression to get the wanted plots,
91 # used together with subdetector name
92 # title: title of the plot type
93 # validations: list of relevant ValidationPlots objects.
94 # Returns the parsed script.
def fit(self, plots)
Definition: presentation.py:57
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

Member Data Documentation

presentation.PageLayout.height
presentation.PageLayout.pattern

Definition at line 48 of file presentation.py.

Referenced by presentation.PageLayout.fit(), and dataset.BaseDataset.printFiles().

presentation.PageLayout.width