Problem

{
TFile f2(“ht.root”, “recreate”);
TTree *mytree = new TTree(“mytree”, “Test Tree”);
Double_t val[5] = {0, 0, 0, 0, 0};
TBranch b2 = mytree->Branch(“b2”, val, “a/D:b:c:d:e”);
for (int i=0; i<8; i++) {
val[0] = 1; val[3] = -3.14; val[2] = i
1.;
mytree->Fill() ;
}
f2.Write() ;
mytree->Print();
mytree->Scan();
}

please if val[0]=1 and also val[0]=-1 please how can i putting both values 1 and -1 in one branch (a) that when i open the branch a i will saw 1 and -1
pleaaaaaaaaaaaaaaaaaaaaaaaaaaase i need your help

Hi,

This part of the forum is for general announcement. You have a better chance to get answer if you post in the Support forum. Also you may want to re-read the User’s Guide and the tutorials which may help you find the answer.

Cheers,
Philippe.

PS. I do not understand what you are trying to do …