Get all floting number v2

Dear experts,

I set () in my rootrc file, I also tried () directly from the prompt as advice here () but I still have
2.03997e+07 instead of 20399700. Do you know what is missing? I have root 6.8.

(*) Canvas.SavePrecision 16

(**)
gEnv->GetValue(“Canvas.SavePrecision”, -1)
gEnv->SetValue(“Canvas.SavePrecision”, 16)

(***)

Can you provide a small script showing the problem ?

Dear Couet,

you can see the root file here (*):

If you do (**), you’ll see that you do not have all the floating.

Regards

(*) http://calpas.web.cern.ch/calpas/run_00311071.root
http://calpas.web.cern.ch/calpas/run_00311071.root

(**)
root [1] _file0->cd(“mm”)

root [1] cutflow->GetBinContent(1)

(Double_t) 3.32235e+06


Dear Coyote,

sorry but this does not work on my root file

http://calpas.web.cern.ch/calpas/ run_00311071.root
http://calpas.web.cern.ch/calpas/run_00311071.root

I have root 6.8.

Regards

root […] cutflow->GetBinContent(1) - 3.32235e+06

$ root run_00311071.root
   -----------------------------------------------------------------
  | Welcome to ROOT 6.11/01                     http://root.cern.ch |
  |                                    (c) 1995-2017, The ROOT Team |
  | Built for macosx64                                              |
  | From heads/master@v6-09-02-1630-gc4978f1, Jul 11 2017, 09:00:23 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'      |
   -----------------------------------------------------------------

root [1] _file0->cd("mm")
root [2] cutflow->GetBinContent(1)
(double) 3322350.000000
root [3] cout << cutflow->GetBinContent(1) << endl;
3.32235e+06
root [4] printf("%g\n",cutflow->GetBinContent(1))
3.32235e+06
root [5] printf("%f\n",cutflow->GetBinContent(1))
3322350.000000

Dear Coyote,

sorry, what do you mean? Do know how I can do what I want?

Regards

Dear Couet,

thank you.

|printf("%f\n",cutflow->GetBinContent(1))|

works for me.

Regards

note that with 6.11 you get what you want doing:

root [2] cutflow->GetBinContent(1)
(double) 3322350.000000

Dear Couet,

Ok. Thank you.

Regards

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.