Skip to content

Instantly share code, notes, and snippets.

@wiso
Last active September 5, 2019 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wiso/e263b8663432871a0b62137587475663 to your computer and use it in GitHub Desktop.
Save wiso/e263b8663432871a0b62137587475663 to your computer and use it in GitHub Desktop.
Silence RooFit
import ROOT
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.NumIntegration)
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.Fitting)
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.Minimization)
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.InputArguments)
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.Eval)
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.DataHandling)
ROOT.RooMsgService.instance().setGlobalKillBelow(ROOT.RooFit.ERROR)
ROOT.RooMsgService.instance().setSilentMode(True)
@dpmungo
Copy link

dpmungo commented Sep 5, 2019

You can add

ROOT.RooMsgService.instance().setSilentMode(True)

to completely suppress all the outputs

@wiso
Copy link
Author

wiso commented Sep 5, 2019

You can add

ROOT.RooMsgService.instance().setSilentMode(True)

to completely suppress all the outputs

thanks, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment