CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
plotting.PlotterTableItem Class Reference

Public Member Functions

def __init__ (self, possibleDirs, tableCreator)
 
def create (self, openFiles, legendLabels, dqmSubFolder)
 

Private Attributes

 _possibleDirs
 
 _tableCreator
 

Detailed Description

Definition at line 2909 of file plotting.py.

Constructor & Destructor Documentation

◆ __init__()

def plotting.PlotterTableItem.__init__ (   self,
  possibleDirs,
  tableCreator 
)

Definition at line 2910 of file plotting.py.

2910  def __init__(self, possibleDirs, tableCreator):
2911  self._possibleDirs = possibleDirs
2912  self._tableCreator = tableCreator
2913 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ create()

def plotting.PlotterTableItem.create (   self,
  openFiles,
  legendLabels,
  dqmSubFolder 
)

Definition at line 2914 of file plotting.py.

References plotting._getDirectory(), plotting.PlotterItem._possibleDirs, plotting.PlotterTableItem._possibleDirs, plotting.PlotterTableItem._tableCreator, getRunAppsInfo.headers, isotrackApplyRegressor.range, and reco.zip().

2914  def create(self, openFiles, legendLabels, dqmSubFolder):
2915  if isinstance(dqmSubFolder, list):
2916  if len(dqmSubFolder) != len(openFiles):
2917  raise Exception("When dqmSubFolder is a list, len(dqmSubFolder) should be len(openFiles), now they are %d and %d" % (len(dqmSubFolder), len(openFiles)))
2918  else:
2919  dqmSubFolder = [dqmSubFolder]*len(openFiles)
2920  dqmSubFolder = [sf.subfolder if sf is not None else None for sf in dqmSubFolder]
2921 
2922  tbl = []
2923  for f, sf in zip(openFiles, dqmSubFolder):
2924  data = None
2925  tdir = _getDirectory(f, self._possibleDirs, sf)
2926  if tdir is not None:
2927  data = self._tableCreator.create(tdir)
2928  tbl.append(data)
2929 
2930  # Check if we have any content
2931  allNones = True
2932  colLen = 0
2933  for col in tbl:
2934  if col is not None:
2935  allNones = False
2936  colLen = len(col)
2937  break
2938  if allNones:
2939  return None
2940 
2941  # Replace all None columns with lists of column length
2942  for i in range(len(tbl)):
2943  if tbl[i] is None:
2944  tbl[i] = [None]*colLen
2945 
2946  return html.Table(columnHeaders=legendLabels, rowHeaders=self._tableCreator.headers(), table=tbl,
2947  purpose=self._tableCreator.getPurpose(), page=self._tableCreator.getPage(), section=self._tableCreator.getSection(dqmSubFolder[0]))
2948 
def create(alignables, pedeDump, additionalData, outputFile, config)
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
Definition: TracksSoA.h:90
def _getDirectory(args, kwargs)
Definition: plotting.py:97

Member Data Documentation

◆ _possibleDirs

plotting.PlotterTableItem._possibleDirs
private

Definition at line 2911 of file plotting.py.

Referenced by plotting.PlotterTableItem.create().

◆ _tableCreator

plotting.PlotterTableItem._tableCreator
private

Definition at line 2912 of file plotting.py.

Referenced by plotting.PlotterTableItem.create().