// @(#)root/treeplayer:$Id$
// Author: Axel Naumann, 2011-09-21

/*************************************************************************
 * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers and al.        *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TTreeReader.h"

#include "TChain.h"
#include "TDirectory.h"
#include "TTreeReaderValue.h"

////////////////////////////////////////////////////////////////////////////////
/*BEGIN_HTML
 TTreeReader is a simple, robust and fast interface to read values from a TTree,
 TChain or TNtuple. It uses TTreeReaderValue<T> and
 TTreeReaderArray<T> to access the data. Example code can be found in
 tutorials/tree/hsimpleReader.C and tutorials/trees/h1analysisTreeReader.h and
 tutorials/trees/h1analysisTreeReader.C for a TSelector.
 Roottest contains an
 <a href="http://root.cern.ch/gitweb?p=roottest.git;a=tree;f=root/tree/reader;hb=HEAD">example</a>
 showing the full power.

A simpler analysis example - the one from the tutorials - can be found below:
it histograms a function of the px and py branches.</p>
&nbsp;
<div class="code"><pre class="_listing"><span class="codecomment">// A simple <a href="../TTreeReader.html">TTreeReader</a> use: read data from hsimple.root (written by hsimple.C)</span>
&nbsp;
<span class="cpp">#include "<a href="../TFile.h">TFile.h</a>"</span>
<span class="cpp">#include "<a href="../TH1F.h">TH1F.h</a>"</span>
<span class="cpp">#include "<a href="../TTreeReader.h">TTreeReader.h</a>"</span>
<span class="cpp">#include "<a href="../TTreeReaderValue.h">TTreeReaderValue.h</a>"</span>
&nbsp;
void hsimpleReader() {
   <span class="codecomment">// Create a histogram for the values we read.</span>
   <a href="../TH1F.html">TH1F</a> *myHist = <span class="keyword">new</span> <a href="../TH1F.html">TH1F</a>(<span class="string">"h1"</span>, <span class="string">"ntuple"</span>, 100, -4, 4);
&nbsp;
   <span class="codecomment">// Open the file containing the tree.</span>
   <a href="../TFile.html">TFile</a> *myFile = <a href="../TFile.html">TFile</a>::<a href="../TFile.html#TFile:Open" title="TFile* TFile::Open(const char* name, Option_t* option = &quot;&quot;, const char* ftitle = &quot;&quot;, Int_t compress = 1, Int_t netopt = 0) or overloads">Open</a>(<span class="string">"$ROOTSYS/tutorials/hsimple.root"</span>);
&nbsp;
   <span class="codecomment">// Create a <a href="../TTreeReader.html">TTreeReader</a> for the tree, for instance by passing the</span>
   <span class="codecomment">// <a href="../TTree.html">TTree</a>'s name and the <a href="../TDirectory.html">TDirectory</a> / <a href="../TFile.html">TFile</a> it is in.</span>
   <a href="../TTreeReader.html">TTreeReader</a> myReader(<span class="string">"ntuple"</span>, myFile);
&nbsp;
   <span class="codecomment">// The branch <span class="string">"px"</span> contains floats; access them as myPx.</span>
   TTreeReaderValue&lt;<a href="../ListOfTypes.html#Float_t">Float_t</a>&gt; myPx(myReader, <span class="string">"px"</span>);
   <span class="codecomment">// The branch <span class="string">"py"</span> contains floats, too; access those as myPy.</span>
   TTreeReaderValue&lt;<a href="../ListOfTypes.html#Float_t">Float_t</a>&gt; myPy(myReader, <span class="string">"py"</span>);
&nbsp;
   <span class="codecomment">// Loop over all entries of the <a href="../TTree.html">TTree</a> or <a href="../TChain.html">TChain</a>.</span>
   <span class="keyword">while</span> (myReader.<a href="../TTreeReader.html#TTreeReader:Next" title="Bool_t TTreeReader::Next()">Next</a>()) {
      <span class="codecomment">// Just access the data as if myPx and myPy were iterators (note the <span class="string">'*'</span></span>
      <span class="codecomment">// in front of them):</span>
      myHist-&gt;Fill(*myPx + *myPy);
   }
&nbsp;
   myHist-&gt;<a href="../TObject.html#TObject:Draw" title="void TObject::Draw(Option_t* option = &quot;&quot;)">Draw</a>();
}
</pre></div>
<div class="clear"></div>
<p>
<br/>
</p>

<p>A more complete example including error handling and a few combinations of
TTreeReaderValue and TTreeReaderArray would look like this:</p>

<div class="clear"></div>

<div class="code">
<table><tr><td>
<pre class="_listing">
<span class="cpp">#include &lt;<a href="TFile.h">TFile.h</a>&gt;</span>
<span class="cpp">#include &lt;<a href="TH1.h">TH1.h</a>&gt;</span>
<span class="cpp">#include &lt;<a href="TTreeReader.h">TTreeReader.h</a>&gt;</span>
<span class="cpp">#include &lt;<a href="TTreeReaderValue.h">TTreeReaderValue.h</a>&gt;</span>
<span class="cpp">#include &lt;<a href="TTreeReaderArray.h">TTreeReaderArray.h</a>&gt;</span>
&nbsp;
<span class="cpp">#include "TriggerInfo.h"</span>
<span class="cpp">#include "Muon.h"</span>
<span class="cpp">#include "Tau.h"</span>
&nbsp;
<span class="cpp">#include &lt;vector&gt;</span>
<span class="cpp">#include &lt;iostream&gt;</span>
&nbsp;
<span class="keyword">bool</span> CheckValue(<a href="ROOT__TTreeReaderValueBase.html">ROOT::TTreeReaderValueBase</a>* value) {
   <span class="keyword">if</span> (value-&gt;GetSetupStatus() &lt; 0) {
      std::cerr &lt;&lt; <span class="string">"Error "</span> &lt;&lt; value-&gt;GetSetupStatus()
                &lt;&lt; <span class="string">"setting up reader for "</span> &lt;&lt; value-&gt;GetBranchName() &lt;&lt; '\n';
      <span class="keyword">return</span> <span class="keyword">false</span>;
   }
   <span class="keyword">return</span> <span class="keyword">true</span>;
}
&nbsp;
&nbsp;
<span class="comment">// Analyze the tree <span class="string">"MyTree"</span> in the file passed into the function.</span>
<span class="comment">// Returns false in case of errors.</span>
<span class="keyword">bool</span> analyze(<a href="TFile.html">TFile</a>* file) {
   <span class="comment">// Create a <a href="TTreeReader.html">TTreeReader</a> named <span class="string">"MyTree"</span> from the given <a href="TDirectory.html">TDirectory</a>.</span>
   <span class="comment">// The <a href="TTreeReader.html">TTreeReader</a> gives access to the <a href="TTree.html">TTree</a> to the TTreeReaderValue and</span>
   <span class="comment">// TTreeReaderArray objects. It knows the current entry number and knows</span>
   <span class="comment">// how to iterate through the <a href="TTree.html">TTree</a>.</span>
   <a href="TTreeReader.html">TTreeReader</a> reader(<span class="string">"MyTree"</span>, file);
&nbsp;
   <span class="comment">// <a href="TObject.html#TObject:Read" title="Int_t TObject::Read(const char* name)">Read</a> a single <a href="ListOfTypes.html#float">float</a> value in each tree entries:</span>
   TTreeReaderValue&lt;<span class="keyword">float</span>&gt; weight(reader, <span class="string">"event.weight"</span>);
   <span class="keyword">if</span> (!CheckValue(weight)) <span class="keyword">return</span> <span class="keyword">false</span>;
&nbsp;
   <span class="comment">// <a href="TObject.html#TObject:Read" title="Int_t TObject::Read(const char* name)">Read</a> a TriggerInfo object from the tree entries:</span>
   TTreeReaderValue&lt;TriggerInfo&gt; triggerInfo(reader, <span class="string">"triggerInfo"</span>);
   <span class="keyword">if</span> (!CheckValue(triggerInfo)) <span class="keyword">return</span> <span class="keyword">false</span>;
&nbsp;
   <span class="comment">// <a href="TObject.html#TObject:Read" title="Int_t TObject::Read(const char* name)">Read</a> a vector of Muon objects from the tree entries:</span>
   TTreeReaderValue&lt;std::vector&lt;Muon&gt;&gt; muons(reader, <span class="string">"muons"</span>);
   <span class="keyword">if</span> (!CheckValue(muons)) <span class="keyword">return</span> <span class="keyword">false</span>;
&nbsp;
   <span class="comment">// <a href="TObject.html#TObject:Read" title="Int_t TObject::Read(const char* name)">Read</a> the pT for all jets in the tree entry:</span>
   TTreeReaderArray&lt;<span class="keyword">double</span>&gt; jetPt(reader, <span class="string">"jets.pT"</span>);
   <span class="keyword">if</span> (!CheckValue(jetPt)) <span class="keyword">return</span> <span class="keyword">false</span>;
&nbsp;
   <span class="comment">// <a href="TObject.html#TObject:Read" title="Int_t TObject::Read(const char* name)">Read</a> the taus in the tree entry:</span>
   TTreeReaderArray&lt;Tau&gt; taus(reader, <span class="string">"taus"</span>);
   <span class="keyword">if</span> (!CheckValue(taus)) <span class="keyword">return</span> <span class="keyword">false</span>;
&nbsp;
&nbsp;
   <span class="comment">// Now iterate through the <a href="TTree.html">TTree</a> entries and fill a histogram.</span>
&nbsp;
   <a href="TH1.html">TH1</a>* hist = <span class="keyword">new</span> <a href="TH1F.html">TH1F</a>(<span class="string">"hist"</span>, <span class="string">"TTreeReader example histogram"</span>, 10, 0., 100.);
&nbsp;
   <span class="keyword">while</span> (reader.Next()) {
&nbsp;
      <span class="keyword">if</span> (reader.GetEntryStatus() == <a href="TTreeReader.html#TTreeReader:kEntryValid" title="TTreeReader::EEntryStatus TTreeReader::kEntryValid">kEntryValid</a>) {
         std::cout &lt;&lt; <span class="string">"Loaded entry "</span> &lt;&lt; reader.GetCurrentEntry() &lt;&lt; '\n';
      } <span class="keyword">else</span> {
         <span class="keyword">switch</span> (reader.GetEntryStatus()) {
         <a href="TTreeReader.html#TTreeReader:kEntryValid" title="TTreeReader::EEntryStatus TTreeReader::kEntryValid">kEntryValid</a>:
            <span class="comment">// Handled above.</span>
            <span class="keyword">break</span>;
         <a href="TTreeReader.html#TTreeReader:kEntryNotLoaded" title="TTreeReader::EEntryStatus TTreeReader::kEntryNotLoaded">kEntryNotLoaded</a>:
            std::cerr &lt;&lt; <span class="string">"Error: TTreeReader has not loaded any data yet!\n"</span>;
            <span class="keyword">break</span>;
         <a href="TTreeReader.html#TTreeReader:kEntryNoTree" title="TTreeReader::EEntryStatus TTreeReader::kEntryNoTree">kEntryNoTree</a>:
            std::cerr &lt;&lt; <span class="string">"Error: TTreeReader cannot find a tree names \"MyTree\"!\n"</span>;
            <span class="keyword">break</span>;
         <a href="TTreeReader.html#TTreeReader:kEntryNotFound" title="TTreeReader::EEntryStatus TTreeReader::kEntryNotFound">kEntryNotFound</a>:
            <span class="comment">// Can't really happen as <a href="TTreeReader.html">TTreeReader</a>::<a href="TTreeReader.html#TTreeReader:Next" title="Bool_t TTreeReader::Next()">Next</a>() knows when to stop.</span>
            std::cerr &lt;&lt; <span class="string">"Error: The entry number doe not exist\n"</span>;
            <span class="keyword">break</span>;
         <a href="TTreeReader.html#TTreeReader:kEntryChainSetupError" title="TTreeReader::EEntryStatus TTreeReader::kEntryChainSetupError">kEntryChainSetupError</a>:
            std::cerr &lt;&lt; <span class="string">"Error: TTreeReader cannot access a chain element, e.g. file without the tree\n"</span>;
            <span class="keyword">break</span>;
         <a href="TTreeReader.html#TTreeReader:kEntryChainFileError" title="TTreeReader::EEntryStatus TTreeReader::kEntryChainFileError">kEntryChainFileError</a>:
            std::cerr &lt;&lt; <span class="string">"Error: TTreeReader cannot open a chain element, e.g. missing file\n"</span>;
            <span class="keyword">break</span>;
         <a href="TTreeReader.html#TTreeReader:kEntryDictionaryError" title="TTreeReader::EEntryStatus TTreeReader::kEntryDictionaryError">kEntryDictionaryError</a>:
            std::cerr &lt;&lt; <span class="string">"Error: TTreeReader cannot find the dictionary for some data\n"</span>;
            <span class="keyword">break</span>;
         }
         <span class="keyword">return</span> <span class="keyword">false</span>;
      }
&nbsp;
      <span class="comment">// Access the TriggerInfo object as if it's a pointer.</span>
      <span class="keyword">if</span> (!triggerInfo-&gt;hasMuonL1())
         <span class="keyword">continue</span>;
&nbsp;
      <span class="comment">// Ditto for the vector&lt;Muon&gt;.</span>
      <span class="keyword">if</span> (!muons-&gt;size())
         <span class="keyword">continue</span>;
&nbsp;
      <span class="comment">// Access the jetPt as an array, whether the <a href="TTree.html">TTree</a> stores this as</span>
      <span class="comment">// a std::vector, std::list, <a href="TClonesArray.html">TClonesArray</a> or Jet* C-style array, with</span>
      <span class="comment">// fixed or variable array size.</span>
      <span class="keyword">if</span> (jetPt.<a href="TCollection.html#TCollection:GetSize" title="Int_t TCollection::GetSize() const">GetSize</a>() &lt; 2 || jetPt[0] &lt; 100)
         <span class="keyword">continue</span>;
&nbsp;
      <span class="comment">// Access the array of taus.</span>
      <span class="keyword">if</span> (!taus.<a href="TObjArray.html#TObjArray:IsEmpty" title="Bool_t TObjArray::IsEmpty() const">IsEmpty</a>()) {
         <span class="keyword">float</span> currentWeight = *weight;
         <span class="keyword">for</span> (<span class="keyword">int</span> iTau = 0, nTau = taus.<a href="TCollection.html#TCollection:GetSize" title="Int_t TCollection::GetSize() const">GetSize</a>(); iTau &lt; nTau; ++iTau) {
            <span class="comment">// Access a <a href="ListOfTypes.html#float">float</a> value - need to dereference as TTreeReaderValue</span>
            <span class="comment">// behaves like an iterator</span>
            hist-&gt;Fill(taus[iTau].eta(), currentWeight);
         }
      }
   } <span class="comment">// TTree entry / event loop
}
</pre></td></tr></table></div>
<div class="clear"></div>
END_HTML
*/
////////////////////////////////////////////////////////////////////////////////

