Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

Commit 45f4935

Browse files
committed
long -> long long
1 parent f5b406f commit 45f4935

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

root_numpy/src/TreeChain.h

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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

root_numpy/src/root_numpy.pxi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ cdef extern from "Column.h":
5050
cdef extern from "TreeChain.h":
5151
cdef cppclass TreeChain:
5252
TreeChain(TTree*)
53-
long Prepare()
53+
int Prepare()
5454
int Next()
5555
void AddColumn(string bname, string lname, BranchColumn* column)
56-
int GetEntry(int i)
56+
int GetEntry(long_long)
5757
TTree* fChain
5858
void AddFormula(TTreeFormula* formula)
5959
void InitBranches()

0 commit comments

Comments
 (0)