Skip to content

Commit

Permalink
Recover branches with multiple underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
rovere committed May 4, 2018
1 parent 0781515 commit d057c8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NtupleDataFormat.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def electrons(self, prefix="ecalDrivenGsfele"):

def getDataFrame(self, prefix):
branches = [br.GetName() for br in self._tree.GetListOfBranches() if br.GetName().startswith(prefix+'_')]
names = [br.split('_')[1] for br in branches]
names = ['_'.join(br.split('_')[1:]) for br in branches]
nd_array = rnp.tree2array(self._tree, branches=branches, start=self._entry, stop=self._entry+1)
df = pd.DataFrame()
for idx in range(0, len(branches)):
Expand Down

0 comments on commit d057c8e

Please sign in to comment.