From 22aa01b1e0dcafc9d10912844aea51a4a4542224 Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Sat, 17 Dec 2022 15:16:11 +0100 Subject: [PATCH] 1. add treatment of new `ROOT.RooFit.MaxCalls` agrument --- ReleaseNotes/release_notes.md | 4 +++- ostap/fitting/fithelpers.py | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ReleaseNotes/release_notes.md b/ReleaseNotes/release_notes.md index 1a5e3609..1ebfe87e 100644 --- a/ReleaseNotes/release_notes.md +++ b/ReleaseNotes/release_notes.md @@ -10,7 +10,9 @@ 1. some improvements for frame progress bar 1. some improvements for frame-based `tree_reduce` 1. disable new frame-test for old ROOT - + 1. add treatment of new `ROOT.RooFit.MaxCalls` agrument + + ## Backward incompatible: 1. rename some methods for `Ostap::Math::Integrator` diff --git a/ostap/fitting/fithelpers.py b/ostap/fitting/fithelpers.py index 563d0488..cd8ff493 100644 --- a/ostap/fitting/fithelpers.py +++ b/ostap/fitting/fithelpers.py @@ -789,7 +789,7 @@ def parse_args ( self , dataset = None , *args , **kwargs ) : _args.append ( ROOT.RooFit.Offset ( a ) ) - elif kup in ( 'FITOPTIONS' , 'FITOPTION' ) and \ + elif kup in ( 'FITOPTIONS' , 'FITOPTION' ) and \ isinstance ( a , string_types ) and root_info < ( 6 , 28 ) : _args.append ( ROOT.RooFit.FitOptions ( a ) ) @@ -820,6 +820,11 @@ def parse_args ( self , dataset = None , *args , **kwargs ) : _args.append ( ROOT.RooFit.Parallelize ( *a ) ) + elif kup in ( 'MAXCALLS' , 'MAXCALL' ) and \ + isinstance ( a , integer_types ) and (6,27) <= root_info : + + _args.append ( ROOT.RooFit.MaxCalls ( a ) ) + else : self.error ( 'parse_args: Unknown/illegal keyword argument: %s/%s, skip it ' % ( k , type ( a ) ) )