CMS 3D CMS Logo

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

Public Member Functions

def __init__
 
def data_to_json
 
def export
 
def module_to_json
 
def path_to_json
 
def produce
 
def pset_to_json
 

Static Public Attributes

tuple file_types = ('html', )
 
string plugin_name = 'HTML Export'
 

Detailed Description

Definition at line 652 of file HTMLExport.py.

Constructor & Destructor Documentation

def HTMLExport.HTMLExport.__init__ (   self)

Definition at line 657 of file HTMLExport.py.

658  def __init__(self):
659  FileExportPlugin.__init__(self)

Member Function Documentation

def HTMLExport.HTMLExport.data_to_json (   self,
  data 
)

Definition at line 671 of file HTMLExport.py.

References HTMLExport.HTMLExport.module_to_json(), HTMLExport.HTMLExport.path_to_json(), HTMLExport.HTMLExport.pset_to_json(), and split.

Referenced by HTMLExport.HTMLExport.produce().

672  def data_to_json(self, data):
673  cmssw = None
674  if 'CMSSW_BASE' in os.environ:
675  cmssw = os.environ['CMSSW_BASE'].split('/')[-1]
676  elif 'CMSSW_RELEASE_BASE' in os.environ:
677  cmssw = os.environ['CMSSW_RELEASE_BASE'].split('/')[-1]
678  result = {'process': {'name': data.process().name_() if data.process() else '(no process)', 'src': data._filename, 'cmssw':cmssw}}
679  toplevel = data.children(data.topLevelObjects()[0]) if data.process() else data.topLevelObjects()
680  for tlo in toplevel:
681  children = data.children(tlo)
682  label = tlo._label
683  if label in ('source', 'services'):
684  result[label] = [{'class':data.classname(child), 'pset':self.pset_to_json(child.parameters_()), 'type':data.type(child), 'label':data.classname(child)} for child in children]
685  elif label in ('essources', 'esproducers', 'esprefers'):
686  result[label] = [self.module_to_json(data, child) for child in children]
687  elif label in ('paths', 'endpaths'):
688  result[label] = [self.path_to_json(data, child) for child in children]
689  return json.dumps(result, indent=4)
double split
Definition: MVATrainer.cc:139
def HTMLExport.HTMLExport.export (   self,
  data,
  filename,
  filetype 
)

Definition at line 660 of file HTMLExport.py.

