CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes
HTMLExport.HTMLExportStatic Class Reference
Inheritance diagram for HTMLExport.HTMLExportStatic:

Public Member Functions

def __init__ (self)
 
def export (self, data, filename, filetype)
 
def produce (self, data)
 

Static Public Attributes

 file_types
 
 options_types
 
 plugin_name
 

Detailed Description

Definition at line 752 of file HTMLExport.py.

Constructor & Destructor Documentation

def HTMLExport.HTMLExportStatic.__init__ (   self)

Definition at line 756 of file HTMLExport.py.

756  def __init__(self):
757  FileExportPlugin.__init__(self)
758 

Member Function Documentation

def HTMLExport.HTMLExportStatic.export (   self,
  data,
  filename,
  filetype 
)

Definition at line 1024 of file HTMLExport.py.

References DimuonMCMatcher.produce(), ShallowExampleProducer.produce(), WeakEffectsWeightProducer.produce(), HcalLaserEventFiltProducer2012.produce(), PatElectronEAIsoCorrectionProducer.produce(), CandPtrProjector.produce(), cond::EmptyIOVSource.produce(), MagneticFieldMapESProducer.produce(), PixelToFEDAssociateFromAsciiESProducer.produce(), TrackerInteractionGeometryESProducer.produce(), PixelToLNKAssociateFromAsciiESProducer.produce(), ShallowEventDataProducer.produce(), HLTDQMObjSelector< ObjType, ObjCollType >.produce(), DoubleProducer.produce(), TrackingRecHitPipe.produce(), Phase2TrackerCablingESProducer.produce(), ElectronSqPtTkIsolationProducer.produce(), SiPixelFakeCPEGenericErrorParmESSource.produce(), ConversionTrackRefFix.produce(), SiStripHashedDetIdFakeESSource.produce(), CSCChannelMapperESProducer.produce(), CSCIndexerESProducer.produce(), SiPixelFedCablingMapBuilder.produce(), TrackingParticleConversionRefSelector.produce(), edm::EndPathStatusInserter.produce(), ShallowTracksProducer.produce(), DTDigiToRawModule.produce(), SiPixelFakeGenErrorDBObjectESSource.produce(), reco::modules::CaloRecHitCandidateProducer< HitCollection >.produce(), MFProducer.produce(), SiPixelFakeTemplateDBObjectESSource.produce(), TkDetMapESProducer.produce(), RazorVarProducer.produce(), SiStripApvSimulationParametersESSource.produce(), ESRawToDigi.produce(), ElectronSeedTrackRefFix.produce(), AlphaTVarProducer.produce(), HLTDQMMuonSelector.produce(), DistortedMETProducer.produce(), sistrip::MeasureLA.produce(), EventVtxInfoNtupleDumper.produce(), ParticleDecayProducer.produce(), Phase2Tracker::Phase2TrackerCommissioningDigiProducer.produce(), ShallowRechitClustersProducer.produce(), L1TriggerKeyDummyProdExt.produce(), edm::PathStatusInserter.produce(), L1TriggerKeyListDummyProdExt.produce(), CTPPSLHCInfoESSource.produce(), HFNoseRawToDigiFake.produce(), HGCalRawToDigiFake.produce(), HGCDigiConverter.produce(), RawDataCollectorByLabel.produce(), FamosProducer.produce(), L1SubsystemKeysOnlineProdExt.produce(), L1TriggerKeyOnlineProdExt.produce(), ShallowSimTracksProducer.produce(), SiStripGainESSource.produce(), SiStripPedestalsESSource.produce(), SiStripNoiseESSource.produce(), RPCPerformanceESSource.produce(), CTPPSOpticalFunctionsESSource.produce(), evf::EvFFEDSelector.produce(), AssociationVectorSelector< KeyRefProd, CVal, KeySelector, ValSelector >.produce(), CastorFastClusterProducer.produce(), CastorFastTowerProducer.produce(), EmptySimHits.produce(), ShallowTrackClustersProducer.produce(), ShallowSimhitClustersProducer.produce(), SiStripFedCablingESProducer.produce(), DiJetVarProducer.produce(), RegressionEnergyPatElectronProducer.produce(), DistortedMuonProducerFromDB.produce(), SiStripHashedDetIdESModule.produce(), MuonWithPFIsoProducer.produce(), PFEGammaToCandidateRemapper.produce(), HcalCalibFEDSelector.produce(), AssociationMapOneToOne2Association< CKey, CVal >.produce(), ShallowClustersProducer.produce(), CalibratedPhotonProducerRun2T< T >.produce(), DistortedMuonProducer.produce(), DistortedPFCandProducer.produce(), SiStripGainSimESProducer.produce(), ESDigiToRaw.produce(), AssociationVector2ValueMap< KeyRefProd, CVal >.produce(), EcalIsolatedParticleCandidateProducer.produce(), SiStripTemplateEmptyFakeESSource< TObject, TRecord >.produce(), PFMuonUntagger.produce(), CTPPSInterpolatedOpticalFunctionsESSource.produce(), L1ObjectKeysOnlineProdBaseExt.produce(), RPCInverseCPPFLinkMapESProducer.produce(), RPCInverseLBLinkMapESProducer.produce(), RPCInverseOMTFLinkMapESProducer.produce(), RPCInverseTwinMuxLinkMapESProducer.produce(), IPTCorrector.produce(), ISRGammaWeightProducer.produce(), CandViewRefMerger.produce(), DTUnpackingModule.produce(), SiStripProcessedRawDigiProducer.produce(), RawDataSelector.produce(), RPCAMCUnpacker.produce(), PixelTracksProducer.produce(), SiStripQualityFakeESSource.produce(), SiStripGainESProducer.produce(), FSRWeightProducer.produce(), ISRWeightProducer.produce(), CSCDCCUnpacker.produce(), CastorHardcodeCalibrations.produce(), RPCCPPFUnpacker.produce(), CollectionAdder< C >.produce(), FastTrackerRecHitMaskProducer.produce(), FWRecoGeometryESProducer.produce(), HcalTimeSlewEP.produce(), CalibratedElectronProducerRun2T< T >.produce(), IsolatedEcalPixelTrackCandidateProducer.produce(), HBHEDarkeningEP.produce(), PdfWeightProducer.produce(), PFCandidateMuonUntagger.produce(), JetTracksAssociationToTrackRefs.produce(), EcalLaserCorrectionService.produce(), LmfSource.produce(), AlignmentPrescaler.produce(), CastorDigiToRaw.produce(), CTPPSPixelRawToDigi.produce(), TotemTriggerRawToDigi.produce(), NtpProducer< C >.produce(), ElectronPATIdMVAProducer.produce(), AlcaBeamSpotFromDB.produce(), HcalDigiToRaw.produce(), HcalHistogramRawToDigi.produce(), RPCAMCRawToDigi.produce(), RPCTwinMuxDigiToRaw.produce(), FRDStreamSource.produce(), CandidateTriggerObjectProducer.produce(), FastTSGFromL2Muon.produce(), ElectronRecalibSuperClusterAssociator.produce(), ShallowDigisProducer.produce(), TriggerMatchProducer< object >.produce(), ShallowCloneProducer< C >.produce(), CloneProducer< C >.produce(), CandReducer.produce(), DeltaBetaWeights.produce(), Phase2Tracker::Phase2TrackerDigiProducer.produce(), RPCDigiMerger.produce(), reco::modules::MatcherBase< C1, C2, M >.produce(), reco::modulesNew::Matcher< C1, C2, S, D >.produce(), SiPixelFedFillerWordEventNumber.produce(), TrackInfoProducer.produce(), ZMuMuTrackUserData.produce(), EcalDCCTBUnpackingModule.produce(), PFMET.produce(), PuppiPhoton.produce(), TOFPIDProducer.produce(), sistrip::ExcludedFEDListProducer.produce(), edm::FwdPtrProducer< T, H >.produce(), FastTrackerRecHitCombiner.produce(), edm::ProductFromFwdPtrProducer< T, H >.produce(), ZMuMuMuonUserData.produce(), RawDataMapperByLabel.produce(), AlcaBeamSpotProducer.produce(), VertexCompositeCandidateCollectionSelector.produce(), GEMDigiToRawModule.produce(), HcalRawToDigi.produce(), Type1PFMET.produce(), DaqFakeReader.produce(), EcalDCCTB07UnpackingModule.produce(), SiPixel2DTemplateDBObjectESProducer.produce(), MillePedeFileConverter.produce(), SiPixelGenErrorDBObjectESProducer.produce(), EventCountProducer.produce(), RPCUnpackingModule.produce(), SiStripConfObjectFakeESSource.produce(), ZMuMuUserDataOneTrack.produce(), ZMuMuUserData.produce(), TkAlCaOverlapTagger.produce(), SubdetFEDSelector.produce(), pf2pat::PFMETAlgo.produce(), L1GctInternJetProducer.produce(), PFCandIsolatorFromDeposits.produce(), sistrip::RawToDigiModule.produce(), sistrip::DigiToRawModule.produce(), SiPixelTemplateDBObjectESProducer.produce(), LaserAlignmentProducer.produce(), ME0MuonTrackCollProducer.produce(), SiPixelRawToDigi.produce(), FastTrackerRecHitMatcher.produce(), EcalGlobalShowerContainmentCorrectionsVsEtaESProducer.produce(), SiStripApvGainFakeESSource.produce(), edm::ThinningProducer< Collection, Selector >.produce(), DTFakeT0ESProducer.produce(), WMuNuProducer.produce(), CastorRawToDigi.produce(), CSCTFPacker.produce(), SiStripRegFEDSelector.produce(), CandMergerCleanOthersByDR.produce(), DTTFFEDSim.produce(), EcalRegionCablingESProducer.produce(), PPSTimingCalibrationESSource.produce(), CastorTextCalibrations.produce(), EcalShowerContainmentCorrectionsESProducer.produce(), SiStripBaseDelayFakeESSource.produce(), sistrip::SpyEventSummaryProducer.produce(), SiStripLatencyFakeESSource.produce(), SiStripPedestalsFakeESSource.produce(), L1ConfigOnlineProdBaseExt< TRcd, TData >.produce(), SiStripThresholdFakeESSource.produce(), HcalRawToDigiFake.produce(), L1TTwinMuxRawToDigi.produce(), SiStripBackPlaneCorrectionFakeESSource.produce(), SiStripBadModuleConfigurableFakeESSource.produce(), SiStripDelayESProducer.produce(), GEMRawToDigiModule.produce(), Merger< InputCollection, OutputCollection, P >.produce(), PuppiProducer.produce(), RPCTwinMuxRawToDigi.produce(), MatchedProbeMaker< T >.produce(), sistrip::SpyDigiConverterModule.produce(), DTTFFEDReader.produce(), CSCTFUnpacker.produce(), AlcaPCCProducer.produce(), RawPCCProducer.produce(), edm::TriggerResultInserter.produce(), PFPileUp.produce(), SiPixelFakeGainESSource.produce(), SiPixelFakeGainForHLTESSource.produce(), SiPixelFakeGainOfflineESSource.produce(), RPCPackingModule.produce(), BufferedBoostIOESProducer< DataType, MyRecord >.produce(), AlCaEcalHcalReadoutsProducer.produce(), RunInfoTestESProducer.produce(), TagProbeMassProducer.produce(), LaserAlignmentT0Producer.produce(), SiStripNoisesFakeESSource.produce(), EcalRecHitRecalib.produce(), AlCaElectronTracksReducer.produce(), HcalRecHitRecalib.produce(), L1TriggerKeyListDummyProd.produce(), SiPixelFakeQualityESSource.produce(), SiPixelFakeLorentzAngleESSource.produce(), TotemVFATRawToDigi.produce(), SiStripLorentzAngleDepESProducer.produce(), DTuROSDigiToRaw.produce(), L1TriggerKeyDummyProd.produce(), PrimaryVertexSorter< ParticlesCollection >.produce(), pf2pat::PFIsoDepositAlgo.produce(), SiStripBackPlaneCorrectionDepESProducer.produce(), CSCDigiToRawModule.produce(), ECALRegFEDSelector.produce(), cms::HitReCalibrator.produce(), L1SubsystemKeysOnlineProd.produce(), L1TriggerKeyOnlineProd.produce(), DDCompactViewESProducer.produce(), PFCand_AssoMap.produce(), DDCompactViewMFESProducer.produce(), HcalDbProducer.produce(), ZToLLEdmNtupleDumper.produce(), GctDigiToRaw.produce(), HcalDigiToRawuHTR.produce(), DTuROSRawToDigi.produce(), DDSpecParRegistryESProducer.produce(), AlCaDiJetsProducer.produce(), AlCaGammaJetProducer.produce(), L1GlobalTriggerRecordProducer.produce(), LTCRawToDigi.produce(), ScalersRawToDigi.produce(), TrackCandidateProducer.produce(), PixelFEDChannelCollectionProducer.produce(), MisalignedTrackerESProducer.produce(), SiStripFineDelayHit.produce(), ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >.produce(), CTPPSBeamParametersESSource.produce(), HBHENoiseFilterResultProducer.produce(), DDVectorRegistryESProducer.produce(), FromClusterSummaryMultiplicityProducer.produce(), SiPixelQualityESProducer.produce(), L1ObjectKeysOnlineProdBase.produce(), EventWithHistoryProducer.produce(), AlCaHcalNoiseProducer.produce(), CastorDbProducer.produce(), PF_PU_AssoMap.produce(), HcalTPGCoderULUT.produce(), TcdsRawToDigi.produce(), dqmBmtfAlgoSelector::L1TBMTFAlgoSelector.produce(), SiStripLorentzAngleFakeESSource.produce(), MisalignedMuonESProducer.produce(), L1GTEvmDigiToRaw.produce(), EventWithHistoryProducerFromL1ABC.produce(), FWTGeoRecoGeometryESProducer.produce(), DDDetectorESProducer.produce(), RctRawToDigi.produce(), EcalFEDWithCRCErrorProducer.produce(), CaloTPGTranscoderULUTs.produce(), CalibrationTrackSelectorFromDetIdList.produce(), MuonMillepedeTrackRefitter.produce(), IsolatedPixelTrackCandidateProducer.produce(), EcalRawToDigi.produce(), GctRawToDigi.produce(), HcalTextCalibrations.produce(), SoftKillerProducer.produce(), ValueMapTraslator.produce(), ConfigurableAPVCyclePhaseProducer.produce(), L1GTDigiToRaw.produce(), L1GlobalTriggerEvmRawToDigi.produce(), HLTTauRefProducer.produce(), SiPixelDigiToRaw.produce(), l1t::L1TRawToDigi.produce(), OnlineMetaDataRawToDigi.produce(), IsolatedPixelTrackCandidateL1TProducer.produce(), AlCaECALRecHitReducer.produce(), omtf::OmtfPacker.produce(), JetDeltaRTagInfoValueMapProducer< T, I >.produce(), L1GtTextToRaw.produce(), MultiplicityProducer< T >.produce(), CaloMiscalibToolsMC.produce(), omtf::OmtfUnpacker.produce(), CaloMiscalibTools.produce(), PF_PU_FirstVertexTracks.produce(), AlCaHBHEMuonProducer.produce(), l1t::L1TDigiToRaw.produce(), L1ConfigOnlineProdBase< TRcd, TData >.produce(), EcalDigiToRaw.produce(), l1t::AMCDumpToRaw.produce(), l1t::AMC13DumpToRaw.produce(), L1GtTriggerMenuLiteProducer.produce(), PFCandidateRecalibrator.produce(), L1GlobalTriggerRawToDigi.produce(), AlignmentMuonHIPTrajectorySelector.produce(), CTPPSFastTrackingProducer.produce(), TrackingRecHitProducer.produce(), PFCand_NoPU_WithAM.produce(), SiPixelCalibDigiProducer.produce(), APVCyclePhaseProducerFromL1ABC.produce(), reco::modules::TrackFullCloneSelectorBase< Selector >.produce(), sistrip::SpyUnpackerModule.produce(), ConditionDumperInEdm.produce(), sistrip::FEDEmulatorModule.produce(), TGeoMgrFromDdd.produce(), CTPPSSimHitProducer.produce(), ShallowGainCalibration.produce(), JetConstituentSelector< T, C >.produce(), APVCyclePhaseProducerFromL1TS.produce(), l1t::MP7BufferDumpToRaw.produce(), SiStripQualityESProducer.produce(), TkLasBeamFitter.produce(), CTPPSTotemDigiToRaw.produce(), Pi0FixedMassWindowCalibration.produce(), TrackerToMuonPropagator.produce(), reco::PhysObjectMatcher< C1, C2, S, D, Q >.produce(), EDMtoMEConverter.produce(), edm::stream::EDProducerBase.produce(), CTPPSPixelDigiToRaw.produce(), CSCOverlapsTrackPreparation.produce(), FastSimProducer.produce(), JetDeltaRValueMapProducer< T, C >.produce(), MEtoEDMConverter.produce(), CTPPSRecHitProducer.produce(), FastTrackDeDxProducer.produce(), L1TCaloLayer1RawToDigi.produce(), MuonSimHitProducer.produce(), LaserAlignment.produce(), ZeeCalibration.produce(), TrajectorySeedProducer.produce(), TotemDAQMappingESSourceXML.produce(), SelectedElectronFEDListProducer< TEle, TCand >.produce(), CandidateProducer< TColl, CColl, Selector, Conv, Creator, Init >.produce(), edm::EDProducer.produce(), AlCaIsoTracksProducer.produce(), edm::one::EDProducerBase.produce(), MatacqProducer.produce(), edm::limited::EDProducerBase.produce(), edm::global::EDProducerBase.produce(), reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >.produce(), TopProjector< Top, Bottom, Matcher >.produce(), AlCaHOCalibProducer.produce(), edm::stream::impl::Accumulator.produce(), edm::stream::CallBeginRunProduceImpl< T, bool >.produce(), edm::stream::CallBeginRunProduceImpl< T, false >.produce(), edm::one::impl::Accumulator< T >.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(), edm::limited::impl::Accumulator< T >.produce(), edm::global::impl::Accumulator< T >.produce(), HTMLExport.HTMLExport.produce(), and HTMLExport.HTMLExportStatic.produce().

