calbet
July 12, 2017, 4:15pm
1
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)
(***)
Dear ROOT-forumers
I have a problem trying to use the TTimeStamp for the x-axis of my histogram. It seems to me that the problem is that the precision is lost. I typically make the x-axis from a 9-digit number that I get from the GetSec() method of TTimeStamp, making this into a float, and defining a histogram using these floats as the x-axis bin-values (I need to use floats, so that the values of the histogram and the values on the x-axis both are floats, I have understood must be required). A…
couet
July 13, 2017, 8:26am
2
Can you provide a small script showing the problem ?
calbet
July 13, 2017, 9:36am
3
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
calbet
July 13, 2017, 11:19am
5
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
couet
July 13, 2017, 11:48am
7
$ 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
calbet
July 13, 2017, 11:59am
8
Dear Coyote,
sorry, what do you mean? Do know how I can do what I want?
Regards
calbet
July 13, 2017, 12:02pm
9
Dear Couet,
thank you.
|printf("%f\n",cutflow->GetBinContent(1))|
works for me.
Regards
couet
July 13, 2017, 12:14pm
10
note that with 6.11 you get what you want doing:
root [2] cutflow->GetBinContent(1)
(double) 3322350.000000
system
Closed
July 27, 2017, 1:54pm
12
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.