ClassImp(TTreeReader)

//______________________________________________________________________________
TTreeReader::TTreeReader(TTree* tree):
   fTree(tree),
   fDirectory(0),
   fEntryStatus(kEntryNotLoaded),
   fDirector(0)
{
   // Access data from tree.
   Initialize();
}

//______________________________________________________________________________
TTreeReader::TTreeReader(const char* keyname, TDirectory* dir /*= NULL*/):
   fTree(0),
   fDirectory(dir),
   fEntryStatus(kEntryNotLoaded),
   fDirector(0)
{
   // Access data from the tree called keyname in the directory (e.g. TFile)
   // dir, or the current directory if dir is NULL. If keyname cannot be
   // found, or if it is not a TTree, IsZombie() will return true.
   if (!fDirectory) fDirectory = gDirectory;
   fDirectory->GetObject(keyname, fTree);
   Initialize();
}

//______________________________________________________________________________
TTreeReader::~TTreeReader()
{
   // Tell all value readers that the tree reader does not exist anymore.
   for (std::deque<ROOT::TTreeReaderValueBase*>::const_iterator
           i = fValues.begin(), e = fValues.end(); i != e; ++i) {
      (*i)->MarkTreeReaderUnavailable();
   }
   delete fDirector;
   fProxies.SetOwner();
}

