@@ -70,22 +70,21 @@ class TreeChain
7070 delete notifier;
7171 }
7272
73- long Prepare ()
73+ int Prepare ()
7474 {
75- long load = LoadTree (0 );
76- if (load < 0 )
75+ long long load = LoadTree (0 );
76+ if (load >= 0 )
7777 {
78- return load;
78+ // Enable all branches since we don't know yet which branches are
79+ // required by the formulae. The branches must be activated when a
80+ // TTreeFormula is initially created.
81+ fChain ->SetBranchStatus (" *" , true );
82+ // fChain->SetCacheSize(10000000);
7983 }
80- // Enable all branches since we don't know yet which branches are
81- // required by the formulae. The branches must be activated when a
82- // TTreeFormula is initially created.
83- fChain ->SetBranchStatus (" *" , true );
84- // fChain->SetCacheSize(10000000);
85- return load;
84+ return (int )load;
8685 }
8786
88- long long LoadTree (long entry)
87+ long long LoadTree (long long entry)
8988 {
9089 long long load = fChain ->LoadTree (entry);
9190 if (load < 0 )
@@ -161,7 +160,7 @@ class TreeChain
161160 }
162161 }
163162
164- int GetEntry (long entry)
163+ int GetEntry (long long entry)
165164 {
166165 /*
167166 In order to get performance comparable to TTreeFormula, we manually
@@ -183,7 +182,7 @@ class TreeChain
183182 membership, and it won't cost us anything since TTreeFormula won't
184183 reload them.
185184 */
186- long load = LoadTree (entry);
185+ long long load = LoadTree (entry);
187186 if (load < 0 )
188187 {
189188 return (int )load;
@@ -271,8 +270,8 @@ class TreeChain
271270 }
272271
273272 void AddColumn (const std::string& branch_name,
274- const std::string& leaf_name,
275- BranchColumn* column)
273+ const std::string& leaf_name,
274+ BranchColumn* column)
276275 {
277276 BL bl = make_pair (branch_name, leaf_name);
278277 leafcache.insert (make_pair (bl, column));
@@ -302,7 +301,7 @@ class TreeChain
302301
303302 TTree* fChain ;
304303 int fCurrent ;
305- long ientry;
304+ long long ientry;
306305 MiniNotify* notifier;
307306 std::vector<TTreeFormula*> formulae;
308307
0 commit comments