Skip to content

Commit 5c957a9

Browse files
committed
Time creation of NLL object for default backend
1 parent 2878b18 commit 5c957a9

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/RooSimultaneousOpt.cc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ std::unique_ptr<RooAbsReal>
1212
RooSimultaneousOpt::createNLLImpl(RooAbsData& data, const RooLinkedList& cmdList)
1313
#endif
1414
{
15-
RooCmdConfig pc(Form("RooSimultaneousOpt::createNLL(%s)",GetName())) ;
16-
pc.defineSet("cPars","Constrain",0,0);
17-
RooArgSet *cPars = pc.getSet("cPars");
18-
auto nll = std::make_unique<cacheutils::CachingSimNLL>(this, &data, cPars);
19-
nll->setChannelMasks(this->channelMasks());
15+
#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 36, 0)
16+
// Match the printout of https://github.com/root-project/root/blob/a6ec2bd88e82f46f131cece8b3cc6b357c756f02/roofit/roofitcore/src/FitHelpers.cxx#L594
17+
auto timingScope = std::make_unique<ROOT::Math::Util::TimingScope>(
18+
[this](std::string const& msg) { oocoutI(this, Fitting) << msg << std::endl; }, "Creation of NLL object took");
19+
#endif
20+
RooCmdConfig pc(Form("RooSimultaneousOpt::createNLL(%s)", GetName()));
21+
pc.defineSet("cPars", "Constrain", 0, 0);
22+
RooArgSet* cPars = pc.getSet("cPars");
23+
auto nll = std::make_unique<cacheutils::CachingSimNLL>(this, &data, cPars);
24+
nll->setChannelMasks(this->channelMasks());
2025
#if ROOT_VERSION_CODE < ROOT_VERSION(6,30,0)
2126
return nll.release();
2227
#else

0 commit comments

Comments
 (0)