CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
plotting.PlotFolder Class Reference
Inheritance diagram for plotting.PlotFolder:
trackingPlots.TrackingPlotFolder

Public Member Functions

def __init__
 
def append
 
def create
 
def draw
 
def getPage
 
def getPlotGroup
 
def getPlotGroups
 
def getPurpose
 
def getSection
 
def iterSelectionName
 
def limitSubFolder
 
def loopSubFolders
 
def onlyForPileup
 
def set
 
def translateSubFolder
 

Private Attributes

 _labels
 
 _loopSubFolders
 
 _onlyForPileup
 
 _page
 
 _plotGroups
 
 _purpose
 
 _section
 

Detailed Description

Represents a collection of PlotGroups, produced from a single folder in a DQM file

Definition at line 1821 of file plotting.py.

Constructor & Destructor Documentation

def plotting.PlotFolder.__init__ (   self,
  plotGroups,
  kwargs 
)
Constructor.

Arguments:
plotGroups     -- List of PlotGroup objects

Keyword arguments
loopSubFolders -- Should the subfolders be looped over? (default: True)
onlyForPileup  -- Plots this folder only for pileup samples
purpose        -- html.PlotPurpose member class for the purpose of the folder, used for grouping of the plots to the HTML pages
page           -- Optional string for the page in HTML generatin
section        -- Optional string for the section within a page in HTML generation

Definition at line 1823 of file plotting.py.

1824  def __init__(self, *plotGroups, **kwargs):
1825  """Constructor.
1826 
1827  Arguments:
1828  plotGroups -- List of PlotGroup objects
1829 
1830  Keyword arguments
1831  loopSubFolders -- Should the subfolders be looped over? (default: True)
1832  onlyForPileup -- Plots this folder only for pileup samples
1833  purpose -- html.PlotPurpose member class for the purpose of the folder, used for grouping of the plots to the HTML pages
1834  page -- Optional string for the page in HTML generatin
1835  section -- Optional string for the section within a page in HTML generation
1836  """
1837  self._plotGroups = list(plotGroups)
1838  self._loopSubFolders = kwargs.pop("loopSubFolders", True)
1839  self._onlyForPileup = kwargs.pop("onlyForPileup", False)
1840  self._purpose = kwargs.pop("purpose", None)
1841  self._page = kwargs.pop("page", None)
1842  self._section = kwargs.pop("section", None)
1843  if len(kwargs) > 0:
1844  raise Exception("Got unexpected keyword arguments: "+ ",".join(kwargs.keys()))
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
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 Function Documentation

def plotting.PlotFolder.append (   self,
  plotGroup 
)

Definition at line 1862 of file plotting.py.

Referenced by diclist.diclist.add(), and BeautifulSoup.Tag.setString().

1863  def append(self, plotGroup):
1864  self._plotGroups.append(plotGroup)
def plotting.PlotFolder.create (   self,
  dirs,
  labels,
  isPileupSample = True,
  requireAllHistograms = False 
)
Create histograms from a list of TFiles.

Arguments:
dirs   -- List of TDirectories
labels -- List of strings for legend labels corresponding the files
isPileupSample -- Is sample pileup (some PlotGroups may limit themselves to pileup)
requireAllHistograms -- If True, a plot is produced if histograms from all files are present (default: False)

Definition at line 1877 of file plotting.py.

1878  def create(self, dirs, labels, isPileupSample=True, requireAllHistograms=False):
1879  """Create histograms from a list of TFiles.
1880 
1881  Arguments:
1882  dirs -- List of TDirectories
1883  labels -- List of strings for legend labels corresponding the files
1884  isPileupSample -- Is sample pileup (some PlotGroups may limit themselves to pileup)
1885  requireAllHistograms -- If True, a plot is produced if histograms from all files are present (default: False)
1886  """
1887 
1888  if len(dirs) != len(labels):
1889  raise Exception("len(files) should be len(labels), now they are %d and %d" % (len(files), len(labels)))
1891  self._labels = labels
1892 
1893  for pg in self._plotGroups:
1894  if pg.onlyForPileup() and not isPileupSample:
1895  continue
1896  pg.create(dirs, requireAllHistograms)
def plotting.PlotFolder.draw (   self,
  prefix = None,
  separate = False,
  saveFormat = ".pdf",
  ratio = False 
)
Draw and save all plots using settings of a given algorithm.

