Reading Tree with TArrayS

Hello,

I’m trying to read a tree with a TArrayS named Samples with fArray and fN variables but I’m not able to do it. This is the schematic of the tree:
immagine

I’m reading the first part in this way:
UShort_t Channel;
ULong64_t Timestamp;
UShort_t Board;
UShort_t Energy;
UShort_t EnergyShort;
UInt_t Flags;
Int_t Probe;
TArrayS *Samples = new TArrayS();
Int_t fN;
Short_t *fArray;

TFile *file = new TFile( fullnameWave);
TTree Data_R = (TTree)file->Get(“Data_R”);
Data_R->Print();
Data_R->SetBranchAddress(“Channel”,&Channel);
Data_R->SetBranchAddress(“Timestamp”,&Timestamp);
Data_R->SetBranchAddress(“Board”,&Board);
Data_R->SetBranchAddress(“Energy”,&Energy);
Data_R->SetBranchAddress(“EnergyShort”,&EnergyShort);
Data_R->SetBranchAddress(“Flags”,&Flags);
Data_R->SetBranchAddress(“Probe”,&Probe);
Data_R->SetBranchAddress(“Samples”,&Samples);

COuld you please help me? I don’t know hopw to read the Samples.

Thank you.
BEst regards,

Davide

Try (then see the generated “Data_R.[hC]” files):
root -b -q DataR_CH0...root -e 'Data_R->MakeClass();'

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.