From 591ff9ae51a85563c71ee17d3d05626fb94ee511 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Thu, 6 Jun 2024 10:05:07 -0500 Subject: [PATCH] also suppress all module warnings --- README.md | 2 +- test/runSVJ.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6710c73..b228839 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ The [runSVJ](./test/runSVJ.py) script is a wrapper that can customize and run an * `config=[str]`: config file to customize and run (default = step_GEN) * `useFolders=[bool]`: read input files written with `--use-folders` option (see [Condor submission](#condor-submission)) * `printEvents=[num]`: number of Pythia events to print (default = 1) -* `quiet=[bool]`: suppress all Pythia printouts (default = False) +* `quiet=[bool]`: suppress all Pythia printouts and module warnings (default = False) * `threads=[num]`: number of threads to run (default = 1) * `streams=[num]`: number of streams to run (default = 0 -> streams = threads) * `redir=[dir]`: xrootd redirector for input file diff --git a/test/runSVJ.py b/test/runSVJ.py index 8fbc120..e29c130 100644 --- a/test/runSVJ.py +++ b/test/runSVJ.py @@ -164,6 +164,10 @@ def set_if_has(obj,attr,val): elif hasattr(process.generator,'maxEventsToPrint'): process.generator.maxEventsToPrint = options.printEvents +if options.quiet and hasattr(process,'MessageLogger'): + for dest in process.MessageLogger.destinations: + setattr(getattr(process.MessageLogger,dest),'threshold',cms.untracked.string('ERROR')) + # genjet/met settings - treat DM stand-ins as invisible _particles = ["genParticlesForJetsNoMuNoNu","genParticlesForJetsNoNu","genCandidatesForMET","genParticlesForMETAllVisible"] for _prod in _particles: