CMS 3D CMS Logo

Classes | Functions | Variables
python.rootplot.root2matplotlib Namespace Reference

Classes

class  Hist
 
class  Hist2D
 Define classes. More...
 
class  HistStack
 
class  RootFile
 

Functions

def replace (string, replacements)
 

Variables

 __license__
 
 _all_whitespace_string
 Define constants. More...
 

Detailed Description

Utilities for plotting ROOT histograms in matplotlib.

Function Documentation

def python.rootplot.root2matplotlib.replace (   string,
  replacements 
)
Modify a string based on a list of patterns and substitutions.

replacements should be a list of two-entry tuples, the first entry giving
a string to search for and the second entry giving the string with which
to replace it.  If replacements includes a pattern entry containing
'use_regexp', then all patterns will be treated as regular expressions
using re.sub.

Definition at line 444 of file root2matplotlib.py.

Referenced by dataset.Dataset.__getDataType(), dataset.Dataset.__getMagneticField(), dataset.Dataset.__getMagneticFieldForRun(), dataset.Dataset.__lumiSelectionSnippet(), psClasses.BuildTreeNodeList.__str__(), psClasses.BuildTreeNode.__str__(), betterConfigParser.BetterConfigParser.__updateDict(), trackingPlots.TimePerEventPlot._create(), python.iterators._findIterators(), trackingPlots.TrackingIterationOrder._findOrder(), trackingPlots._mapCollectionToAlgoQuality(), html._ptCut(), FrontierCondition_GT_autoExpress_cfi.Tier0Handler._queryTier0DataSvc(), tier0.Tier0Handler._queryTier0DataSvc(), iterativeTkConfig._seedOrTrackProducers(), trackingNtuple_cff._seedProdToTrackCands(), Muon.Muon.absIsoWithFSR(), Electron.Electron.absIsoWithFSR(), shallowTree_test_template.add_rawRelVals(), hltMuonPostProcessors_cff.add_reco_strings(), ConfigBuilder.ConfigBuilder.addCustomise(), ConfigBuilder.ConfigBuilder.addOutput(), L1CondDBIOVWriterExt.analyze(), L1O2OTestAnalyzerExt.analyze(), L1CondDBIOVWriter.analyze(), L1O2OTestAnalyzer.analyze(), data_sources.json_list.as_table(), python.rootplot.root2matplotlib.Hist.bar(), python.rootplot.root2matplotlib.Hist.barh(), heppy_batch.batchScriptCERN(), L1TEMTFEventInfoClient.book(), BTagDifferentialPlot.bookHisto(), L1TObjectsTiming.bookHistograms(), MultiTrackValidator.bookHistograms(), MuonTrackResidualAnalyzer.bookHistograms(), MuonTrackAnalyzer.bookHistograms(), MuonTrackValidator.bookHistograms(), TreeBranch.branchName(), EtaPtBin.buildDescriptionString(), MaterialBudgetCategorizer.buildHGCalCategoryMap(), dirstructure.Directory.calcStats(), MatrixUtil.changeRefRelease(), visDQMUtils.classifyDQMFile(), ctfseeding::HitExtractorSTRP.cleanedOfClusters(), recoTauConfTools.cmssw_version(), core.ProvenanceAnalyzer.ProvenanceAnalyzer.cmsswVNums(), electronDataDiscovery.common_search(), cmsHarvester.create_castor_path_name_common(), Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive(), customiseMTVForBPix123Holes.customiseMTVForBPix123Holes(), customsPostLS1.customiseSimL1EmulatorForStage1(), cmsIgProf_Analysis.diff_igprof_analysis(), getPayloadData.discover_plugins(), dataset.Dataset.dump_cff(), enablePileUpCorrection.enablePileUpCorrectionInPF2PAT(), eostools.eosToLFN(), python.rootplot.root2matplotlib.Hist.errorbar(), python.rootplot.root2matplotlib.Hist.errorbarh(), confdb.HLTProcess.expandWildcards(), cmsPerfSuiteHarvest.exportIgProfReport(), cmsPerfSuiteHarvest.exportMemcheckReport(), cmsPerfSuiteHarvest.exportTimeSizeJob(), VariableNTupler.fill(), commentSkipper.cppCommentSkipper.filterFile(), commentSkipper.buildFileCommentSkipper.filterMultilineComment(), commentSkipper.buildFileCommentSkipper.filterOneLineComment(), harvestRelVal.find_dqmref(), MultipleCompare.FindParents(), hltTrgSeedMapper.findUniqueSeed(), relval_machine.fix_run(), edm::DaqProvenanceHelper.fixMetaData(), submitDQMOfflineCAF.Func_MagConfig(), getRunInfo.Func_MakeShellWord(), pkg.AbstractPkg.generate(), compareDQMOutput.generate_summary_html(), generate2023Geometry.generateGeom(), MatrixUtil.genvalid(), harvestRelVal.get_cond_from_dsetpath(), tools.get_iovs(), harvestRelVal.get_name_from_dsetpath(), compareHistograms.get_output_filename(), FileNamesHelper.getJobID_fromFileName(), betterConfigParser.BetterConfigParser.getResultingSection(), confdb.HLTProcess.getSetupConfigurationFromDB(), alcaDQMUpload.getURL(), heppy_hadd.hadd(), TreeCrawler.mymf.import_module(), compareHistograms.is_blacklisted(), L1TriggerKeyDummyProd.L1TriggerKeyDummyProd(), L1TriggerKeyDummyProdExt.L1TriggerKeyDummyProdExt(), cmsIgProf_Analysis.library_igprof_analysis(), DBSApi_cff.loadXML(), uploader.main(), produceOfflineValidationTex.main(), cfg-viewer.main(), hltExoticaPostProcessors_cff.make_exo_postprocessor(), hltHiggsPostProcessors_cff.make_higgs_postprocessor(), cmsRelvalreport.Profile.make_report(), hltSMPPostProcessors_cff.make_smp_postprocessor(), SelectRuns.SelectRuns.makeList(), relval_upgrade.makeStepName(), FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(), APVGain.monHnames(), DOTExport.DotProducer.nodeURL(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.open(), cmsHarvester.CMSHarvester.option_handler_input_spec(), cmsDriverOptions.OptionsFromItems(), TreeCrawler.packageNameFromFilename(), presentation.SummarySection.pages(), Page1Parser.Page1Parser.ParseRunSummaryPage(), PdgEntryReplacer.PdgEntryReplacer(), cmsswPreprocessor.CmsswPreprocessor.prefetchOneXrootdFile(), MatrixInjector.MatrixInjector.prepare(), ConfigBuilder.ConfigBuilder.prepare_GEN(), L1GtTriggerMenuTester.printWiki(), core.ProvenanceAnalyzer.ProvenanceAnalyzer.process(), cmsPerfSuiteHarvest.process_igprof_dir(), VIDSelectorBase.process_pset(), L1RCTOmdsFedVectorProducer.produce(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.pypackage(), dqm-mbProfile.read_procfs(), RunInfoRead.readData(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.recursePSetProperties(), alcaDQMUpload.registerFileAtLogServer(), VariableNTupler.registerleaves(), KinematicTree.replaceCurrentParticle(), KinematicTree.replaceCurrentVertex(), addOnTests.testit.run(), cond2xml.sanitize(), compare.save(), DQMStore.save(), Vispa.Gui.BoxContentDialog.BoxContentDialog.script(), BeamSpotWorkflow.selectFilesToProcess(), query.sendMessage(), cmsswConfigtrace.serve_main(), python.rootplot.root2matplotlib.Hist.show_titles(), cmsIgProf_Analysis.simple_igprof_analysis(), confdb.HLTProcess.specificCustomize(), pfTools.switchToPFJets(), pfTools.switchToPFMET(), tauTools.switchToPFTauHPS(), Config.TestModuleCommand.testSecSource(), coreTools.RunOnData.toolCode(), coreTools.RemoveMCMatching.toolCode(), tauTools.AddTauCollection.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), HiCoreTools.AddCleaning.toolCode(), lumiReport.toScreenConfHlt(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.updateViewMenu(), plottingOptions.PlottingOptionsTrackSplitting.validsubdets(), betterConfigParser.BetterConfigParser.write(), FWPartialConfigSaveGUI.WriteConfig(), and presentation.writePage().

444 def replace(string, replacements):
445  """
446  Modify a string based on a list of patterns and substitutions.
447 
448  replacements should be a list of two-entry tuples, the first entry giving
449  a string to search for and the second entry giving the string with which
450  to replace it. If replacements includes a pattern entry containing
451  'use_regexp', then all patterns will be treated as regular expressions
452  using re.sub.
453  """
454  if not replacements:
455  return string
456  if 'use_regexp' in [x for x,y in replacements]:
457  for pattern, repl in [x for x in replacements
458  if x[0] != 'use_regexp']:
459  string = re.sub(pattern, repl, string)
460  else:
461  for pattern, repl in replacements:
462  string = string.replace(pattern, repl)
463  if re.match(_all_whitespace_string, string):
464  return ""
465  return string
466 
467 
def replace(string, replacements)

Variable Documentation

python.rootplot.root2matplotlib.__license__
private

Definition at line 6 of file root2matplotlib.py.

python.rootplot.root2matplotlib._all_whitespace_string
private

Define constants.

Definition at line 43 of file root2matplotlib.py.