Skip to content

Commit fa718af

Browse files
committed
[RF][HS3] Remove dead code
- Remove the file-global 'verbose' flag in JSONFactories_HistFactory that was never set to true, along with its two dead diagnostic blocks. - Remove the unused <mutex> include in JSONIO.cxx. - Remove an unused local and two commented-out lines.
1 parent 2eea2de commit fa718af

4 files changed

Lines changed: 0 additions & 16 deletions

File tree

roofit/hs3/src/JSONFactories_HistFactory.cxx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -973,12 +973,6 @@ void addNormFactor(RooRealVar const *par, Sample &sample, RooWorkspace *ws)
973973
sample.normfactors.emplace_back(*par);
974974
}
975975

976-
namespace {
977-
978-
bool verbose = false;
979-
980-
}
981-
982976
struct Channel {
983977
std::string name;
984978
std::vector<Sample> samples;
@@ -1548,17 +1542,11 @@ bool tryExportHistFactory(RooJSONFactoryWSTool *tool, const std::string &pdfname
15481542
{
15491543
// some preliminary checks
15501544
if (!sumpdf) {
1551-
if (verbose) {
1552-
std::cout << pdfname << " is not a sumpdf" << std::endl;
1553-
}
15541545
return false;
15551546
}
15561547

15571548
for (RooAbsArg *sample : sumpdf->funcList()) {
15581549
if (!dynamic_cast<RooProduct *>(sample) && !dynamic_cast<RooRealSumPdf *>(sample)) {
1559-
if (verbose)
1560-
std::cout << "sample " << sample->GetName() << " is no RooProduct or RooRealSumPdf in " << pdfname
1561-
<< std::endl;
15621550
return false;
15631551
}
15641552
}

roofit/hs3/src/JSONFactories_RooFitCore.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,6 @@ bool exportRealIntegral(RooJSONFactoryWSTool *, const RooAbsArg *func, JSONNode
924924
auto *integral = static_cast<const RooRealIntegral *>(func);
925925
elem["type"] << key;
926926
std::string integrand = integral->integrand().GetName();
927-
// elem["integrand"] << RooJSONFactoryWSTool::sanitizeName(integrand);
928927
elem["integrand"] << integrand;
929928
if (integral->intRange()) {
930929
elem["domain"] << integral->intRange();

roofit/hs3/src/JSONIO.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#include <fstream>
2222
#include <iostream>
23-
#include <mutex>
2423
#include <sstream>
2524

2625
// Include raw strings with initial export and import keys in JSON

roofit/hs3/src/RooJSONFactoryWSTool.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,6 @@ std::string RooJSONFactoryWSTool::exportTransformed(const RooAbsReal *original,
10811081
*/
10821082
void RooJSONFactoryWSTool::exportObject(RooAbsArg const &func, std::set<std::string> &exportedObjectNames)
10831083
{
1084-
// const std::string name = sanitizeName(func.GetName());
10851084
std::string name = func.GetName();
10861085

10871086
// if this element was already exported, skip
@@ -1618,7 +1617,6 @@ void RooJSONFactoryWSTool::exportData(RooAbsData const &data)
16181617
for (int i = 0; i < data.numEntries(); ++i) {
16191618
data.get(i);
16201619
coords.append_child().fill_seq(variables, [](auto x) { return static_cast<RooRealVar *>(x)->getVal(); });
1621-
std::string datasetName = data.GetName();
16221620
if (data.isWeighted()) {
16231621
weightVals.push_back(data.weight());
16241622
if (data.weight() != 1.)

0 commit comments

Comments
 (0)