ATLAS Offline Software
TrkValidationNtupleOutputTrack.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #define TrkValidationNtupleOutputTrack_cxx
7 #include <TH2.h>
8 #include <TStyle.h>
9 #include <TCanvas.h>
10 
12 {
13 // In a ROOT session, you can do:
14 // Root > .L TrkValidationNtupleOutputTrack.C
15 // Root > TrkValidationNtupleOutputTrack t
16 // Root > t.GetEntry(12); // Fill t data members with entry number 12
17 // Root > t.Show(); // Show values of entry 12
18 // Root > t.Show(16); // Read and show values of entry 16
19 // Root > t.Loop(); // Loop on all entries
20 //
21 
22 // This is the loop skeleton where:
23 // jentry is the global entry number in the chain
24 // ientry is the entry number in the current Tree
25 // Note that the argument to GetEntry must be:
26 // jentry for TChain::GetEntry
27 // ientry for TTree::GetEntry and TBranch::GetEntry
28 //
29 // To read only selected branches, Insert statements like:
30 // METHOD1:
31 // fChain->SetBranchStatus("*",0); // disable all branches
32 // fChain->SetBranchStatus("branchname",1); // activate branchname
33 // METHOD2: replace line
34 // fChain->GetEntry(jentry); //read all branches
35 //by b_branchname->GetEntry(ientry); //read only this branch
36  if (fChain == 0) return;
37 
38  Long64_t nentries = fChain->GetEntriesFast();
39 
40  Int_t nbytes = 0, nb = 0;
41  for (Long64_t jentry=0; jentry<nentries;jentry++) {
42  Long64_t ientry = LoadTree(jentry);
43  if (ientry < 0) break;
44  nb = fChain->GetEntry(jentry); nbytes += nb;
45  // if (Cut(ientry) < 0) continue;
46  }
47 }
TrkValidationNtupleOutputTrack.h
PlotCalibFromCool.nentries
nentries
Definition: PlotCalibFromCool.py:798
TrkValidationNtupleOutputTrack::Loop
virtual void Loop()
Definition: TrkValidationNtupleOutputTrack.cxx:11
TrkValidationNtupleOutputTrack::fChain
TTree * fChain
Definition: TrkValidationNtupleOutputTrack.h:30
hotSpotInTAG.nb
nb
Definition: hotSpotInTAG.py:164
TrkValidationNtupleOutputTrack::LoadTree
virtual Long64_t LoadTree(Long64_t entry)