Skip to content

Commit b79032e

Browse files
committed
[RF] Remove all RooDirItem::appendToDir calls.
In view of ROOT 7, I studied the effects of RooDirItem-derived classes. Since at least 5 years, RooDataHist, RooDataSet and RooFitResult were calling RooDirItem::appendToDir(this, true). This has no effect, since forceMemoryResident==true. Here, all these calls that don't have any effect are removed to make more obvious that no automatic registration is happening.
1 parent e843149 commit b79032e

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

roofit/roofitcore/src/RooDataHist.cxx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ RooDataHist::RooDataHist(RooStringView name, RooStringView title, const RooArgSe
124124

125125
registerWeightArraysToDataStore();
126126

127-
appendToDir(this,true) ;
128127
TRACE_CREATE;
129128
}
130129

@@ -355,8 +354,6 @@ RooDataHist::RooDataHist(RooStringView name, RooStringView title, const RooArgLi
355354

356355
// Initialize empty
357356
initialize() ;
358-
appendToDir(this,true) ;
359-
360357
}
361358

362359
registerWeightArraysToDataStore();
@@ -378,7 +375,6 @@ void RooDataHist::importTH1(const RooArgList& vars, const TH1& histo, double wgt
378375

379376
// Initialize internal data structure
380377
initialize() ;
381-
appendToDir(this,true) ;
382378

383379
// Define x,y,z as 1st, 2nd and 3rd observable
384380
RooRealVar* xvar = static_cast<RooRealVar*>(_vars.find(vars.at(0)->GetName())) ;
@@ -534,7 +530,6 @@ void RooDataHist::importTH1Set(const RooArgList& vars, RooCategory& indexCat, st
534530
// Initialize internal data structure
535531
if (!init) {
536532
initialize() ;
537-
appendToDir(this,true) ;
538533
init = true ;
539534
}
540535

@@ -644,7 +639,6 @@ void RooDataHist::importDHistSet(const RooArgList & /*vars*/, RooCategory &index
644639
}
645640

646641
initialize();
647-
appendToDir(this, true);
648642

649643
for (const auto &diter : dmap) {
650644
std::string const &label = diter.first;
@@ -904,8 +898,6 @@ RooDataHist::RooDataHist(const RooDataHist& other, const char* newname) :
904898
}
905899

906900
registerWeightArraysToDataStore();
907-
908-
appendToDir(this,true) ;
909901
}
910902

911903

roofit/roofitcore/src/RooDataSet.cxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,6 @@ RooDataSet::RooDataSet(RooStringView name, RooStringView title, const RooArgSet&
374374
}
375375
}
376376

377-
appendToDir(this,true) ;
378-
379377
// Initialize RooDataSet with optional weight variable
380378
initialize(nullptr) ;
381379

@@ -450,8 +448,6 @@ RooDataSet::RooDataSet(RooStringView name, RooStringView title, const RooArgSet&
450448
}
451449
}
452450

453-
appendToDir(this,true) ;
454-
455451
// Initialize RooDataSet with optional weight variable
456452
initialize(wgtVarName);
457453

@@ -523,7 +519,6 @@ RooDataSet::RooDataSet(RooStringView name, RooStringView title, const RooArgSet&
523519
RooDataSet::RooDataSet(RooDataSet const & other, const char* newname) :
524520
RooAbsData(other,newname), RooDirItem()
525521
{
526-
appendToDir(this,true) ;
527522
initialize(other._wgtVar?other._wgtVar->GetName():nullptr);
528523
TRACE_CREATE;
529524
}

roofit/roofitcore/src/RooFitResult.cxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ using std::ostream, std::string, std::pair, std::vector, std::setw;
6363

6464
RooFitResult::RooFitResult(const char *name, const char *title) : TNamed(name, title)
6565
{
66-
if (name)
67-
appendToDir(this, true);
6866
}
6967

7068

@@ -100,9 +98,6 @@ RooFitResult::RooFitResult(const RooFitResult &other)
10098
if (other._VM) _VM = new TMatrixDSym(*other._VM) ;
10199
if (other._CM) _CM = new TMatrixDSym(*other._CM) ;
102100
if (other._GC) _GC = new TVectorD(*other._GC) ;
103-
104-
if (GetName())
105-
appendToDir(this, true);
106101
}
107102

108103

0 commit comments

Comments
 (0)