diff --git a/source/src/local_roofit.h b/source/src/local_roofit.h index d0f60f68..652e7734 100644 --- a/source/src/local_roofit.h +++ b/source/src/local_roofit.h @@ -157,28 +157,9 @@ namespace // ========================================================================== to.assign ( from ) ; // ========================================================================== -#elif ROOT_VERSION(6,18,0) <= ROOT_VERSION_CODE - // ========================================================================== - for ( auto elem : to ) { - auto theirs = from.find(*elem); - if(!theirs) continue; - theirs->syncCache() ; - elem->copyCache(theirs) ; - elem->setAttribute("Constant",theirs->isConstant()) ; - } - // ========================================================================== #else // ========================================================================== - Ostap::Utils::Iterator tmp ( to ) ; // only for ROOT < 6.18 - RooAbsArg* elem = nullptr ; - while ( elem = (RooAbsArg*) tmp.next() ) - { - RooAbsArg* theirs = from.find( *elem ); - if(!theirs) continue; - theirs->syncCache() ; - elem->copyCache(theirs) ; - elem->setAttribute("Constant",theirs->isConstant()) ; - } + to.assignValueOnly ( from ) ; // ========================================================================== #endif }