#define ReadTree_cxx #include "ReadTree.h" #include #include #include #include #include #include #include using namespace std; // In a ROOT session, you can do: // Root > .L ReadTree.C // Root > ReadTree 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 // void ReadTree::Loop() { TString in="tmpOutput/ThetaRes.root"; fout = new TFile(in,"RECREATE"); cout<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; Long64_t nentries = fChain->GetEntriesFast(); cout<<"ReadTree::Loop() nentries="<