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(), WeakEffectsWeightProducer.produce(), ShallowEventDataProducer.produce(), MagneticFieldMapESProducer.produce(), TrackerInteractionGeometryESProducer.produce(), DoubleProducer.produce(), PixelToFEDAssociateFromAsciiESProducer.produce(), PixelToLNKAssociateFromAsciiESProducer.produce(), PatElectronEAIsoCorrectionProducer.produce(), HcalLaserEventFiltProducer2012.produce(), ShallowTracksProducer.produce(), TrackingParticleConversionSelector.produce(), RazorVarProducer.produce(), SiPixelFedCablingMapBuilder.produce(), SiPixelFakeCPEGenericErrorParmESSource.produce(), ConversionTrackRefFix.produce(), AlphaTVarProducer.produce(), Phase2TrackerCablingESProducer.produce(), sistrip::MeasureLA.produce(), ElectronSqPtTkIsolationProducer.produce(), reco::modules::CaloRecHitCandidateProducer< HitCollection >.produce(), CSCIndexerESProducer.produce(), MFProducer.produce(), ShallowRechitClustersProducer.produce(), DistortedMETProducer.produce(), CSCChannelMapperESProducer.produce(), SiPixelFakeGenErrorDBObjectESSource.produce(), SiPixelFakeTemplateDBObjectESSource.produce(), EventVtxInfoNtupleDumper.produce(), DTDigiToRawModule.produce(), ParticleDecayProducer.produce(), ShallowSimhitClustersProducer.produce(), ShallowTrackClustersProducer.produce(), CandPtrProjector.produce(), Phase2Tracker::Phase2TrackerCommissioningDigiProducer.produce(), AssociationMapOneToOne2Association< CKey, CVal >.produce(), AssociationVectorSelector< KeyRefProd, CVal, KeySelector, ValSelector >.produce(), EmptySimHits.produce(), DiJetVarProducer.produce(), DistortedMuonProducerFromDB.produce(), MuonWithPFIsoProducer.produce(), ESRawToDigi.produce(), CastorFastTowerProducer.produce(), AssociationVector2ValueMap< KeyRefProd, CVal >.produce(), DistortedMuonProducer.produce(), DistortedPFCandProducer.produce(), CandViewRefMerger.produce(), evf::EvFFEDSelector.produce(), IPTCorrector.produce(), RawDataCollectorByLabel.produce(), CastorDbProducer.produce(), FamosProducer.produce(), CastorFastClusterProducer.produce(), ShallowSimTracksProducer.produce(), SiStripFedCablingESProducer.produce(), SiStripGainESSource.produce(), SiStripHashedDetIdESProducer.produce(), CalibratedPatElectronProducer.produce(), RegressionEnergyPatElectronProducer.produce(), HcalCalibFEDSelector.produce(), RPCPerformanceESSource.produce(), ElectronSeedTrackRefFix.produce(), CollectionAdder< C >.produce(), SiStripPedestalsESSource.produce(), SiStripNoiseESSource.produce(), SiStripDelayESProducer.produce(), ISRGammaWeightProducer.produce(), SiStripQualityESProducer.produce(), ShallowClustersProducer.produce(), SiStripBackPlaneCorrectionDepESProducer.produce(), FSRWeightProducer.produce(), ISRWeightProducer.produce(), EcalLaserCorrectionService.produce(), SiStripLorentzAngleDepESProducer.produce(), DTUnpackingModule.produce(), IsolatedEcalPixelTrackCandidateProducer.produce(), FastTrackerRecHitCombiner.produce(), PdfWeightProducer.produce(), CSCDCCUnpacker.produce(), ESDigiToRaw.produce(), JetTracksAssociationToTrackRefs.produce(), PixelTracksProducer.produce(), SiStripTemplateEmptyFakeESSource< TObject, TRecord >.produce(), FWRecoGeometryESProducer.produce(), AlignmentPrescaler.produce(), FastTSGFromL2Muon.produce(), NtpProducer< C >.produce(), CastorHardcodeCalibrations.produce(), SiStripTemplateDepFakeESSource< TObject, TRecord, TService, DepTRecord, DepTObj >.produce(), SiStripTemplateFakeESSource< TObject, TRecord, TService >.produce(), LmfSource.produce(), SiStripProcessedRawDigiProducer.produce(), FastTrackerRecHitMaskProducer.produce(), SiPixelGenErrorDBObjectESProducer.produce(), SiPixelTemplateDBObjectESProducer.produce(), ZMuMuTrackUserData.produce(), SiStripGainESProducerTemplate< TDependentRecord, TInputRecord >.produce(), CastorDigiToRaw.produce(), CandReducer.produce(), FRDStreamSource.produce(), CandidateTriggerObjectProducer.produce(), reco::modules::MatcherBase< C1, C2, M >.produce(), reco::modulesNew::Matcher< C1, C2, S, D >.produce(), SiPixelFedFillerWordEventNumber.produce(), TriggerMatchProducer< object >.produce(), CalibratedElectronProducer.produce(), ElectronPATIdMVAProducer.produce(), SiStripQualityFakeESSource.produce(), ZMuMuMuonUserData.produce(), CloneProducer< C >.produce(), ShallowCloneProducer< C >.produce(), HcalDigiToRaw.produce(), HcalHistogramRawToDigi.produce(), PuppiPhoton.produce(), AlcaBeamSpotFromDB.produce(), RawDataSelector.produce(), RPCPackingModule.produce(), TotemTriggerRawToDigi.produce(), ShallowDigisProducer.produce(), TrackInfoProducer.produce(), PFCandIsolatorFromDeposits.produce(), Phase2Tracker::Phase2TrackerDigiProducer.produce(), RPCUnpackingModule.produce(), sistrip::ExcludedFEDListProducer.produce(), sistrip::RawToDigiModule.produce(), ElectronRecalibSuperClusterAssociator.produce(), ZMuMuUserDataOneTrack.produce(), ZMuMuUserData.produce(), CastorRawToDigi.produce(), EcalDCCTBUnpackingModule.produce(), DeltaBetaWeights.produce(), TkAlCaOverlapTagger.produce(), CastorTextCalibrations.produce(), EcalDCCTB07UnpackingModule.produce(), HcalRawToDigi.produce(), ME0MuonTrackCollProducer.produce(), LaserAlignmentProducer.produce(), PiZeroDiscriminatorProducer.produce(), MillePedeFileConverter.produce(), L1GctInternJetProducer.produce(), SubdetFEDSelector.produce(), AlcaBeamSpotProducer.produce(), SiPixelDigiToRaw.produce(), edm::FwdPtrProducer< T, H >.produce(), edm::ThinningProducer< Collection, Selector >.produce(), EventCountProducer.produce(), HcalOmdsCalibrations.produce(), PFMET.produce(), Type1PFMET.produce(), PuppiProducer.produce(), SiPixelRawToDigi.produce(), sistrip::DigiToRawModule.produce(), edm::ProductFromFwdPtrProducer< T, H >.produce(), CSCDigiToRawModule.produce(), CSCTFPacker.produce(), pf2pat::PFMETAlgo.produce(), SiStripRegFEDSelector.produce(), sistrip::SpyEventSummaryProducer.produce(), EcalGlobalShowerContainmentCorrectionsVsEtaESProducer.produce(), FWTGeoRecoGeometryESProducer.produce(), DaqFakeReader.produce(), DTFakeT0ESProducer.produce(), Merger< InputCollection, OutputCollection, P >.produce(), EcalShowerContainmentCorrectionsESProducer.produce(), DTTFFEDSim.produce(), EcalRegionCablingESProducer.produce(), HcalDbProducer.produce(), MatchedProbeMaker< T >.produce(), EcalIsolatedParticleCandidateProducer.produce(), L1TTwinMuxRawToDigi.produce(), FastTrackerRecHitMatcher.produce(), TagProbeMassProducer.produce(), sistrip::SpyDigiConverterModule.produce(), WMuNuProducer.produce(), CSCTFUnpacker.produce(), LaserAlignmentT0Producer.produce(), DTTFFEDReader.produce(), L1TriggerKeyListDummyProd.produce(), AlCaEcalHcalReadoutsProducer.produce(), SiPixelFakeGainESSource.produce(), pf2pat::PFIsoDepositAlgo.produce(), edm::TriggerResultInserter.produce(), SiPixelFakeGainForHLTESSource.produce(), HcalRecHitRecalib.produce(), AlCaElectronTracksReducer.produce(), BufferedBoostIOESProducer< DataType, MyRecord >.produce(), L1TriggerKeyDummyProd.produce(), EcalRecHitRecalib.produce(), TotemVFATRawToDigi.produce(), ZToLLEdmNtupleDumper.produce(), SiPixelFakeGainOfflineESSource.produce(), SiPixelFakeQualityESSource.produce(), L1SubsystemKeysOnlineProd.produce(), L1TriggerKeyOnlineProd.produce(), SiStripFineDelayHit.produce(), AlCaDiJetsProducer.produce(), PFCand_AssoMap.produce(), ECALRegFEDSelector.produce(), PrimaryVertexSorter< ParticlesCollection >.produce(), SiPixelFakeLorentzAngleESSource.produce(), PFPileUp.produce(), ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >.produce(), AlCaGammaJetProducer.produce(), SiPixelQualityESProducer.produce(), L1ObjectKeysOnlineProdBase.produce(), cms::HitReCalibrator.produce(), HBHENoiseFilterResultProducer.produce(), ScalersRawToDigi.produce(), EventWithHistoryProducer.produce(), LTCRawToDigi.produce(), TrackCandidateProducer.produce(), GctDigiToRaw.produce(), PF_PU_AssoMap.produce(), FromClusterSummaryMultiplicityProducer.produce(), HcalTPGCoderULUT.produce(), MisalignedTrackerESProducer.produce(), HcalTextCalibrations.produce(), EventWithHistoryProducerFromL1ABC.produce(), AlCaHcalNoiseProducer.produce(), l1t::L1TRawToDigi.produce(), L1GlobalTriggerRecordProducer.produce(), IsolatedPixelTrackCandidateProducer.produce(), CaloTPGTranscoderULUTs.produce(), pf2pat::TopProjectorAlgo< Top, Bottom >.produce(), RctRawToDigi.produce(), EcalRawToDigi.produce(), EcalFEDWithCRCErrorProducer.produce(), IsolatedPixelTrackCandidateL1TProducer.produce(), ConfigurableAPVCyclePhaseProducer.produce(), HcalHardcodeCalibrations.produce(), ValueMapTraslator.produce(), MisalignedMuonESProducer.produce(), MuonMillepedeTrackRefitter.produce(), PF_PU_FirstVertexTracks.produce(), SoftKillerProducer.produce(), GctRawToDigi.produce(), AlCaECALRecHitReducer.produce(), EcalDigiToRaw.produce(), l1t::L1TDigiToRaw.produce(), ConditionDumperInEdm.produce(), L1GlobalTriggerEvmRawToDigi.produce(), CaloMiscalibTools.produce(), AlCaHBHEMuonProducer.produce(), MultiplicityProducer< T >.produce(), CaloMiscalibToolsMC.produce(), SiTrackerGaussianSmearingRecHitConverter.produce(), TcdsRawToDigi.produce(), HLTTauRefProducer.produce(), L1ConfigOnlineProdBase< TRcd, TData >.produce(), L1GtTextToRaw.produce(), L1GTEvmDigiToRaw.produce(), PFCand_NoPU_WithAM.produce(), JetDeltaRTagInfoValueMapProducer< T, I >.produce(), l1t::AMC13DumpToRaw.produce(), TGeoMgrFromDdd.produce(), AlignmentMuonHIPTrajectorySelector.produce(), l1t::AMCDumpToRaw.produce(), L1GtTriggerMenuLiteProducer.produce(), reco::modules::TrackFullCloneSelectorBase< Selector >.produce(), sistrip::SpyUnpackerModule.produce(), SiPixelCalibDigiProducer.produce(), L1GTDigiToRaw.produce(), APVCyclePhaseProducerFromL1ABC.produce(), L1GlobalTriggerRawToDigi.produce(), MEtoEDMConverter.produce(), APVCyclePhaseProducerFromL1TS.produce(), sistrip::FEDEmulatorModule.produce(), l1t::MP7BufferDumpToRaw.produce(), edm::stream::EDProducerBase.produce(), ShallowGainCalibration.produce(), Pi0FixedMassWindowCalibration.produce(), TrackerToMuonPropagator.produce(), TkLasBeamFitter.produce(), CSCOverlapsTrackPreparation.produce(), reco::PhysObjectMatcher< C1, C2, S, D, Q >.produce(), JetDeltaRValueMapProducer< T, C >.produce(), L1TCaloLayer1RawToDigi.produce(), edm::EDProducer.produce(), MuonSimHitProducer.produce(), TotemDAQMappingESSourceXML.produce(), ZeeCalibration.produce(), TrajectorySeedProducer.produce(), LaserAlignment.produce(), CandidateProducer< TColl, CColl, Selector, Conv, Creator, Init >.produce(), SelectedElectronFEDListProducer< TEle, TCand >.produce(), AlCaIsoTracksProducer.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(), cmsPerfStripChart.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.