Functions | |
def | _test () |
def | check_proxy () |
def | compute_product_string (product_string) |
def | create_single_iov_db (inputs, run_number, output_db) |
def | get_iovs (db, tag) |
def | get_process_object (cfg) |
def | get_tags (global_tag, records) |
def | getDatasetStr (datasetpath) |
def | getTerminalSize () |
def | haddLocal (localdir, result_file, extension='root') |
def | interrupt (signum, frame) |
def | listFilesLocal (paths, extension='.root') |
def | loadCmsProcess (psetPath) |
def | loadCmsProcessFile (psetName) |
def | make_unique_runranges (ali_producer) |
def | prependPaths (process, seqname) |
def | read_constant_graph (graph_path, create_session=None, as_text=None) |
def | remove_existing_object (path) |
def | replace_factors (product_string, name, value) |
def | replaceTemplate (template, **opts) |
def | run_checked (cmd, suppress_stderr=False) |
def | stdinWait (text, default, time, timeoutDisplay=None, **kwargs) |
def | visualize_graph (graph, log_dir=None, start_tensorboard=False, tensorboard_args="", **kwargs) |
def | write_constant_graph (session, output_names, graph_path, **kwargs) |
Variables | |
__all__ | |
TF1 | |
tf1 | |
TF2 | |
|
private |
Internal test of the above functions based on the deepjet model.
Definition at line 193 of file tools.py.
References print(), read_constant_graph(), visualize_graph(), and write_constant_graph().
def tools.check_proxy | ( | ) |
def tools.compute_product_string | ( | product_string | ) |
Takes `product_string` and returns the product of the factors as string. Arguments: - `product_string`: string containing product ('<factor>*<factor>*...')
Definition at line 210 of file tools.py.
References dqmMemoryStats.float, and str.
def tools.create_single_iov_db | ( | inputs, | |
run_number, | |||
output_db | |||
) |
Create an sqlite file with single-IOV tags for alignment payloads. Arguments: - `inputs`: dictionary with input needed for payload extraction - `run_number`: run for which the IOVs are selected - `output_db`: name of the output sqlite file
Definition at line 15 of file tools.py.
References join(), print(), remove_existing_object(), run_checked(), and str.
def tools.get_iovs | ( | db, | |
tag | |||
) |
Retrieve the list of IOVs from `db` for `tag`. Arguments: - `db`: database connection string - `tag`: tag of database record
Definition at line 168 of file tools.py.
References python.cmstools.all(), ALCARECOTkAlBeamHalo_cff.filter, createfilelist.int, print(), and python.rootplot.root2matplotlib.replace().
def tools.get_process_object | ( | cfg | ) |
def tools.get_tags | ( | global_tag, | |
records | |||
) |
Get tags for `records` contained in `global_tag`. Arguments: - `global_tag`: global tag of interest - `records`: database records of interest
Definition at line 133 of file tools.py.
References python.cmstools.all(), ALCARECOTkAlBeamHalo_cff.filter, and print().
def tools.getTerminalSize | ( | ) |
Definition at line 96 of file tools.py.
References createfilelist.int.
Referenced by CrabHelper.CrabHelper.check_crabtask().
def tools.haddLocal | ( | localdir, | |
result_file, | |||
extension = 'root' |
|||
) |
Definition at line 41 of file tools.py.
References listFilesLocal().
Referenced by DTWorkflow.DTWorkflow.prepare_common_write().
def tools.interrupt | ( | signum, | |
frame | |||
) |
def tools.listFilesLocal | ( | paths, | |
extension = '.root' |
|||
) |
def tools.loadCmsProcess | ( | psetPath | ) |
Definition at line 56 of file tools.py.
Referenced by DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_write(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_write(), DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_submit(), and DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_write().
def tools.make_unique_runranges | ( | ali_producer | ) |
Derive unique run ranges from AlignmentProducer PSet. Arguments: - `ali_producer`: cms.PSet containing AlignmentProducer configuration
Definition at line 115 of file tools.py.
References createfilelist.int.
def tools.prependPaths | ( | process, | |
seqname | |||
) |
Definition at line 66 of file tools.py.
Referenced by DTWorkflow.DTWorkflow.add_preselection(), and DTWorkflow.DTWorkflow.add_raw_option().
Reads a saved TensorFlow graph from *graph_path* and returns it. When *create_session* is *True*, a session object (compatible with the v1 API) is created and returned as well as the second value of a 2-tuple. The default value of *create_session* is *True* when TensorFlow v1 is detected, and *False* otherwise. When *as_text* is *True*, or *None* and the file extension is ``".pbtxt"`` or ``".pb.txt"``, the content of the file at *graph_path* is expected to be a human-readable text file. Otherwise, it is expected to be a binary protobuf file. Example: .. code-block:: python graph = read_constant_graph("path/to/model.pb", create_session=False) graph, session = read_constant_graph("path/to/model.pb", create_session=True)
Definition at line 38 of file tools.py.
Referenced by _test(), and visualize_graph().
def tools.remove_existing_object | ( | path | ) |
Tries to remove file or directory located at `path`. If the user has no delete permissions, the object is moved to a backup file. If this fails it tries 5 times in total and then asks to perform a cleanup by a user with delete permissions. Arguments: - `name`: name of the object to be (re)moved
Definition at line 233 of file tools.py.
References print(), and FastTimerService_cff.range.
Referenced by create_single_iov_db().
def tools.replace_factors | ( | product_string, | |
name, | |||
value | |||
) |
def tools.replaceTemplate | ( | template, | |
** | opts | ||
) |
def tools.run_checked | ( | cmd, | |
suppress_stderr = False |
|||
) |
Run `cmd` and exit in case of failures. Arguments: - `cmd`: list containing the strings of the command - `suppress_stderr`: suppress output from stderr
Definition at line 68 of file tools.py.
References join(), and print().
Referenced by create_single_iov_db().
def tools.stdinWait | ( | text, | |
default, | |||
time, | |||
timeoutDisplay = None , |
|||
** | kwargs | ||
) |
Definition at line 70 of file tools.py.
References print().
Referenced by CrabHelper.CrabHelper.check_crabtask().
def tools.visualize_graph | ( | graph, | |
log_dir = None , |
|||
start_tensorboard = False , |
|||
tensorboard_args = "" , |
|||
** | kwargs | ||
) |
Visualizes a TensorFlow *graph* by adding it to a ``tf.summary.FileWriter``. *graph* can be either a graph object or a path to a pb file. In the latter case, :py:func:`read_constant_graph` is used and all *kwargs* are forwarded. The file writer object is instantiated with a *log_dir* which, when empty, defaults to a temporary directory. This is especially usefull when *start_tensorboard* is *True*, in which case a subprocesses is started to run a *tensorboard* instance with additional arguments given as a string *tensorboard_args*. The subprocess is terminated on keyboard interrupt. .. note:: When used with TensorFlow v2, this function requires the v1 API compatibility layer. When :py:attr:`tf.compat.v1` is not available, a *NotImplementedError* is raised.
Definition at line 132 of file tools.py.
References print(), and read_constant_graph().
Referenced by _test().
def tools.write_constant_graph | ( | session, | |
output_names, | |||
graph_path, | |||
** | kwargs | ||
) |
Takes a TensorFlow *session* object (compatible with the v1 API), converts its contained graph into a simpler version with variables translated into constant tensors, and saves it to a pb file defined by *graph_path*. *output_numes* must be a list of names of output tensors to save. In turn, TensorFlow internally determines which subgraph(s) to convert and save. All *kwargs* are forwarded to :py:func:`tf.compat.v1.train.write_graph`. Intermediate output directories are created, the output file is removed when already existing, and the absolute and normalized output path is returned. .. note:: When used with TensorFlow v2, this function requires the v1 API compatibility layer. When :py:attr:`tf.compat.v1` is not available, a *NotImplementedError* is raised.
Definition at line 93 of file tools.py.
Referenced by _test().
tools.TF1 |
Definition at line 23 of file tools.py.
Referenced by CalibrationAlgorithm.analyse(), PedsFullNoiseAlgorithm.analyse(), CalibrationScanAlgorithm.analyse(), EcalLaserAnalyzerYousi.analyze(), ResolutionCreator.beginJob(), HiCentralityBiasFilter.beginJob(), L1TRate_Offline.bookHistograms(), L1TRate.bookHistograms(), BSvsPVPlots(), BTagEntry.BTagEntry(), PPSAlignmentHarvester.buildModeGraph(), ApeEstimatorSummary.calculateApe(), PixelLumiDQM.calculateBunchMask(), SiPixelSCurveCalibrationAnalysis.calibrationSetup(), chi2toMinimize(), L1TOccupancyClient.compareWithStrip(), MuonBremsstrahlungSimulator.compute(), EcalTPGParamBuilder.computeLUT(), MuonTestSummary.doEnergyTests(), SideBandSubtract.doFastSubtraction(), PPSAlignmentHarvester.doMatch(), OuterTrackerMCHarvester.dqmEndJob(), SusyPostProcessor.dqmEndJob(), DTLocalTriggerSynchTest.dqmEndJob(), EcalZmassClient.dqmEndJob(), DTResolutionAnalysisTest.dqmEndJob(), Vx3DHLTAnalyzer.dqmEndLuminosityBlock(), DTResolutionTest.dqmEndLuminosityBlock(), Comparator.DrawGaussSigmaOverMeanXSlice(), Comparator.DrawGaussSigmaSlice(), Tutils.drawGFit(), DTNoiseComputation.endJob(), EcalLaserAnalyzerYousi.endJob(), analyzer::SiPixelLorentzAngle.endJob(), HOCalibAnalyzer.endJob(), L1TRate_Offline.endLuminosityBlock(), L1TRate.endLuminosityBlock(), ESRecHitFitAlgo.ESRecHitFitAlgo(), ESTimingTask.ESTimingTask(), DTMeanTimerFitter.evaluateVDriftAndReso(), LASPeakFinder.FindPeakIn(), BSFitter.Fit_d0phi(), Fit_MaximumPoint(), LA_Filler_Fitter.fit_width_profile(), BSFitter.Fit_z_chi2(), BeamMonitor.FitAndFill(), FakeBeamMonitor.FitAndFill(), SymmetryFit.fitfunction(), EgammaObjects.fitHistos(), CSCSimHitMatcher.fitHitsInChamber(), MuScleFitUtils.fitMass(), PPSAlignmentConfigESSource.fitProfile(), DTResidualFitter.fitResiduals(), SplitVertexResolution.fitResiduals(), TrackerOfflineValidationSummary.fitResiduals(), PVValHelper.fitResiduals(), TrackerOfflineValidation.fitResiduals(), SplitVertexResolution.fitResiduals_v0(), MuScleFitUtils.fitReso(), PFJetDQMPostProcessor.fitResponse(), TkLasBeamFitter.fitter(), DTTimeBoxFitter.fitTimeBox(), DTMeanTimerFitter.fitTMax(), fpeak_convoluted(), backgroundFunctionBase.functionForIntegral(), MuonTestSummary.GaussFit(), PFClient_JetRes.getHistogramParameters(), PFClient.getHistogramParameters(), PhiSymmetryCalibration.getKfactors(), CastorLedAnalysis.GetLedConst(), HcalLedAnalysis.GetLedConst(), BTagDifferentialPlot.getMistag(), GetMPV(), SiStripGainCosmicCalculator.getPeakOfLandau(), SiStripGainsPCLHarvester.getPeakOfLandau(), SiStripGainFromData.getPeakOfLandau(), SiStripGainFromCalibTree.getPeakOfLandau(), CastorPedestalAnalysis.GetPedConst(), HcalPedestalAnalysis.GetPedConst(), L1TRate.getXSexFitsOMDS(), L1TRate_Offline.getXSexFitsPython(), L1TRate.getXSexFitsPython(), reco::modules::HICaloCompatibleTrackSelector.HICaloCompatibleTrackSelector(), HiFJRhoFlowModulationProducer.HiFJRhoFlowModulationProducer(), MuonResidualsFitter.histogramChi2GaussianFit(), EvolutionECAL.InducedAbsorptionEM(), JetResolution.initialize(), LRHelpFunctions.initLRHistsAndFits(), fastsim::MuonBremsstrahlung.interact(), JetResolution.JetResolution(), L1TkMuCorrDynamicWindows.L1TkMuCorrDynamicWindows(), L1TkMuMantra.L1TkMuMantra(), CastorLedAnalysis.LedCastorHists(), HcalLedAnalysis.LedHBHEHists(), HcalLedAnalysis.LedHFHists(), HcalLedAnalysis.LedHOHists(), DQMGenericClient.limitedFit(), BTagCalibrationReader::BTagCalibrationReaderImpl.load(), LRHelpFunctions.LRHelpFunctions(), main(), TPedValues.makePlots(), EcalUncalibRecHitRecAnalFitAlgo< EBDataFrame >.makeRecHit(), GeometryComparisonPlotter.MakeTables(), multibsvspvplots(), MuScleFit.MuScleFit(), pat::ObjectResolutionCalc.ObjectResolutionCalc(), LA_Filler_Fitter.offset_slope(), JetResolution.parameter(), JetResolution.parameterEtaEval(), ParametrizedSubtractor.ParametrizedSubtractor(), MuonResidualsAngleFitter.plot(), MuonResidualsBfieldAngleFitter.plot(), MuonResiduals1DOFFitter.plot(), MuonResidualsPositionFitter.plot(), MuonResiduals6DOFrphiFitter.plot(), MuonResiduals5DOFFitter.plot(), MuonResiduals6DOFFitter.plot(), root.plot(), SymmetryFit.pol2_from_pol2(), TH2Analyzer.ProcessSlice(), PixelVertexProducerMedian.produce(), HIPixelMedianVtxProducer.produce(), CastorFastTowerProducer.produce(), PtHatRapReweightUserHook.PtHatRapReweightUserHook(), RapReweightUserHook.RapReweightUserHook(), LRHelpFunctions.readObsHistsAndFits(), LRHelpFunctions.recreateFitFct(), BackgroundHandler.rescale(), MuonTestSummary.ResidualCheck(), LA_Filler_Fitter.result(), DTLocalTriggerLutTest.runClientDiagnostic(), DTLocalTriggerSynchTest.runClientDiagnostic(), PVFitter.runFitter(), SamplingAlgorithm.SamplingAlgorithm(), MuMatchWindow.SetCentral(), MuMatchWindow.SetLower(), MuMatchWindow.SetUpper(), SiPixelGainCalibrationAnalysis.SiPixelGainCalibrationAnalysis(), smartGausProfile(), smearFunctionType7.smear(), LA_Filler_Fitter.summarize_ensembles(), root.tf1_t(), tmtt::Histos.trackerGeometryAnalysis(), CastorPedestalAnalysis.Trendings(), HcalPedestalAnalysis.Trendings(), UnbinnedFitDeDxEstimator.UnbinnedFitDeDxEstimator(), TEcnaHistos.ViewEBGrid(), TEcnaHistos.ViewSCGrid(), TEcnaHistos.ViewSMGrid(), TEcnaHistos.ViewTowerGrid(), sistrip::MeasureLA.write_report_text_ms(), PPSAlignmentHarvester.xAlignmentRelative(), L1TOccupancyClient.xySymmetry(), and PPSAlignmentHarvester.yAlignment().
tools.TF2 |
Definition at line 24 of file tools.py.
Referenced by TtFullLepKinSolver.TtFullLepKinSolver().