Skip to content

Commit f9b9878

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

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/RooSimultaneousOpt.cc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ 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+
auto timingScope = std::make_unique<ROOT::Math::Util::TimingScope>(
17+
[this](std::string const& msg) { oocoutI(this, Fitting) << msg << std::endl; }, "Creation of NLL object took");
18+
#endif
19+
RooCmdConfig pc(Form("RooSimultaneousOpt::createNLL(%s)", GetName()));
20+
pc.defineSet("cPars", "Constrain", 0, 0);
21+
RooArgSet* cPars = pc.getSet("cPars");
22+
auto nll = std::make_unique<cacheutils::CachingSimNLL>(this, &data, cPars);
23+
nll->setChannelMasks(this->channelMasks());
2024
#if ROOT_VERSION_CODE < ROOT_VERSION(6,30,0)
2125
return nll.release();
2226
#else

0 commit comments

Comments
 (0)