Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Dec 5, 2023
1 parent 45539f4 commit 86c3fdd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ostap/fitting/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,13 @@ def _rcat_setval_( cat , value ) :
ROOT.RooCategory .__str__ = _rcat_str_
ROOT.RooCategory .__repr__ = _rcat_str_

ROOT.RooCategory .__int__ = lambda s : s.getCurrentIndex ()
ROOT.RooCategory .getVal = lambda s : s.getCurrentIndex ()
if ( 6 , 24 ) <= root_info :
ROOT.RooCategory .__int__ = lambda s : s.getCurrentIndex ()
ROOT.RooCategory .getVal = lambda s : s.getCurrentIndex ()
else :
ROOT.RooCategory .__int__ = lambda s : s.getIndex ()
ROOT.RooCategory .getVal = lambda s : s.getIndex ()

ROOT.RooCategory .setVal = _rcat_setval_

_new_methods_ += [
Expand Down

0 comments on commit 86c3fdd

Please sign in to comment.