Skip to content

Commit

Permalink
make use of fstatVar if/when available
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Apr 25, 2024
1 parent 6844564 commit 3037bb8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ostap/trees/trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -1298,11 +1298,12 @@ def _rt_table_0_ ( tree ,

bbs.append ( b )

if hasattr ( tree , 'pstatVar' ) : bbstats = tree.pstatVar ( bbs , cuts , *args )
else : bbstats = tree. statVar ( bbs , cuts , *args )
if hasattr ( tree , 'fstatVar' ) : bbstats = tree.fstatVar ( bbs , cuts , *args )
elif hasattr ( tree , 'pstatVar' ) : bbstats = tree.pstatVar ( bbs , cuts , *args )
else : bbstats = tree. statVar ( bbs , cuts , *args )

from ostap.stats.counters import WSE, SE
if isinstance ( bbstats , ( WSE , SE ) ) : bbstats = { bbs[0] : bbstats }
if isinstance ( bbstats , ( WSE , SE ) ) : bbstats = { bbs [ 0 ] : bbstats }

for b in brs :

Expand Down

0 comments on commit 3037bb8

Please sign in to comment.