References cond::EmptyIOVSource.produce(), DimuonMCMatcher.produce(), ShallowExampleProducer.produce(), ShallowEventDataProducer.produce(), WeakEffectsWeightProducer.produce(), FastStripCPEESProducer.produce(), MagneticFieldMapESProducer.produce(), PixelToFEDAssociateFromAsciiESProducer.produce(), FastPixelCPEESProducer.produce(), DoubleProducer.produce(), ShallowTracksProducer.produce(), PixelToLNKAssociateFromAsciiESProducer.produce(), TrackerInteractionGeometryESProducer.produce(), ShallowRechitClustersProducer.produce(), HcalLaserEventFiltProducer2012.produce(), ShallowTrackClustersProducer.produce(), SiPixelFedCablingMapBuilder.produce(), RazorVarProducer.produce(), ShallowSimhitClustersProducer.produce(), AlphaTVarProducer.produce(), sistrip::MeasureLA.produce(), reco::modules::CaloRecHitCandidateProducer< HitCollection >.produce(), ElectronSqPtTkIsolationProducer.produce(), SiPixelFakeCPEGenericErrorParmESSource.produce(), MFProducer.produce(), CSCIndexerESProducer.produce(), DistortedMETProducer.produce(), CSCChannelMapperESProducer.produce(), SiPixelFakeTemplateDBObjectESSource.produce(), SiPixelFakeGenErrorDBObjectESSource.produce(), EventVtxInfoNtupleDumper.produce(), DTDigiToRawModule.produce(), ESRawToDigi.produce(), ParticleDecayProducer.produce(), ShallowSimTracksProducer.produce(), PathTimerInserter.produce(), evf::EvFFEDSelector.produce(), CandPtrProjector.produce(), CastorFastClusterProducer.produce(), CastorFastTowerProducer.produce(), DummyModule.produce(), AssociationMapOneToOne2Association< CKey, CVal >.produce(), AssociationVectorSelector< KeyRefProd, CVal, KeySelector, ValSelector >.produce(), DiJetVarProducer.produce(), DistortedMuonProducerFromDB.produce(), MuonWithPFIsoProducer.produce(), AssociationVector2ValueMap< KeyRefProd, CVal >.produce(), DistortedMuonProducer.produce(), DistortedPFCandProducer.produce(), CandViewRefMerger.produce(), RawDataCollectorByLabel.produce(), FSPFProducer.produce(), CastorDbProducer.produce(), SiStripFedCablingESProducer.produce(), SiStripGainESSource.produce(), SiStripHashedDetIdESProducer.produce(), HcalCalibFEDSelector.produce(), CollectionAdder< C >.produce(), RPCPerformanceESSource.produce(), ShallowClustersProducer.produce(), CalibratedPatElectronProducer.produce(), RegressionEnergyPatElectronProducer.produce(), SiStripNoiseESSource.produce(), SiStripPedestalsESSource.produce(), SiStripDelayESProducer.produce(), ISRGammaWeightProducer.produce(), SiStripQualityESProducer.produce(), CSCDCCUnpacker.produce(), FSRWeightProducer.produce(), ISRWeightProducer.produce(), SiStripBackPlaneCorrectionDepESProducer.produce(), SiStripLorentzAngleDepESProducer.produce(), DTUnpackingModule.produce(), EcalLaserCorrectionService.produce(), CaloRecHitCopy.produce(), FWRecoGeometryESProducer.produce(), PdfWeightProducer.produce(), ESDigiToRaw.produce(), PixelTracksProducer.produce(), NtpProducer< C >.produce(), SiStripTemplateEmptyFakeESSource< TObject, TRecord >.produce(), FamosProducer.produce(), AlignmentPrescaler.produce(), CastorHardcodeCalibrations.produce(), SiStripTemplateFakeESSource< TObject, TRecord, TService >.produce(), SiStripProcessedRawDigiProducer.produce(), IPTCorrector.produce(), LmfSource.produce(), FastTSGFromL2Muon.produce(), SiPixelGenErrorDBObjectESProducer.produce(), DTFakeVDriftESProducer.produce(), SiPixelTemplateDBObjectESProducer.produce(), DTFakeTTrigESProducer.produce(), ElectronRecalibSuperClusterAssociator.produce(), ZMuMuTrackUserData.produce(), CastorDigiToRaw.produce(), SiStripGainESProducerTemplate< TDependentRecord, TInputRecord >.produce(), CandReducer.produce(), CaloRecHitsProducer.produce(), CandidateTriggerObjectProducer.produce(), reco::modules::MatcherBase< C1, C2, M >.produce(), reco::modulesNew::Matcher< C1, C2, S, D >.produce(), SiPixelFedFillerWordEventNumber.produce(), TriggerMatchProducer< object >.produce(), ElectronPATIdMVAProducer.produce(), ZMuMuMuonUserData.produce(), SiStripQualityFakeESSource.produce(), CloneProducer< C >.produce(), ShallowCloneProducer< C >.produce(), HcalDigiToRaw.produce(), HcalHistogramRawToDigi.produce(), RawDataSelector.produce(), AlcaBeamSpotFromDB.produce(), RPCUnpackingModule.produce(), FRDStreamSource.produce(), FastTrackMerger.produce(), ShallowDigisProducer.produce(), CalibratedElectronProducer.produce(), TrackInfoProducer.produce(), PFCandIsolatorFromDeposits.produce(), RPCPackingModule.produce(), sistrip::ExcludedFEDListProducer.produce(), ZMuMuUserDataOneTrack.produce(), ZMuMuUserData.produce(), CastorRawToDigi.produce(), EcalDCCTBUnpackingModule.produce(), HcalRawToDigi.produce(), DeltaBetaWeights.produce(), TkAlCaOverlapTagger.produce(), sistrip::DigiToRawModule.produce(), sistrip::RawToDigiModule.produce(), EcalDCCTB07UnpackingModule.produce(), CastorTextCalibrations.produce(), AlcaBeamSpotProducer.produce(), TrackingRecHitTranslator.produce(), PiZeroDiscriminatorProducer.produce(), SubdetFEDSelector.produce(), L1GctInternJetProducer.produce(), SiPixelRawToDigi.produce(), LaserAlignmentProducer.produce(), EventCountProducer.produce(), PFMET.produce(), HcalOmdsCalibrations.produce(), Type1PFMET.produce(), SiPixelDigiToRaw.produce(), edm::FwdPtrProducer< T, H >.produce(), PileUpProducer.produce(), edm::ProductFromFwdPtrProducer< T, H >.produce(), IsolatedPixelTrackCandidateProducer.produce(), CSCDigiToRawModule.produce(), CSCTFPacker.produce(), SiStripRegFEDSelector.produce(), pf2pat::PFMETAlgo.produce(), FWTGeoRecoGeometryESProducer.produce(), sistrip::SpyEventSummaryProducer.produce(), EcalGlobalShowerContainmentCorrectionsVsEtaESProducer.produce(), HcalDbProducer.produce(), Merger< InputCollection, OutputCollection, P >.produce(), EcalRegionCablingESProducer.produce(), DTFakeT0ESProducer.produce(), DaqFakeReader.produce(), DTTFFEDSim.produce(), EcalShowerContainmentCorrectionsESProducer.produce(), MatchedProbeMaker< T >.produce(), EcalIsolatedParticleCandidateProducer.produce(), LaserAlignmentT0Producer.produce(), TagProbeMassProducer.produce(), sistrip::SpyDigiConverterModule.produce(), WMuNuProducer.produce(), CSCTFUnpacker.produce(), L1TriggerKeyListDummyProd.produce(), DTTFFEDReader.produce(), ZToLLEdmNtupleDumper.produce(), FastElectronSeedProducer.produce(), edm::TriggerResultInserter.produce(), AlCaEcalHcalReadoutsProducer.produce(), SiClusterTranslator.produce(), SiPixelFakeGainForHLTESSource.produce(), SiPixelFakeGainOfflineESSource.produce(), L1TriggerKeyDummyProd.produce(), EcalRecHitRecalib.produce(), TrajectorySeedProducer.produce(), ScalersRawToDigi.produce(), HcalRecHitRecalib.produce(), TrackCandidateProducer.produce(), pf2pat::PFIsoDepositAlgo.produce(), SiPixelFakeGainESSource.produce(), PileUpSimulator.produce(), PFCand_AssoMap.produce(), SiPixelFakeLorentzAngleESSource.produce(), SiPixelFakeQualityESSource.produce(), L1SubsystemKeysOnlineProd.produce(), L1TriggerKeyOnlineProd.produce(), SiStripFineDelayHit.produce(), ECALRegFEDSelector.produce(), KalmanAlignmentAlgorithm.produce(), HBHENoiseFilterResultProducer.produce(), PFPileUp.produce(), FastL1CaloSim.produce(), L1ObjectKeysOnlineProdBase.produce(), SiPixelQualityESProducer.produce(), CaloTPGTranscoderULUTs.produce(), AlCaGammaJetProducer.produce(), cms::HitReCalibrator.produce(), HcalTextCalibrations.produce(), EventWithHistoryProducer.produce(), MisalignedTrackerESProducer.produce(), L1GlobalTriggerRecordProducer.produce(), LTCRawToDigi.produce(), GctDigiToRaw.produce(), HcalTPGCoderULUT.produce(), FromClusterSummaryMultiplicityProducer.produce(), PF_PU_AssoMap.produce(), cms::AlCaDiJetsProducer.produce(), EventWithHistoryProducerFromL1ABC.produce(), AlCaHcalNoiseProducer.produce(), HITSiStripRawToClustersRoI.produce(), HcalHardcodeCalibrations.produce(), pf2pat::TopProjectorAlgo< Top, Bottom >.produce(), EcalRawToDigi.produce(), EcalFEDWithCRCErrorProducer.produce(), ConfigurableAPVCyclePhaseProducer.produce(), HLTTauRefProducer.produce(), MuonMillepedeTrackRefitter.produce(), GctRawToDigi.produce(), MisalignedMuonESProducer.produce(), PF_PU_FirstVertexTracks.produce(), JetDeltaRValueMapProducer< T >.produce(), EcalDigiToRaw.produce(), L1GlobalTriggerEvmRawToDigi.produce(), CaloMiscalibTools.produce(), CaloMiscalibToolsMC.produce(), MultiplicityProducer< T >.produce(), ConditionDumperInEdm.produce(), AlCaIsoTracksProducer.produce(), AlCaECALRecHitReducer.produce(), L1ConfigOnlineProdBase< TRcd, TData >.produce(), L1GtTextToRaw.produce(), L1GTEvmDigiToRaw.produce(), PFCand_NoPU_WithAM.produce(), SiTrackerGaussianSmearingRecHitConverter.produce(), TGeoMgrFromDdd.produce(), KalmanAlignmentTrackRefitter.produce(), AlignmentMuonHIPTrajectorySelector.produce(), L1GlobalTriggerRawToDigi.produce(), L1GtTriggerMenuLiteProducer.produce(), reco::modules::TrackFullCloneSelectorBase< Selector >.produce(), sistrip::SpyUnpackerModule.produce(), L1GTDigiToRaw.produce(), SiPixelCalibDigiProducer.produce(), APVCyclePhaseProducerFromL1ABC.produce(), MEtoEDMConverter.produce(), edm::stream::EDProducerBase.produce(), sistrip::FEDEmulatorModule.produce(), ShallowGainCalibration.produce(), Pi0FixedMassWindowCalibration.produce(), TrackerToMuonPropagator.produce(), APVCyclePhaseProducerFromL1TS.produce(), TkLasBeamFitter.produce(), CSCOverlapsTrackPreparation.produce(), reco::PhysObjectMatcher< C1, C2, S, D, Q >.produce(), edm::EDProducer.produce(), MuonSimHitProducer.produce(), ZeeCalibration.produce(), LaserAlignment.produce(), CandidateProducer< TColl, CColl, Selector, Conv, Creator, Init >.produce(), edm::one::EDProducerBase.produce(), edm::global::EDProducerBase.produce(), reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >.produce(), MatacqProducer.produce(), reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >.produce(), TopProjector< Top, Bottom, Matcher >.produce(), AlCaHOCalibProducer.produce(), edm::stream::CallBeginRunProduceImpl< T, bool >.produce(), edm::stream::CallBeginRunProduceImpl< T, false >.produce(), edm::stream::CallEndRunProduceImpl< T, bProduce, bSummary >.produce(), edm::stream::CallEndRunProduceImpl< T, true, false >.produce(), edm::stream::CallEndRunProduceImpl< T, true, true >.produce(), edm::stream::CallBeginLuminosityBlockProduceImpl< T, bool >.produce(), edm::stream::CallBeginLuminosityBlockProduceImpl< T, false >.produce(), edm::stream::CallEndLuminosityBlockProduceImpl< T, bProduce, bSummary >.produce(), edm::stream::CallEndLuminosityBlockProduceImpl< T, true, false >.produce(), edm::stream::CallEndLuminosityBlockProduceImpl< T, true, true >.produce(), and HTMLExport.HTMLExport.produce().

