Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed null pointer conversion error for newer versions of ROOT #293

Merged
merged 2 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion python/postprocessing/framework/postprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ def run(self):
inTree.SetEntryList(elist)
else:
# initialize reader
inTree = InputTree(inTree, elist)
if elist:
inTree = InputTree(inTree, elist)
else:
inTree = InputTree(inTree)

# prepare output file
if not self.noOut:
Expand Down
4 changes: 2 additions & 2 deletions python/postprocessing/framework/treeReaderArrayTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ROOT.PyConfig.IgnoreCommandLineOptions = True


def InputTree(tree, entrylist=None):
def InputTree(tree, entrylist=ROOT.MakeNullPointer(ROOT.TEntryList)):
"""add to the PyROOT wrapper of a TTree a TTreeReader and methods readBranch, arrayReader, valueReader"""
if hasattr(tree, '_ttreereader'):
return tree # don't initialize twice
Expand Down Expand Up @@ -116,7 +116,7 @@ def _makeValueReader(tree, typ, nam):


def _remakeAllReaders(tree):
_ttreereader = ROOT.TTreeReader(tree, getattr(tree, '_entrylist', None))
_ttreereader = ROOT.TTreeReader(tree, getattr(tree, '_entrylist', ROOT.MakeNullPointer(ROOT.TEntryList)))
_ttreereader._isClean = True
_ttrvs = {}
for k in tree._ttrvs.keys():
Expand Down