#define markanal_cxx #include "markanal.h" #include #include #include void markanal::Loop(markanal* send_ma) { // In a ROOT session, you can do: // Root > .L markanal.C // Root > markanal t // Root > t.GetEntry(12); // Fill t data members with entry number 12 // Root > t.Show(); // Show values of entry 12 // Root > t.Show(16); // Read and show values of entry 16 // Root > t.Loop(); // Loop on all entries // // This is the loop skeleton where: // jentry is the global entry number in the chain // ientry is the entry number in the current Tree // Note that the argument to GetEntry must be: // jentry for TChain::GetEntry // ientry for TTree::GetEntry and TBranch::GetEntry // // To read only selected branches, Insert statements like: // METHOD1: // fChain->SetBranchStatus("*",0); // disable all branches // fChain->SetBranchStatus("branchname",1); // activate branchname // METHOD2: replace line // fChain->GetEntry(jentry); //read all branches //by b_branchname->GetEntry(ientry); //read only this branch if (fChain == 0) return; //fChain->BuildIndex("number","another"); //send_ma->fChain->BuildIndex("number","another"); Long64_t nentries = fChain->GetEntriesFast(); Long64_t serial = 0; Int_t nbytes = 0, nb = 0, count = 0, manb = 0; for (Long64_t jentry=0; jentryGetEntry(jentry); nbytes += nb; cout << number << " - " << another << endl; //Long64_t maentry = send_ma->fChain->LoadTree(jentry); //if (maentry < 0) break; serial = send_ma->fChain->GetEntryWithIndex(number,another); cout << "serial: " << serial << endl; //manb = send_ma->fChain->GetEntry(serial); cout << send_ma->number << " -- " << send_ma->another << endl << endl; // if (Cut(ientry) < 0) continue; } cout << "-----------------" << endl; }