Arguments:
prefix   -- Optional string for file name prefix (default None)
separate -- Save the plots of a group to separate files instead of a file per group (default False)
saveFormat   -- String specifying the plot format (default '.pdf')
ratio    -- Add ratio to the plot (default False)

Definition at line 1897 of file plotting.py.

References DigiInvestigatorHistogramMaker._labels, SeedMultiplicityAnalyzer._labels, hitfit::Constraint_Intermed_Labels._labels, plotting.PlotFolder._labels, and plotting.PlotFolder._plotGroups.

1898  def draw(self, prefix=None, separate=False, saveFormat=".pdf", ratio=False):
1899  """Draw and save all plots using settings of a given algorithm.
1900 
1901  Arguments:
1902  prefix -- Optional string for file name prefix (default None)
1903  separate -- Save the plots of a group to separate files instead of a file per group (default False)
1904  saveFormat -- String specifying the plot format (default '.pdf')
1905  ratio -- Add ratio to the plot (default False)
1906  """
1907  ret = []
1908 
1909  for pg in self._plotGroups:
1910  ret.extend(pg.draw(self._labels, prefix=prefix, separate=separate, saveFormat=saveFormat, ratio=ratio))
1911  return ret
1912 
def plotting.PlotFolder.getPage (   self)

Definition at line 1856 of file plotting.py.

References html.Table._page, and plotting.PlotFolder._page.

1857  def getPage(self):
1858  return self._page
def plotting.PlotFolder.getPlotGroup (   self,
  name 
)

Definition at line 1871 of file plotting.py.

References plotting.PlotFolder._plotGroups.

1872  def getPlotGroup(self, name):
1873  for pg in self._plotGroups:
1874  if pg.getName() == name:
1875  return pg
1876  raise Exception("No PlotGroup named '%s'" % name)
def plotting.PlotFolder.getPlotGroups (   self)

Definition at line 1868 of file plotting.py.

References plotting.PlotFolder._plotGroups.

1869  def getPlotGroups(self):
1870  return self._plotGroups
def plotting.PlotFolder.getPurpose (   self)

Definition at line 1853 of file plotting.py.

References html.Table._purpose, and plotting.PlotFolder._purpose.

1854  def getPurpose(self):
1855  return self._purpose
def plotting.PlotFolder.getSection (   self)

Definition at line 1859 of file plotting.py.

References html.Table._section, and plotting.PlotFolder._section.

1860  def getSection(self):
1861  return self._section
def plotting.PlotFolder.iterSelectionName (   self,
  plotFolderName,
  translatedDqmSubFolder 
)
Iterate over possible selections name (used in output directory name and legend) from the name of PlotterFolder, and a return value of translateSubFolder

Definition at line 1924 of file plotting.py.

1925  def iterSelectionName(self, plotFolderName, translatedDqmSubFolder):
1926  """Iterate over possible selections name (used in output directory name and legend) from the name of PlotterFolder, and a return value of translateSubFolder"""
1927  ret = ""
1928  if plotFolderName != "":
1929  ret += "_"+plotFolderName
1930  if translatedDqmSubFolder is not None:
1931  ret += "_"+translatedDqmSubFolder
1932  yield ret
def plotting.PlotFolder.limitSubFolder (   self,
  limitOnlyTo,
  translatedDqmSubFolder 
)
Return True if this subfolder should be processed

Arguments:
limitOnlyTo            -- List/set/similar containing the translatedDqmSubFolder 
translatedDqmSubFolder -- Return value of translateSubFolder

