Eyvaz
June 18, 2024, 12:27pm
1
Hi experts,
How can I extract data from a .root file to a .dat file in terminal Ubuntu?
Thanks!
Please read tips for efficient and successful posting and posting code
Please fill also the fields below. Note that root -b -q
will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug
from the ROOT prompt to pre-populate a topic.
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided
Danilo
June 18, 2024, 1:13pm
2
Hi,
For sure!
ROOT::RDataFrame d("ntuple_A", "_BGO_foo_bar_.root");
d.Foreach([](double col_0, double col_1){ std::cout << col_0 << " " << col_1 << std::endl;}, {"col0", "col_1"});
Then it’s just a matter of adapting to your column names and types. here I assume you have two columns of type double.
Cheers,
D
ferhue
June 18, 2024, 7:14pm
4
You can also right-click on the histogram, SaveAs, file.csv
yus
June 19, 2024, 8:03am
5
Hi Eyvaz,
Eyvaz:
Did you do what Danilo suggested?
system
Closed
July 3, 2024, 8:03am
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.