Suppress terminal/screen output

Hi,

I’m running ROOT via a makefile because I have a lot of data to read in and about 100 lines represent one certain component. And these ~100 lines I’ve to fit for every component when reading them in. Therefore I would like to suppress somehow the output of the fitting, meaning to get rid of the following:

FCN=49.381 FROM MIGRAD    STATUS=CONVERGED     267 CALLS         268 TOTAL
                     EDM=1.54893e-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  p0           3.74575e+02   1.83955e-01   2.91541e-04  -2.38085e-03
   2  p1           5.34323e+00   3.34503e-02   3.52327e-05  -5.10613e-02
   3  p2           4.50263e+01   6.77965e-01   5.26821e-04   2.78982e-03
 FCN=0.138888 FROM MIGRAD    STATUS=CONVERGED     216 CALLS         217 TOTAL
                     EDM=1.19643e-08    STRATEGY= 1  ERROR MATRIX UNCERTAINTY   2.3 per cent

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  p0           3.74244e+02   1.14318e-01   3.41580e-04  -1.21274e-03
   2  p1           1.21481e-01   1.55079e-03  -7.42116e-06   1.73120e-01
   3  p2          -1.77781e+01   7.28645e-01  -3.37169e-03  -6.25813e-04

How do I do that ? I tried SetBatch and SetPrintLevel but none of them work (maybe I applied them wrong, don’t know).
Can anybody help me, please ? Thank you in advance!

Kind regards, Ben

If you fit histograms or graphs, use the “Q” fitting option.

2 Likes

yeah, thank you very much!!!

For anyone facing this in pyROOT, the ‘Q’ should be second argument to the fit method (of TH1 class).