9 // In a ROOT session, you can do:
12 // Root > t.GetEntry(12); // Fill t data members with entry number 12
13 // Root > t.Show(); // Show values of entry 12
14 // Root > t.Show(16); // Read and show values of entry 16
15 // Root > t.Loop(); // Loop on all entries
18 // This is the loop skeleton where:
19 // jentry is the global entry number in the chain
20 // ientry is the entry number in the current Tree
21 // Note that the argument to GetEntry must be:
22 // jentry for TChain::GetEntry
23 // ientry for TTree::GetEntry and TBranch::GetEntry
25 // To read only selected branches, Insert statements like:
27 // fChain->SetBranchStatus("*",0); // disable all branches
28 // fChain->SetBranchStatus("branchname",1); // activate branchname
29 // METHOD2: replace line
30 // fChain->GetEntry(jentry); //read all branches
31 //by b_branchname->GetEntry(ientry); //read only this branch
32 if (fChain == 0) return;
34 Long64_t nentries = fChain->GetEntriesFast();
36 Long64_t nbytes = 0, nb = 0;
37 for (Long64_t jentry=0; jentry<nentries;jentry++) {
38 Long64_t ientry = LoadTree(jentry);
39 if (ientry < 0) break;
40 nb = fChain->GetEntry(jentry); nbytes += nb;
41 // if (Cut(ientry) < 0) continue;