//______________________________________________________________________________
void TTreeReader::Initialize()
{
   // Initialization of the director.
   if (!fTree) {
      MakeZombie();
      fEntryStatus = kEntryNoTree;
   } else {
      fDirector = new ROOT::TBranchProxyDirector(fTree, -1);
   }
}

//______________________________________________________________________________
Long64_t TTreeReader::GetCurrentEntry() const {
   //Returns the index of the current entry being read

   if (!fDirector) return 0;
   Long64_t currentTreeEntry = fDirector->GetReadEntry();
   if (fTree->IsA() == TChain::Class() && currentTreeEntry >= 0) {
      return ((TChain*)fTree)->GetChainEntryNumber(currentTreeEntry);
   }
   return currentTreeEntry;
}

//______________________________________________________________________________
TTreeReader::EEntryStatus TTreeReader::SetEntryBase(Long64_t entry, Bool_t local)
{
   // Load an entry into the tree, return the status of the read.
   // For chains, entry is the global (i.e. not tree-local) entry number.

   if (!fTree) {
      fEntryStatus = kEntryNoTree;
      return fEntryStatus;
   }

   TTree* prevTree = fDirector->GetTree();

   int loadResult;
   if (!local){
      Int_t treeNumInChain = fTree->GetTreeNumber();

      loadResult = fTree->LoadTree(entry);

      if (loadResult == -2) {
         fEntryStatus = kEntryNotFound;
         return fEntryStatus;
      }

      Int_t currentTreeNumInChain = fTree->GetTreeNumber();
      if (treeNumInChain != currentTreeNumInChain) {
            fDirector->SetTree(fTree->GetTree());
      }
   }
   else {
      loadResult = entry;
   }
   if (!prevTree || fDirector->GetReadEntry() == -1) {
      // Tell readers we now have a tree
      for (std::deque<ROOT::TTreeReaderValueBase*>::const_iterator
              i = fValues.begin(); i != fValues.end(); ++i) { // Iterator end changes when parameterized arrays are read
         (*i)->CreateProxy();

         if (!(*i)->GetProxy()){
            fEntryStatus = kEntryDictionaryError;
            return fEntryStatus;
         }
      }
   }
   fDirector->SetReadEntry(loadResult);
   fEntryStatus = kEntryValid;
   return fEntryStatus;
}

