Skip to content

Commit e4ae05e

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

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/RooSimultaneousOpt.cc

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

0 commit comments

Comments
 (0)