dear Root gurus,
I have 2 ascii datasets presented in matrix format (originally 123 rows x 166 cols) but in this example presented as 8x6 matrix
dataset_1:
10.1190 10.0400 9.9540 9.8370 9.9470 10.3450
10.1050 10.0790 10.1180 9.9790 10.1080 10.5790
10.2910 10.2780 10.3500 10.3090 10.4560 10.8390
10.1850 10.2240 10.4300 10.6320 10.8470 11.0820
9.8930 10.0090 10.4130 10.9460 11.2660 11.3160
10.2140 10.2570 10.5180 11.1290 11.5250 11.6490
10.7170 10.7210 10.8510 11.4280 11.8120 11.9510
11.4870 11.5000 11.5190 11.8980 12.1400 12.2090
dataset_2:
10.1490 10.2010 10.2130 10.0590 10.0650 10.2720
10.3260 10.3360 10.2980 10.1630 10.2020 10.4620
10.5560 10.4640 10.2770 10.3860 10.5240 10.7000
10.3220 10.3600 10.4780 10.6570 10.8150 10.9480
9.7900 10.1120 10.8240 10.9600 11.0870 11.2040
10.1220 10.2910 10.7340 11.3290 11.6890 11.7490
10.6810 10.7520 10.9790 11.7260 12.1560 12.1850
11.5740 11.6290 11.7200 12.1650 12.4260 12.4550
I want to read them imultaneosly into either an Ntuple or TTree so that I can carry out aritmetic operations on both to generate some plots,
There are no explicit examples in the tutorials. To define the matrix and fill I’ve used
TMatrixF var(n,m);
TNtutple *ntuple = new TNtuple("id","title","var");
ntuple->ReadFile(dataset)
It seems to work fine, but when I try to plot I get the error message:
Error: Can't call TNtuple::Plot("var") in current scope (tmpfile)(1)
possible candidates are...
(in TNtuple)
(in TTree)
*** Interpreter error recorvered ****
How can I solve this?
Secondly, the datasets come with an identical predefined grid to define the axis, i.e.
col- m -1.84 -1.59 -1.34 -1.09 -0.84 -0.59
row-n 7.9
7.65
7.4
7.15
6.9
6.65
6.4
6.15
what I’m doing wrong? Could someone please point me in the right direction?
Thanks!