Fixed null pointer conversion error for newer versions of ROOT #293
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in this issue, a conversion error is thrown when running the postprocessor with newer versions of ROOT. In particular, it is complaining about the TEntryList being supplied to the constructor. I believe this is because
entrylist
is NoneType by default, rather than a null pointer. By replacing this default value withROOT.MakeNullPointer(ROOT.TEntryList)
, theTTreeReader
constructor instead receives a nullpointer as it expects. I tested this simple fix using CMSSW v12.1.0 (pre, with ROOT v6.24) and CMSSW v10.6.25. I used a custom module and skimmed some custom MC signal samples for the test.