Definition at line 1933 of file plotting.py.

1934  def limitSubFolder(self, limitOnlyTo, translatedDqmSubFolder):
1935  """Return True if this subfolder should be processed
1936 
1937  Arguments:
1938  limitOnlyTo -- List/set/similar containing the translatedDqmSubFolder
1939  translatedDqmSubFolder -- Return value of translateSubFolder
1940  """
1941  return translatedDqmSubFolder in limitOnlyTo
def plotting.PlotFolder.loopSubFolders (   self)
Return True if the PlotGroups of this folder should be applied to the all subfolders

Definition at line 1845 of file plotting.py.

References plotting.PlotFolder._loopSubFolders.

1846  def loopSubFolders(self):
1847  """Return True if the PlotGroups of this folder should be applied to the all subfolders"""
1848  return self._loopSubFolders
def plotting.PlotFolder.onlyForPileup (   self)
Return True if the folder is intended only for pileup samples

Definition at line 1849 of file plotting.py.

References plotting.PlotFolder._onlyForPileup.

1850  def onlyForPileup(self):
1851  """Return True if the folder is intended only for pileup samples"""
1852  return self._onlyForPileup
def plotting.PlotFolder.set (   self,
  plotGroups 
)

Definition at line 1865 of file plotting.py.

References plotting.PlotFolder._plotGroups.

Referenced by betterConfigParser.BetterConfigParser.getGeneral().

1866  def set(self, plotGroups):
1867  self._plotGroups = plotGroups
def plotting.PlotFolder.translateSubFolder (   self,
  dqmSubFolderName 
)
Method called to (possibly) translate a subfolder name to more 'readable' form

The implementation in this (base) class just returns the
argument. The idea is that a deriving class might want to do
something more complex (like trackingPlots.TrackingPlotFolder
does)

Definition at line 1914 of file plotting.py.

1915  def translateSubFolder(self, dqmSubFolderName):
1916  """Method called to (possibly) translate a subfolder name to more 'readable' form
1917 
1918  The implementation in this (base) class just returns the
1919  argument. The idea is that a deriving class might want to do
1920  something more complex (like trackingPlots.TrackingPlotFolder
1921  does)
1922  """
1923  return dqmSubFolderName

Member Data Documentation

plotting.PlotFolder._labels
private

Definition at line 1890 of file plotting.py.

Referenced by validation.SimpleValidation._doPlots(), and plotting.PlotFolder.draw().

plotting.PlotFolder._loopSubFolders
private

Definition at line 1837 of file plotting.py.

Referenced by plotting.PlotFolder.loopSubFolders().

plotting.PlotFolder._onlyForPileup
private

Definition at line 1838 of file plotting.py.

Referenced by plotting.PlotGroup.onlyForPileup(), and plotting.PlotFolder.onlyForPileup().

plotting.PlotFolder._page
private

Definition at line 1840 of file plotting.py.

Referenced by vertexPlots.VertexSummaryTable.getPage(), trackingPlots.TrackingSummaryTable.getPage(), trackingPlots.TrackingTimingTable.getPage(), and plotting.PlotFolder.getPage().

plotting.PlotFolder._plotGroups
private

Definition at line 1836 of file plotting.py.

Referenced by plotting.PlotFolder.draw(), plotting.PlotFolder.getPlotGroup(), plotting.PlotFolder.getPlotGroups(), and plotting.PlotFolder.set().

plotting.PlotFolder._purpose
private

Definition at line 1839 of file plotting.py.

Referenced by vertexPlots.VertexSummaryTable.getPurpose(), trackingPlots.TrackingSummaryTable.getPurpose(), trackingPlots.TrackingTimingTable.getPurpose(), and plotting.PlotFolder.getPurpose().

plotting.PlotFolder._section
private

Definition at line 1841 of file plotting.py.

Referenced by trackingPlots.TrackingSummaryTable.getSection(), trackingPlots.TrackingTimingTable.getSection(), and plotting.PlotFolder.getSection().