661  def export(self, data, filename, filetype):
662  with open(filename, 'w') as f:
663  f.write(self.produce(data))
def HTMLExport.HTMLExport.module_to_json (   self,
  data,
  module 
)

Definition at line 723 of file HTMLExport.py.

References HTMLExport.HTMLExport.pset_to_json().

Referenced by HTMLExport.HTMLExport.data_to_json(), and HTMLExport.HTMLExport.path_to_json().

724  def module_to_json(self, data, module):
725  return {
726  'label':data.label(module),
727  'class':data.classname(module),
728  'file':data.pypath(module),
729  'line':data.lineNumber(module),
730  #'package':data.pypackage(module),
731  'pset':self.pset_to_json(module.parameters_()),
732  'type':data.type(module),
733  'uses':data.uses(module),
734  'usedby':data.usedBy(module),
735  'memberof':data.foundIn(module)
736  }
def HTMLExport.HTMLExport.path_to_json (   self,
  data,
  path 
)

Definition at line 737 of file HTMLExport.py.

References HTMLExport.HTMLExport.module_to_json(), and HTMLExport.HTMLExport.path_to_json().

Referenced by HTMLExport.HTMLExport.data_to_json(), and HTMLExport.HTMLExport.path_to_json().

738  def path_to_json(self, data, path):
739  children = data.children(path)
740  if data.isContainer(path):
741  json_children = [self.path_to_json(data, child) for child in children]
742  return {'type':data.type(path), 'label':data.label(path),
743  'path':json_children, 'memberof': data.foundIn(path),
744  'file': data.pypath(path), 'line': data.lineNumber(path)}
745  #'package': data.pypackage(path)}
746  else:
747  return self.module_to_json(data, path)
748 
749 
750 
def HTMLExport.HTMLExport.produce (   self,
  data 
)