//______________________________________________________________________________
void TTreeReader::SetTree(TTree* tree)
{
   // Set (or update) the which tree to reader from. tree can be
   // a TTree or a TChain.
   fTree = tree;
   if (fTree) {
      ResetBit(kZombie);
      if (fTree->InheritsFrom(TChain::Class())) {
         SetBit(kBitIsChain);
      }
   }

   if (!fDirector) {
      Initialize();
   }
   else {
      fDirector->SetTree(fTree);
      fDirector->SetReadEntry(-1);
   }
}

//______________________________________________________________________________
void TTreeReader::RegisterValueReader(ROOT::TTreeReaderValueBase* reader)
{
   // Add a value reader for this tree.
   fValues.push_back(reader);
}

//______________________________________________________________________________
void TTreeReader::DeregisterValueReader(ROOT::TTreeReaderValueBase* reader)
{
   // Remove a value reader for this tree.
   std::deque<ROOT::TTreeReaderValueBase*>::iterator iReader
      = std::find(fValues.begin(), fValues.end(), reader);
   if (iReader == fValues.end()) {
      Error("DeregisterValueReader", "Cannot find reader of type %s for branch %s", reader->GetDerivedTypeName(), reader->fBranchName.Data());
      return;
   }
   fValues.erase(iReader);
}
 TTreeReader.cxx:1
 TTreeReader.cxx:2
 TTreeReader.cxx:3
 TTreeReader.cxx:4
 TTreeReader.cxx:5
 TTreeReader.cxx:6
 TTreeReader.cxx:7
 TTreeReader.cxx:8
 TTreeReader.cxx:9
 TTreeReader.cxx:10
 TTreeReader.cxx:11
 TTreeReader.cxx:12
 TTreeReader.cxx:13
 TTreeReader.cxx:14
 TTreeReader.cxx:15
 TTreeReader.cxx:16
 TTreeReader.cxx:17
 TTreeReader.cxx:18
 TTreeReader.cxx:19
 TTreeReader.cxx:20
 TTreeReader.cxx:21
 TTreeReader.cxx:22
 TTreeReader.cxx:23
 TTreeReader.cxx:24
 TTreeReader.cxx:25
 TTreeReader.cxx:26
 TTreeReader.cxx:27
 TTreeReader.cxx:28
 TTreeReader.cxx:29
 TTreeReader.cxx:30
 TTreeReader.cxx:31
 TTreeReader.cxx:32
 TTreeReader.cxx:33
 TTreeReader.cxx:34
 TTreeReader.cxx:35
 TTreeReader.cxx:36
 TTreeReader.cxx:37
 TTreeReader.cxx:38
 TTreeReader.cxx:39
 TTreeReader.cxx:40
 TTreeReader.cxx:41
 TTreeReader.cxx:42
 TTreeReader.cxx:43
 TTreeReader.cxx:44
 TTreeReader.cxx:45
 TTreeReader.cxx:46
 TTreeReader.cxx:47
 TTreeReader.cxx:48
 TTreeReader.cxx:49
 TTreeReader.cxx:50
 TTreeReader.cxx:51
 TTreeReader.cxx:52
 TTreeReader.cxx:53
 TTreeReader.cxx:54
 TTreeReader.cxx:55
 TTreeReader.cxx:56
 TTreeReader.cxx:57
 TTreeReader.cxx:58
 TTreeReader.cxx:59
 TTreeReader.cxx:60
 TTreeReader.cxx:61
 TTreeReader.cxx:62
 TTreeReader.cxx:63
 TTreeReader.cxx:64
 TTreeReader.cxx:65
 TTreeReader.cxx:66
 TTreeReader.cxx:67
 TTreeReader.cxx:68
 TTreeReader.cxx:69
 TTreeReader.cxx:70
 TTreeReader.cxx:71
 TTreeReader.cxx:72
 TTreeReader.cxx:73
 TTreeReader.cxx:74
 TTreeReader.cxx:75
 TTreeReader.cxx:76
 TTreeReader.cxx:77
 TTreeReader.cxx:78
 TTreeReader.cxx:79
 TTreeReader.cxx:80
 TTreeReader.cxx:81
 TTreeReader.cxx:82
 TTreeReader.cxx:83
 TTreeReader.cxx:84
 TTreeReader.cxx:85
 TTreeReader.cxx:86
 TTreeReader.cxx:87
 TTreeReader.cxx:88
 TTreeReader.cxx:89
 TTreeReader.cxx:90
 TTreeReader.cxx:91
 TTreeReader.cxx:92
 TTreeReader.cxx:93
 TTreeReader.cxx:94
 TTreeReader.cxx:95
 TTreeReader.cxx:96
 TTreeReader.cxx:97
 TTreeReader.cxx:98
 TTreeReader.cxx:99
 TTreeReader.cxx:100
 TTreeReader.cxx:101
 TTreeReader.cxx:102
 TTreeReader.cxx:103
 TTreeReader.cxx:104
 TTreeReader.cxx:105
 TTreeReader.cxx:106
 TTreeReader.cxx:107
 TTreeReader.cxx:108
 TTreeReader.cxx:109
 TTreeReader.cxx:110
 TTreeReader.cxx:111
 TTreeReader.cxx:112
 TTreeReader.cxx:113
 TTreeReader.cxx:114
 TTreeReader.cxx:115
 TTreeReader.cxx:116
 TTreeReader.cxx:117
 TTreeReader.cxx:118
 TTreeReader.cxx:119
 TTreeReader.cxx:120
 TTreeReader.cxx:121
 TTreeReader.cxx:122
 TTreeReader.cxx:123
 TTreeReader.cxx:124
 TTreeReader.cxx:125
 TTreeReader.cxx:126
 TTreeReader.cxx:127
 TTreeReader.cxx:128
 TTreeReader.cxx:129
 TTreeReader.cxx:130
 TTreeReader.cxx:131
 TTreeReader.cxx:132
 TTreeReader.cxx:133
 TTreeReader.cxx:134
 TTreeReader.cxx:135
 TTreeReader.cxx:136
 TTreeReader.cxx:137
 TTreeReader.cxx:138
 TTreeReader.cxx:139
 TTreeReader.cxx:140
 TTreeReader.cxx:141
 TTreeReader.cxx:142
 TTreeReader.cxx:143
 TTreeReader.cxx:144
 TTreeReader.cxx:145
 TTreeReader.cxx:146
 TTreeReader.cxx:147
 TTreeReader.cxx:148
 TTreeReader.cxx:149
 TTreeReader.cxx:150
 TTreeReader.cxx:151
 TTreeReader.cxx:152
 TTreeReader.cxx:153
 TTreeReader.cxx:154
 TTreeReader.cxx:155
 TTreeReader.cxx:156
 TTreeReader.cxx:157
 TTreeReader.cxx:158
 TTreeReader.cxx:159
 TTreeReader.cxx:160
 TTreeReader.cxx:161
 TTreeReader.cxx:162
 TTreeReader.cxx:163
 TTreeReader.cxx:164
 TTreeReader.cxx:165
 TTreeReader.cxx:166
 TTreeReader.cxx:167
 TTreeReader.cxx:168
 TTreeReader.cxx:169
 TTreeReader.cxx:170
 TTreeReader.cxx:171
 TTreeReader.cxx:172
 TTreeReader.cxx:173
 TTreeReader.cxx:174
 TTreeReader.cxx:175
 TTreeReader.cxx:176
 TTreeReader.cxx:177
 TTreeReader.cxx:178
 TTreeReader.cxx:179
 TTreeReader.cxx:180
 TTreeReader.cxx:181
 TTreeReader.cxx:182
 TTreeReader.cxx:183
 TTreeReader.cxx:184
 TTreeReader.cxx:185
 TTreeReader.cxx:186
 TTreeReader.cxx:187
 TTreeReader.cxx:188
 TTreeReader.cxx:189
 TTreeReader.cxx:190
 TTreeReader.cxx:191
 TTreeReader.cxx:192
 TTreeReader.cxx:193
 TTreeReader.cxx:194
 TTreeReader.cxx:195
 TTreeReader.cxx:196
 TTreeReader.cxx:197
 TTreeReader.cxx:198
 TTreeReader.cxx:199
 TTreeReader.cxx:200
 TTreeReader.cxx:201
 TTreeReader.cxx:202
 TTreeReader.cxx:203
 TTreeReader.cxx:204
 TTreeReader.cxx:205
 TTreeReader.cxx:206
 TTreeReader.cxx:207
 TTreeReader.cxx:208
 TTreeReader.cxx:209
 TTreeReader.cxx:210
 TTreeReader.cxx:211
 TTreeReader.cxx:212
 TTreeReader.cxx:213
 TTreeReader.cxx:214
 TTreeReader.cxx:215
 TTreeReader.cxx:216
 TTreeReader.cxx:217
 TTreeReader.cxx:218
 TTreeReader.cxx:219
 TTreeReader.cxx:220
 TTreeReader.cxx:221
 TTreeReader.cxx:222
 TTreeReader.cxx:223
 TTreeReader.cxx:224
 TTreeReader.cxx:225
 TTreeReader.cxx:226
 TTreeReader.cxx:227
 TTreeReader.cxx:228
 TTreeReader.cxx:229
 TTreeReader.cxx:230
 TTreeReader.cxx:231
 TTreeReader.cxx:232
 TTreeReader.cxx:233
 TTreeReader.cxx:234
 TTreeReader.cxx:235
 TTreeReader.cxx:236
 TTreeReader.cxx:237
 TTreeReader.cxx:238
 TTreeReader.cxx:239
 TTreeReader.cxx:240
 TTreeReader.cxx:241
 TTreeReader.cxx:242
 TTreeReader.cxx:243
 TTreeReader.cxx:244
 TTreeReader.cxx:245
 TTreeReader.cxx:246
 TTreeReader.cxx:247
 TTreeReader.cxx:248
 TTreeReader.cxx:249
 TTreeReader.cxx:250
 TTreeReader.cxx:251
 TTreeReader.cxx:252
 TTreeReader.cxx:253
 TTreeReader.cxx:254
 TTreeReader.cxx:255
 TTreeReader.cxx:256
 TTreeReader.cxx:257
 TTreeReader.cxx:258
 TTreeReader.cxx:259
 TTreeReader.cxx:260
 TTreeReader.cxx:261
 TTreeReader.cxx:262
 TTreeReader.cxx:263
 TTreeReader.cxx:264
 TTreeReader.cxx:265
 TTreeReader.cxx:266
 TTreeReader.cxx:267
 TTreeReader.cxx:268
 TTreeReader.cxx:269
 TTreeReader.cxx:270
 TTreeReader.cxx:271
 TTreeReader.cxx:272
 TTreeReader.cxx:273
 TTreeReader.cxx:274
 TTreeReader.cxx:275
 TTreeReader.cxx:276
 TTreeReader.cxx:277
 TTreeReader.cxx:278
 TTreeReader.cxx:279
 TTreeReader.cxx:280
 TTreeReader.cxx:281
 TTreeReader.cxx:282
 TTreeReader.cxx:283
 TTreeReader.cxx:284
 TTreeReader.cxx:285
 TTreeReader.cxx:286
 TTreeReader.cxx:287
 TTreeReader.cxx:288
 TTreeReader.cxx:289
 TTreeReader.cxx:290
 TTreeReader.cxx:291
 TTreeReader.cxx:292
 TTreeReader.cxx:293
 TTreeReader.cxx:294
 TTreeReader.cxx:295
 TTreeReader.cxx:296
 TTreeReader.cxx:297
 TTreeReader.cxx:298
 TTreeReader.cxx:299
 TTreeReader.cxx:300
 TTreeReader.cxx:301
 TTreeReader.cxx:302
 TTreeReader.cxx:303
 TTreeReader.cxx:304
 TTreeReader.cxx:305
 TTreeReader.cxx:306
 TTreeReader.cxx:307
 TTreeReader.cxx:308
 TTreeReader.cxx:309
 TTreeReader.cxx:310
 TTreeReader.cxx:311
 TTreeReader.cxx:312
 TTreeReader.cxx:313
 TTreeReader.cxx:314
 TTreeReader.cxx:315
 TTreeReader.cxx:316
 TTreeReader.cxx:317
 TTreeReader.cxx:318
 TTreeReader.cxx:319
 TTreeReader.cxx:320
 TTreeReader.cxx:321
 TTreeReader.cxx:322
 TTreeReader.cxx:323
 TTreeReader.cxx:324
 TTreeReader.cxx:325
 TTreeReader.cxx:326
 TTreeReader.cxx:327
 TTreeReader.cxx:328
 TTreeReader.cxx:329
 TTreeReader.cxx:330
 TTreeReader.cxx:331
 TTreeReader.cxx:332
 TTreeReader.cxx:333
 TTreeReader.cxx:334
 TTreeReader.cxx:335
 TTreeReader.cxx:336
 TTreeReader.cxx:337
 TTreeReader.cxx:338
 TTreeReader.cxx:339
 TTreeReader.cxx:340
 TTreeReader.cxx:341
 TTreeReader.cxx:342
 TTreeReader.cxx:343
 TTreeReader.cxx:344
 TTreeReader.cxx:345
 TTreeReader.cxx:346
 TTreeReader.cxx:347
 TTreeReader.cxx:348
 TTreeReader.cxx:349
 TTreeReader.cxx:350
 TTreeReader.cxx:351