From 150d0a3c772b6eacbb87401e164e85c5013c8890 Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Sat, 10 Aug 2024 15:01:06 +0200 Subject: [PATCH] fix ? --- ostap/fitting/dataset.py | 18 +++++++++++++++--- ostap/plotting/style.py | 5 ++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ostap/fitting/dataset.py b/ostap/fitting/dataset.py index 433cfc6e..feb12837 100644 --- a/ostap/fitting/dataset.py +++ b/ostap/fitting/dataset.py @@ -1704,9 +1704,21 @@ def _rds_makeWeighted_ ( dataset , dataset.addVar ( wname , weightwar ) weightvar = wname - print ( 'MAKE EI"GHOTED/4' ) - - varset = dataset.get() + print ( 'MAKE EI"GHOTED/4' , [ v.name for v in dataset.get() ] ) + + varset = dataset.get() + if ( 6, 18 ) <= root_info < ( 6 , 20 ) : + print ( 'SPECIAL TRATMENT!' , root_info ) + args = dsID() , dataset.GetTile() , varset, ROOT.RoofitWeightVar ( weightvar ) + if cuts : args + ( ROOT.RooFit.Cut ( cuts ) ) + result = ROOT.RooDataSet ( *args ) + for entry, w in dataset : + weight = entry [ weightvar ] + result.add ( entry , float ( weight ) ) + return result + + print ( 'MAKE EI"GHOTED/5' ) + ## make weighted dataset result = ROOT.RooDataSet ( dsID() , dataset.GetTitle() , diff --git a/ostap/plotting/style.py b/ostap/plotting/style.py index b453f18f..a39c54ed 100755 --- a/ostap/plotting/style.py +++ b/ostap/plotting/style.py @@ -70,12 +70,11 @@ def OstapStyle ( name , s , c , n = key.partition(':') if not c : continue n1 = n.strip() if c else s.strip() - if n1 == n2 : config = CONFIG.config[key] - logger.info ( 'Use existing configuration style %s' % name ) + logger.debug ( 'Use existing configuration style %s' % name ) break - + import ostap.plotting.makestyles as MS style = MS.make_ostap_style ( name = name , description = description ,