CMS 3D CMS Logo

Functions | Variables
TableParser Namespace Reference

Functions

def extractPages (configFileFlag=False)
 
def extractPagesForPackage ()
 
def generateTab (items, curr, tabClass='tabs3')
 

Variables

 allRows
 
 configFileFlag
 
 destTabClassName
 
 fileNameTemplate
 
 htmlFileName
 
 htmlFilePath
 
 htmlFullPath
 
 htmlPage
 
 newTab
 
 oldTab
 
 page
 
 pageNames
 
 pages
 
 table
 
 tableClassName
 
 temp
 

Function Documentation

◆ extractPages()

def TableParser.extractPages (   configFileFlag = False)

Definition at line 21 of file TableParser.py.

References mps_setup.append.

21 def extractPages(configFileFlag = False):
22  # initial page, A
23  pages = {'A':[]}
24  # find all class/namespace talbe rows.
25  table = htmlPage.find('table', {'class' : tableClassName})
26  for row in table.findAll('tr'):
27  # please see the related html file (annotated.html) to understand the
28  # approach here. you will see that, only hidden rows have style
29  # attribute and these hidden rows must be added to pages of their
30  # parents. This is why we need to check whether row has a style
31  # attribute or not.
32  styleFlag = False
33  if 'style' in row: styleFlag = True
34  # change the first letter if row is not hidden (child) one
35  if not styleFlag: firstLetter = row.findAll('td')[0].text[0].upper()
36  # if pages dict doesn't have the page yet..
37  if firstLetter not in pages:
38  pages[firstLetter] = []
39  # insert the row into the related page
40  if configFileFlag:
41  url = row.find('a')['href']
42  if '_cff' in url or '_cfi' in url or '_cfg' in url:
43  pages[firstLetter].append(row)
44  else:
45  pages[firstLetter].append(row)
46  return pages
47 
48 # load rows from the package documentation page. output structure:
49 # pages = {'PackageA' : [..], 'PackageB' : [...]}
def extractPages(configFileFlag=False)
Definition: TableParser.py:21

◆ extractPagesForPackage()

def TableParser.extractPagesForPackage ( )

Definition at line 50 of file TableParser.py.

References mps_setup.append, and nano_mu_digi_cff.strip.

51  # initial page, A
52  pages = {}
53  table = htmlPage.find('table', {'class' : tableClassName})
54  for row in table.findAll('tr'):
55  # first cell contains name of the package...
56  name = row.findAll('td')[0].text
57  # parse package names --please have a look at the pages.html file
58  name = name[name.find(' '):name.find('/')].strip()
59  # if the package is not added yet
60  if name not in pages: pages[name] = []
61  pages[name].append(row)
62  return pages
63 
64 # generate alphabetic tab for html pages that will be generated by this script
def extractPagesForPackage()
Definition: TableParser.py:50

◆ generateTab()

def TableParser.generateTab (   items,
  curr,
  tabClass = 'tabs3' 
)

Definition at line 65 of file TableParser.py.

65 def generateTab(items, curr, tabClass = 'tabs3'):
66  itemTagMap = {}; tab = ''
67  for item in items:
68  fn = fileNameTemplate % item.replace(' ', '') # generate file name
69  if item != curr: tab += '<li><a href="%s">%s</a></li>' % (fn, item)
70  else: tab += '<li class="current"><a href="%s">%s</a></li>'%(fn, item)
71  return '<div class="%s"><ul class="tablist">%s</ul></div>' % (tabClass,tab)
72 
def generateTab(items, curr, tabClass='tabs3')
Definition: TableParser.py:65

Variable Documentation

◆ allRows

TableParser.allRows

Definition at line 105 of file TableParser.py.

◆ configFileFlag

TableParser.configFileFlag

Definition at line 99 of file TableParser.py.

◆ destTabClassName

TableParser.destTabClassName

Definition at line 97 of file TableParser.py.

◆ fileNameTemplate

TableParser.fileNameTemplate

Definition at line 15 of file TableParser.py.

◆ htmlFileName

TableParser.htmlFileName