Definition at line 664 of file HTMLExport.py.

References HTMLExport.HTMLExport.data_to_json(), python.multivaluedict.dict, and HTMLExport.get_jquery().

Referenced by JSONExport.JsonExport.export(), HTMLExport.HTMLExport.export(), and HTMLExport.HTMLExportStatic.export().

665  def produce(self, data):
666  return PAGE_TEMPLATE % dict(title=data._filename, jquery=get_jquery(),
667  css=CSS_TEMPLATE, js=JS_TEMPLATE, dirname='.',
668  filename=data._filename, json=self.data_to_json(data),
669  cmslogo=CMSLOGO)
670 
def get_jquery
Definition: HTMLExport.py:27
def HTMLExport.HTMLExport.pset_to_json (   self,
  pset 
)

Definition at line 690 of file HTMLExport.py.

References HTMLExport.HTMLExport.pset_to_json(), and split.

Referenced by HTMLExport.HTMLExport.data_to_json(), HTMLExport.HTMLExport.module_to_json(), and HTMLExport.HTMLExport.pset_to_json().

691  def pset_to_json(self, pset):
692  result = []
693  for k, v in pset.items():
694  typename = v.pythonTypeName().split('.')[-1]
695  item = {'label': k, 'type': typename}
696  if not v.isTracked():
697  item['untracked'] = True
698  if typename == 'PSet':
699  item['value'] = self.pset_to_json(v.parameters_())
700  elif typename == 'VPSet':
701  item['value'] = [self.pset_to_json(vv.parameters_()) for vv in v]
702  item['list'] = True
703  elif typename == 'VInputTag':
704  v_it = []
705  for vv in v:
706  if type(vv) == cms.InputTag:
707  v_it.append(vv)
708  elif type(vv) == str:
709  v_it.append(cms.InputTag(vv))
710  else:
711  raise "Unsupported type in VInputTag", type(vv)
712  item['value'] = [(vv.moduleLabel, vv.productInstanceLabel, vv.processName) for vv in v_it]
713  item['list'] = True
714  elif typename == 'InputTag':
715  item['value'] = [v.moduleLabel, v.productInstanceLabel, v.processName]
716  elif isinstance(v, mix._ValidatingListBase):
717  item['value'] = [str(vv) for vv in v]
718  item['list'] = True
719  else:
720  item['value'] = v.pythonValue()
721  result += [item]
722  return result
double split
Definition: MVATrainer.cc:139

Member Data Documentation

tuple HTMLExport.HTMLExport.file_types = ('html', )
static

Definition at line 655 of file HTMLExport.py.

string HTMLExport.HTMLExport.plugin_name = 'HTML Export'
static

Definition at line 654 of file HTMLExport.py.