I need you to help me about how to get values contained inside my TTree.
I know that I have to do something like:
TFile* f = TFile::Open("name_of_file");
TTree* tree = (TTree*)f->Get("my_ttree");
TH1F* htemp1 = (TH1F*)gDirectory->Get("h1");
float* tmp_tab = htemp1->GetArray();
My problem is that:
I have a 5 TBranch TTree. One is called "seed", an other "time" and the last one wich interest us is "n" <=> the number of detection for a time between t and t+dt.
"seed" is a value between 1 and 5 that give me the origine of my datas (those datas come from 5 differents files).
When I want to draw "n" over "time" like this:
I see 5 point by time value for number of detection "n".
Those 5 values are the 5 files I speaked before.
I don't want 5 but 1 value that give me the total number of detection for a time between t and t+dt.
I tried something like this:
But all I get in hist_tmp is zero values...
Do you know why this happened ?
Why this not happen with "r" values if I put nothing for the TString cut1 value like this: ?
PS: This is all my files:
converted_group_1.root (7.6 KB)
main.cpp (383 Bytes)