Hi, all.
I am trying to read a leaf from a tree (I would like to get data from @size leaf), but without any progress so far.
I have tried the following code:
void treereader2()
{
TFile *f = TFile::Open("bmndst4700_BMNHF_BMNTF.root");
TTree *bmndata = (TTree*)f->Get("bmndata");
bmndata->SetMakeClass(1);
Float_t track_amount[209723];
TBranch *tr_a = bmndata->GetBranch("BmnGlobalTrack@.GetEntries()");
tr_a->SetAddress(track_amount);
Int_t nevent = (Int_t)bmndata->GetEntries();
for (Int_t i=0;i<nevent;i++) {
tr_a->GetEntry(i);
printf("Amount of tracks:",track_amount[i]);
}
}
Any help would be appreciated.
With kind regards,
Ramin
_ROOT Version: 6.26/02
_Platform: Linux 3.10.0-1062.12.1.el7.x86_64
_Compiler: Red Hat 4.8.5-39