CMS 3D CMS Logo

List of all members | Public Member Functions
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)
 

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