Definition at line 14 of file TableParser.py.

◆ htmlFilePath

TableParser.htmlFilePath

Definition at line 13 of file TableParser.py.

◆ htmlFullPath

TableParser.htmlFullPath

Definition at line 12 of file TableParser.py.

◆ htmlPage

TableParser.htmlPage

Definition at line 16 of file TableParser.py.

◆ newTab

TableParser.newTab

Definition at line 124 of file TableParser.py.

◆ oldTab

TableParser.oldTab

Definition at line 123 of file TableParser.py.

◆ page

TableParser.page

Definition at line 130 of file TableParser.py.

◆ pageNames

TableParser.pageNames

Definition at line 106 of file TableParser.py.

◆ pages

TableParser.pages

Definition at line 96 of file TableParser.py.

◆ table

TableParser.table

Definition at line 113 of file TableParser.py.

Referenced by edm::exception_actions.actionName(), TableCollection.add(), TableCollectionSet.add(), SiStripOnTrackClusterTableProducerBase.addColumn(), MuBaseFlatTableProducer.addColumn(), FWDialogBuilder.addTable(), NanoAODDQM.analyze(), MuonSimHitProducer.applyMaterialEffects(), l1t::OMDSReader.basicQuery(), l1t::OMDSReader.basicQueryGenericKey(), HLTPrescaleRecorder.beginRun(), nanoaod::FlatTable.bigVectorImpl(), l1t::OMDSReader.columnNames(), CMSEmNoDeltaRay.ConstructProcess(), ParametrisedPhysics.ConstructProcess(), CMSEmStandardPhysicsLPM.ConstructProcess(), LaserOpticalPhysicsList.ConstructProcess(), TableOutputFields.createFields(), TableOutputVectorFields.createFields(), TableCollection.createFields(), TableCollectionSet.createFields(), L1TriggerScalerRead.dropTable(), HLTConfigData.dump(), EcalCondDBReader.EcalCondDBReader(), HLTPrescaleRecorder.endRun(), HLTConfigData.extract(), cond::persistency.f_add_column_description(), l1t::OnlineDBqueryHelper.fetch(), FlatTableField< T >.fill(), TableOutputVectorFields.fill(), NanoAODDQM::Plot1D.fill(), TableCollectionSet.fill(), NanoAODDQM::Profile1D.fill(), AlignmentCorrelationsStore.fillCorrelationsTable(), AlignmentExtendedCorrelationsStore.fillCorrelationsTable(), TableOutputFields.fillEntry(), NanoAODDQM::SelGroupConfig.fillSel(), SiStripPositionCorrectionsTableProducer.fillTable(), MuDTTPGThetaFlatTableProducer.fillTable(), MuDTTPGPhiFlatTableProducer.fillTable(), MuGEMMuonExtTableProducer.fillTable(), MuDTSegmentExtTableProducer.fillTable(), MuDTMuonExtTableProducer.fillTable(), MuCSCTnPFlatTableProducer.fillTable(), MuDigiBaseProducer< DETECTOR_T, DIGI_T >.fillTable(), MuRecObjBaseProducer< DETECTOR_T, RECO_T, GEOM_T >.fillTable(), FlatTableField< T >.fillVectored(), FlatTableField< T >.FlatTableField(), L1TOMDSHelper.getBeamConfiguration(), L1TOMDSHelper.getBunchStructure(), getCentralityFromFile(), L1TOMDSHelper.getInitBunchLumi(), L1TOMDSHelper.getNumberCollidingBunches(), L1TOMDSHelper.getRelativeBunchLumi(), TableCollectionSet.hasAnonymousColumn(), MELaserPrim.lmfLaserName(), LowEnergyFastSimModel.LowEnergyFastSimModel(), makeParticle(), DQMSummaryReader.readData(), RunSummaryRead.readData(), DreamSD.setPbWO2MaterialProperties_(), and NanoAODDQM::Plot1D.vfill().

◆ tableClassName

TableParser.tableClassName

Definition at line 17 of file TableParser.py.

◆ temp

TableParser.temp

Definition at line 121 of file TableParser.py.