Skip to content

Commit

Permalink
also suppress all module warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kpedro88 committed Jun 6, 2024
1 parent 70e0c15 commit 591ff9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions test/runSVJ.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 591ff9a

Please sign in to comment.