How to covert .dat file into root

I am working with a group all are studying with fortran . We got a kumac file and a data file for the next project I want to make it executable with root. So I want to convert the .dat file to root. which way have I to follow I am attaching the files I want to convert. any solution needed. The extension kumac is not allowed. my dat file looks like…
Run number is 110
Found DRS4 evaluation board, serial 2059 firmware revision 15147
Temperature on DRS4 = 30.937500
Sampling frequency set to 2 GHz
Trigger source set to 0 1 (analog is ON)
Trigger source channel set to 0
Trigger volt set to -0.040000 Volts
Trigger delay set to 10 (ns)
The zero-suppression trigger treshold set is -5.000000 (mV)
Loop event number for this run = 1000
DAQ start time Wed Sep 29 08:34:06 2010
0
2010
09
29
08
34
09
124
323.93 -6.26 2.34 3.62 4.45
324.43 -16.04 1.44 2.01 2.07
324.93 -29.12 3.17 2.39 3.93
325.44 -37.13 -0.05 0.82 0.69
325.94 -44.46 2.13 2.86 2.51


514.14 -21.60 -1.08 0.10 -0.27
514.65 -20.81 0.25 1.93 2.85
515.15 -19.14 0.91 0.07 1.72
515.66 -19.31 0.56 2.78 3.18
516.16 -18.41 0.18 0.68 2.05
DAQ stop time Wed Sep 29 09:04:19 2010

Hi,

I assume your data is event-based? If so you could read it in (e.g. though std::ifstream) into a few per-run objects that you define (C++ classes with dictionaries) and a TTree for the event-based data.

Cheers, Axel.

Hi,

I have dat.pth file which have 13 column:
[# histogram: 1, bins: 100

column 1: kinematical quantity on x-axis

column 2: Monte Carlo average for the Born cross-section


0.00000000E+00 0.107923E+01 0.730858E-01 0.101234E+01 0.141459E+00 -.718438E-01 0.223774E-01 0.244689E-01 0.115689E+00 0.955986E-02 0.329659E-02 -.290698E-01 0.278075E-01
0.50000000E+01 0.321369E+01 0.130363E+00 0.332303E+01 0.250461E+00 -.111389E+00 0.327753E-01 0.368427E+00 0.190715E+00 0.284762E-01 0.106542E-01 -.176173E+00 0.904250E-01
…][/code]

I have tried to plot using gnuplot and its work. But I want to convert it into root file. I have tried it but its doesn’t work. Can someone can help me?

Nuha

what have you done ?

For example, I have dat.pth file. I plot the histogram column by column. Since I have 13 column, so I have 13 histogram. But what I want is to plot all the 13 column into 1 histogram. Is that possible?

You can fill one single histogram with all your data in the 13 columns. But then you will lose the difference between histograms.

So I guess it is better to keep your 13 histograms separated. Plot them on top of each other using the option SAME or, better, group them into a THStack and plot the THHsack.

root.cern.ch/root/html604/THStack.html