Re: reducing TMinuit printout

From: Lorenzo Moneta <Lorenzo.Moneta_at_cern.ch>
Date: Fri, 1 May 2009 22:38:23 +0200


Hi,
On May 1, 2009, at 9:22 PM, Tom Roberts wrote:

> I am using TMinuit for a special fitting task, and am creating a
> TMinuit object and calling Migrad() thousands of times. This
> completely overwhelms the output, because it prints a page per call.
> This is a large C++ simulation program linked with the Root libraries.
>
> How can I avoid ALL printout from TMinuit() and Migrad() ?

you must call

  tm->SetPrintLevel(-1);

Best Regars

Lorenzo
>
>
> I'm now doing this:
> TMinuit *tm = new Tminuit();
> tm->SetPrintLevel(0);
> tm->Command("SET PRINTOUT -1");
> ... use tm
>
> But I still get 3 lines per instance:
> **********
> ** 1 **SET PRINT 0
> **********
>
> How can I avoid that? It seems to be using the global function
> Printf(), which I could not find in the reference manual and there's
> no source file Printf.cxx. I am willing to omit even warnings and
> error messages, so how can I turn Printf() off?
>
> I tried:
> stderr = stdout = fopen("/dev/null","w");
> but that did not stop the output (!).
>
>
> Perhaps I could just create a single TMinuit object and re-use it,
> thus reducing this to 3 rather strange lines of output. But that
> requires changing a lot of code, and I'd rather not do it (how much
> state from the previous fit does TMinuit keep? -- I don't know, and
> would rather not make my program depend on the answer).
>
>
> Tom Roberts
>
Received on Fri May 01 2009 - 22:39:00 CEST

This archive was generated by hypermail 2.2.0 : Sun May 03 2009 - 23:50:01 CEST