I have a data stored in a file. So i read the data into a TTree. An exaple of data are below, where the first column are date, and the other columns are number (here only 1 columns to simplify):
Now I want to plot the values in function of the time, but I know that have to be in TDatime format (y,m,d,h,m,s). So my question is: how can I modify the data inside the branches?
And also, if I want to store the data from a branches into a list o array, how can I do?
Yes this work in sense that I have the plot, but the time line is not correct, I mean the distance between october 2015 and june 2016 is same of the distance betwee june 2016 and november 2016…
And 2nd thing I need also to store the data from each branch in array or list.
In that case you will need to create a histogram with time axis as shown in the examples here: root.cern/doc/master/dir_dd3949 … a3468.html
may be instead of storing the date as a string in the ntuple it will be better to store the value returned by TDatime::Convert (see examples above).
Yes sorry… So I have a tree with different branches… now I want manage the values which are inside the branches… For example I would like copy the values from branches 2 to a list… so as you told me I used GetVal(2):
What I did, probably wrong, is copy the values from branches 2 of tree into the x list. Then I printed the list, but don’t see the values but is printed: <Double_t buffer, size 2147483647>
I tried also the command GetV2() but also in this case I have: <ROOT.MethodProxy object at 0x7f4386f24f90>
but not the values.
Ahhh ok now I understand how it works!!
But I have another problem… if insted to take the GetVal(1) I take the GetVal(0) where I have the “time” and not a float values, instead to obtain the time values stored in tree I obtain this number: