Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

H1Tracks.C

Go to the documentation of this file.
00001 #define H1Tracks_cxx
00002 #include "H1Tracks.h"
00003 #include "TH2.h"
00004 #include "TStyle.h"
00005 #include "TCanvas.h"
00006 
00007 void H1Tracks::Loop()
00008 {
00009 //   In a ROOT session, you can do:
00010 //      Root > .L H1Tracks.C
00011 //      Root > H1Tracks t
00012 //      Root > t.GetEntry(12); // Fill t data members with entry number 12
00013 //      Root > t.Show();       // Show values of entry 12
00014 //      Root > t.Show(16);     // Read and show values of entry 16
00015 //      Root > t.Loop();       // Loop on all entries
00016 //
00017 
00018 //     This is the loop skeleton where:
00019 //    jentry is the global entry number in the chain
00020 //    ientry is the entry number in the current Tree
00021 //  Note that the argument to GetEntry must be:
00022 //    jentry for TChain::GetEntry
00023 //    ientry for TTree::GetEntry and TBranch::GetEntry
00024 //
00025 //       To read only selected branches, Insert statements like:
00026 // METHOD1:
00027 //    fChain->SetBranchStatus("*",0);  // disable all branches
00028 //    fChain->SetBranchStatus("branchname",1);  // activate branchname
00029 // METHOD2: replace line
00030 //    fChain->GetEntry(jentry);       //read all branches
00031 //by  b_branchname->GetEntry(ientry); //read only this branch
00032    if (fChain == 0) return;
00033 
00034    Int_t nentries = Int_t(fChain->GetEntriesFast());
00035 
00036    Int_t nbytes = 0, nb = 0;
00037    for (Int_t jentry=0; jentry<nentries;jentry++) {
00038       Int_t ientry = LoadTree(jentry);
00039       if (ientry < 0) break;
00040       nb = fChain->GetEntry(jentry);   nbytes += nb;
00041       // if (Cut(ientry) < 0) continue;
00042    }
00043 }

Generated on Fri Sep 14 17:38:20 2007 for Kinfit by doxygen 1.3.2