1024  def export(self,data,filename,filetype):
1025  #if not data.process():
1026  # raise "HTMLExport requires a cms.Process object"
1027 
1028  html = self.produce(data)
1029 
1030  if filetype=='html':
1031  htmlfile = open(filename,'w')
1032  htmlfile.write(html)
1033  htmlfile.close()
1034 
def produce(self, data)
Definition: HTMLExport.py:759
def export(self, data, filename, filetype)
Definition: HTMLExport.py:1024
def HTMLExport.HTMLExportStatic.produce (   self,
  data 
)

Definition at line 759 of file HTMLExport.py.

References HTMLExport.elem(), join(), and str.

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

759  def produce(self,data):
760  def elem(elemtype,innerHTML='',html_class='',**kwargs):
761  if html_class:
762  kwargs['class']=html_class
763  return "<%s %s>%s</%s>\n" % (elemtype,' '.join(['%s="%s"'%(k,v) for k,v in kwargs.items()]),innerHTML,elemtype)
764  def div(innerHTML='',html_class='',**kwargs):
765  return elem('div',innerHTML,html_class,**kwargs)
766 
767  def htmlPSet(pset):
768  def linkInputTag(tag):
769  inputtag=''
770  if isinstance(tag,typ.InputTag):
771  inputtag = tag.pythonValue()
772  else:
773  inputtag = tag
774  if len(str(tag))==0:
775  inputtag = '""'
776  return inputtag
777 
778  pset_items_html=''
779  for k,v in pset.items():
780  if isinstance(v,mix._ParameterTypeBase):
781  if isinstance(v,mix._SimpleParameterTypeBase):
782  item_class='other'
783  if isinstance(v,typ.bool):
784  item_class='bool'
785  if isinstance(v,typ.double):
786  item_class='double'
787  if isinstance(v,typ.string):
788  item_class='string'
789  if isinstance(v,(typ.int32, typ.uint32, typ.int64, typ.uint64)):
790  item_class='int'
791  pset_items_html+=elem('tr',
792  elem('td',k,'param-name')
793  +elem('td',v.pythonTypeName(),'param-class')
794  +elem('td',v.pythonValue(),'param-value-%s'%item_class),
795  'pset-item'
796  )
797  if isinstance(v,typ.InputTag):
798  pset_items_html+=elem('tr',
799  elem('td',k,'param-name')
800  +elem('td',v.pythonTypeName(),'param-class')
801  +elem('td',linkInputTag(v),'param-value-inputtag'),
802  'pset-item'
803  )
804  if isinstance(v,typ.PSet):
805  pset_html = ''
806  if len(v.parameters_())==0:
807  pset_items_html+=elem('tr',
808  elem('td',k,'param-name')
809  +elem('td',v.pythonTypeName(),'param-class')
810  +elem('td','(empty)','label'),
811  'pset-item'
812  )
813  else:
814  pset_items_html+=elem('tr',
815  elem('td',k,'param-name')
816  +elem('td',v.pythonTypeName(),'param-class')
817  +elem('td',htmlPSet(v.parameters_())),
818  'pset-item'
819  )
820  if isinstance(v,mix._ValidatingListBase):
821  list_html = ''
822  if len(v)==0:
823  list_html = elem('li','(empty)','label')
824  else:
825  if isinstance(v,typ.VInputTag):
826  for vv in v:
827  list_html += elem('li',linkInputTag(vv),'param-value-inputtag pset-list-item')
828  elif isinstance(v,typ.VPSet):
829  for vv in v:
830  list_html += elem('li',htmlPSet(vv.parameters_()),'pset-list-item')
831  else:
832  item_class='other'
833  if isinstance(v,typ.vbool):
834  item_class='bool'
835  if isinstance(v,typ.vdouble):
836  item_class='double'
837  if isinstance(v,typ.vstring):
838  item_class='string'
839  if isinstance(v,(typ.vint32,typ.vuint32,typ.vint64,typ.vuint64)):
840  item_class='int'
841  for vv in v:
842  if len(str(vv))==0:
843  vv = "''"
844  list_html += elem('li',vv,'pset-list-item param-value-%s'%item_class)
845  pset_items_html+=elem('tr',
846  elem('td',k,'param-name')
847  +elem('td','%s[%s]'%(v.pythonTypeName(),len(v)),'param-class')
848  +elem('td',elem('ol',list_html,'pset-list')),
849  'pset-item'
850  )
851 
852 
853  return elem('table',pset_items_html,'pset')
854 
855  def htmlModule(mod):
856  mod_label_html = div(elem('a',data.label(mod),'title',name=data.label(mod)),'module_label '+data.type(mod),onClick='return toggleModuleVisible(\'%s\')'%('mod_%s'%(data.label(mod))))
857 
858  mod_table = elem('table',
859  elem('tr',elem('td','Type','label')+elem('td',data.type(mod)))
860  +elem('tr',elem('td','Class','label')+elem('td',data.classname(mod))),
861  'module_table')
862 
863  mod_pset = htmlPSet(mod.parameters_())
864 
865  mod_content_html = div(mod_table+mod_pset,'module_area',id='mod_%s'%data.label(mod))
866  return div(mod_label_html+mod_content_html,'module',id='module_'+data.label(mod))
867 
868  def htmlPathRecursive(p):
869  children = data.children(p)
870  if children:
871  seq_name='Sequence'
872  if isinstance(p,sqt.Path):
873  seq_name='Path'
874  if isinstance(p,sqt.EndPath):
875  seq_name='EndPath'
876  seq_label_html = div(seq_name+' '+elem('span',data.label(p),'title')+' '+elem('span','[%s children hidden]'%len(children),'hidden',id='seq_hidden_%s'%data.label(p)),'sequence_label',onClick='return toggleSequenceVisible(\'%s\')'%data.label(p),id='seq_label_%s'%data.label(p))
877  seq_inner_content_html = ''.join([htmlPathRecursive(c) for c in children])
878  seq_content_html = div(seq_inner_content_html,'sequence_area',id='seq_%s'%data.label(p))
879  return div(seq_label_html+seq_content_html,'sequence')
880  else:
881  return htmlModule(p)
882 
883  toplevel={}
884 
885 
886 
887  filter_html = elem('span','Filter '+
888  elem('input',type='text',width=50,onkeyup="return doFilter();",id='input-filter'),
889  'right label')
890 
891  header_html = div('Config File Visualisation'+filter_html,'header')
892 
893  if data.process():
894  for tlo in data.children(data.topLevelObjects()[0]):
895  children = data.children(tlo)
896  if children:
897  toplevel[tlo._label]=children
898  path_html=''
899  if 'paths' in toplevel:
900  for path in toplevel['paths']:
901  path_html += div(htmlPathRecursive(path),'path')
902 
903  file_html = div(elem('span','Process:')
904  +elem('span',data.process().name_(),'title')
905  +elem('span',data._filename,'right'),
906  'file')
907  head_html = elem('head',elem('title',data.process().name_()))
908  else:
909  toplevel['sequences']=[]
910  toplevel['paths']=[]
911  toplevel['modules']=[]
912  for tlo in data.topLevelObjects():
913  if data.type(tlo)=='Sequence':
914  toplevel['sequences']+=[tlo]
915  if data.type(tlo)=='Path':
916  toplevel['paths']+=[tlo]
917  if data.type(tlo) in ('EDAnalyzer','EDFilter','EDProducer','OutputModule'):
918  toplevel['modules']+=[tlo]
919 
920  path_html = ''
921  sequence_html = ''
922  module_html = ''
923  for path in toplevel['paths']:
924  path_html += div(htmlPathRecursive(path),'path')
925  for sequence in toplevel['sequences']:
926  sequence_html += htmlPathRecursive(sequence)
927  for module in toplevel['modules']:
928  module_html += htmlModule(module)
929  file_html = div(elem('span',data._filename,'right'),'file')
930  path_html += sequence_html
931  path_html += module_html
932  head_html = elem('head',elem('title',data._filename))
933  footer_html = div('gordon.ball','footer')
934 
935 
936 
937  style_html = elem('style',
938  """
939  .title{font-weight:bold}
940  .label{color:grey}
941  .header{position:fixed;top:0px;left:0px;width:100%;background:#33cc00;font-weight:bold;font-size:120%}
942  .footer{position:fixed;bottom:0px;left:0px;width:100%;background:#33cc00;text-align:right}
943  .canvas{padding:40px 10px 40px 10px}
944  .file{position:relative;background:#bbb;width:100%;padding-left:5px}
945  .right{position:absolute;right:5px}
946  .sequence{border:1px solid #aaa}
947  .sequence:hover{border 1px solid #00ffff}
948  .sequence_label{background:lightskyblue;padding-left:5px}
949  .sequence_label:hover{background:#fff}
950  .sequence_label_hidden{background:grey;padding-left:5px}
951  .sequence_area{padding:5px 0px 5px 5px}
952  .edproducer{border:1px solid red;background-image:url('edproducer.png');background-position:center left;background-repeat:no-repeat;padding:0px 0px 0px 40px}
953  .edfilter{border:1px solid green;background-image:url('edfilter.png');background-position:center left;background-repeat:no-repeat;padding:0px 0px 0px 40px}
954  .edanalyzer{border:1px solid blue;background-image:url('edanalyzer.png');background-position:center left;background-repeat:no-repeat;padding:0px 0px 0px 40px}
955  .outputmodule{border:1px solid green;background-image:url('outputmodule.png');background-position:center left;background-repeat:no-repeat;padding:0px 0px 0px 40px}
956  .module{}
957  .module_label:hover{background:#ccc;position:relative}
958  .module_area{display:none;padding:5px 0px 15px 15px;background:beige}
959  .pset{border-spacing:10px 1px;border:1px solid black}
960  .pset-item{}
961  .pset-list{list-style-type:none;margin:0px;padding:2px 2px 2px 2px;border:1px solid grey}
962  .pset-list-item{border-top:1px solid lightgrey;border-bottom:1px solid lightgrey}
963  .param-name{font-weight:bold}
964  .param-class{color:grey}
965  .param-value-int{font-family:courier;color:blue}
966  .param-value-double{font-family:courier;color:purple}
967  .param-value-string{font-family:courier;color:brown}
968  .param-value-bool{font-family:courier;color:#f0f}
969  .param-value-inputtag{font-family:courier;color:red}
970  .param-value-other{font-family:courier}
971  .path{}
972  .hidden{display:none}
973  """,
974  type='text/css')
975 
976  script_html = elem('script',
977  """
978  function toggleModuleVisible(id) {
979  var elem = document.getElementById(id);
980  if (elem.style.display=='block') {
981  elem.style.display='none';
982  } else {
983  elem.style.display='block';
984  }
985  }
986 
987  function toggleSequenceVisible(id) {
988  var area_elem = document.getElementById('seq_'+id);
989  var hidden_elem = document.getElementById('seq_hidden_'+id);
990  var label_elem = document.getElementById('seq_label_'+id);
991  if (area_elem.style.display=='none') {
992  area_elem.style.display='block';
993  hidden_elem.style.display='none';
994  label_elem.className = 'sequence_label';
995  } else {
996  area_elem.style.display='none';
997  hidden_elem.style.display='block';
998  label_elem.className = 'sequence_label_hidden';
999  }
1000  }
1001 
1002  function doFilter() {
1003  var text = document.getElementById('input-filter').value;
1004  var regex = new RegExp(text);
1005  for (var i=0;i<document.all.length;i++) {
1006  if (document.all(i).id.substr(0,7)=="module_") {
1007  var elem = document.all(i);
1008  var elem_name = elem.id.substr(7);
1009  if (regex.test(elem_name)) {
1010  elem.style.display='block';
1011  } else {
1012  elem.style.display='none';
1013  }
1014  }
1015  }
1016  }
1017  """,
1018  type='text/javascript')
1019 
1020  body_html = elem('body',script_html+header_html+footer_html+div(file_html+path_html,'canvas'))
1021 
1022  return elem('html',head_html+style_html+body_html)
1023 
def produce(self, data)
Definition: HTMLExport.py:759
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:19
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
#define str(s)

Member Data Documentation

HTMLExport.HTMLExportStatic.file_types
static

Definition at line 755 of file HTMLExport.py.

HTMLExport.HTMLExportStatic.options_types
static

Definition at line 753 of file HTMLExport.py.

HTMLExport.HTMLExportStatic.plugin_name
static

Definition at line 754 of file HTMLExport.py.