Skip to content

Commit

Permalink
[RF] Don't support proof anymore in RooFit and RooStats
Browse files Browse the repository at this point in the history
The PROOF interface in RooFit/RooStats didn't work anymore for a long
time, so nobody will be suprised if this is removed.
  • Loading branch information
guitargeek committed Dec 9, 2024
1 parent 2c8521e commit babc8b4
Show file tree
Hide file tree
Showing 25 changed files with 3 additions and 759 deletions.
2 changes: 0 additions & 2 deletions roofit/roofitcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RooFitCore
RooProduct.h
RooProfileLL.h
RooProjectedPdf.h
RooProofDriverSelector.h
RooPullVar.h
RooQuasiRandomGenerator.h
RooRandom.h
Expand Down Expand Up @@ -391,7 +390,6 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RooFitCore
src/RooProduct.cxx
src/RooProfileLL.cxx
src/RooProjectedPdf.cxx
src/RooProofDriverSelector.cxx
src/RooPullVar.cxx
src/RooQuasiRandomGenerator.cxx
src/RooRandom.cxx
Expand Down
1 change: 0 additions & 1 deletion roofit/roofitcore/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@
#pragma link C++ class RooStudyPackage+ ;
#pragma link C++ class RooAbsStudy+ ;
#pragma link C++ class RooGenFitStudy+ ;
#pragma link C++ class RooProofDriverSelector+ ;
#pragma link C++ class RooExtendedBinding+ ;
#pragma link C++ class std::list<RooAbsStudy*>+ ;
#pragma link C++ class std::map<string,RooDataSet*>+ ;
Expand Down
46 changes: 0 additions & 46 deletions roofit/roofitcore/inc/RooProofDriverSelector.h

This file was deleted.

4 changes: 0 additions & 4 deletions roofit/roofitcore/inc/RooStudyManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ class RooStudyManager : public TNamed {
// Interactive running
void run(Int_t nExperiments) ;

// PROOF-based parallel running
void runProof(Int_t nExperiments, const char* proofHost="", bool showGui=true) ;
static void closeProof(Option_t *option = "s") ;

// Batch running
void prepareBatchInput(const char* studyName, Int_t nExpPerJob, bool unifiedInput) ;
void processBatchOutput(const char* filePat) ;
Expand Down
95 changes: 0 additions & 95 deletions roofit/roofitcore/src/RooProofDriverSelector.cxx

This file was deleted.

67 changes: 0 additions & 67 deletions roofit/roofitcore/src/RooStudyManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -89,73 +89,6 @@ void RooStudyManager::run(Int_t nExperiments)
}



////////////////////////////////////////////////////////////////////////////////
/// Open PROOF-Lite session

void RooStudyManager::runProof(Int_t nExperiments, const char* proofHost, bool showGui)
{
coutP(Generation) << "RooStudyManager::runProof(" << GetName() << ") opening PROOF session" << endl ;
void* p = reinterpret_cast<void*>(gROOT->ProcessLineFast(Form("TProof::Open(\"%s\")",proofHost)));

// Check that PROOF initialization actually succeeded
if (p==nullptr) {
coutE(Generation) << "RooStudyManager::runProof(" << GetName() << ") ERROR initializing proof, aborting" << endl ;
return ;
}

// Suppress GUI if so requested
if (!showGui) {
gROOT->ProcessLineFast(Form("((TProof*)0x%zx)->SetProgressDialog(0) ;",reinterpret_cast<size_t>(p))) ;
}

// Propagate workspace to proof nodes
coutP(Generation) << "RooStudyManager::runProof(" << GetName() << ") sending work package to PROOF servers" << endl ;
gROOT->ProcessLineFast(Form("((TProof*)0x%zx)->AddInput((TObject*)0x%zx) ;",reinterpret_cast<size_t>(p),reinterpret_cast<size_t>(_pkg)) ) ;

// Run selector in parallel
coutP(Generation) << "RooStudyManager::runProof(" << GetName() << ") starting PROOF processing of " << nExperiments << " experiments" << endl ;

gROOT->ProcessLineFast(Form("((TProof*)0x%zx)->Process(\"RooProofDriverSelector\",%d) ;",reinterpret_cast<size_t>(p),nExperiments)) ;

// Aggregate results data
coutP(Generation) << "RooStudyManager::runProof(" << GetName() << ") aggregating results data" << endl ;
TList* olist = reinterpret_cast<TList*>(gROOT->ProcessLineFast(Form("((TProof*)0x%zx)->GetOutputList()",reinterpret_cast<size_t>(p))));
aggregateData(olist) ;

// cleaning up
coutP(Generation) << "RooStudyManager::runProof(" << GetName() << ") cleaning up input list" << endl ;
gROOT->ProcessLineFast(Form("((TProof*)0x%zx)->GetInputList()->Remove((TObject*)0x%zx) ;",reinterpret_cast<size_t>(p),reinterpret_cast<size_t>(_pkg)) ) ;

}


////////////////////////////////////////////////////////////////////////////////
/// "Option_t *option" takes the parameters forwarded to gProof->Close(option).
///
/// This function is intended for scripts that run in loops
/// where it is essential to properly close all connections and delete
/// the TProof instance (frees ports).

void RooStudyManager::closeProof(Option_t *option)
{
if (gROOT->GetListOfProofs()->LastIndex() != -1 && gROOT->ProcessLineFast("gProof;"))
{
gROOT->ProcessLineFast(Form("gProof->Close(\"%s\") ;",option)) ;
gROOT->ProcessLineFast("gProof->CloseProgressDialog() ;") ;

// CloseProgressDialog does not do anything when run without GUI. This detects
// whether the proof instance is still there and deletes it if that is the case.
if (gROOT->GetListOfProofs()->LastIndex() != -1 && gROOT->ProcessLineFast("gProof;")) {
gROOT->ProcessLineFast("delete gProof ;") ;
}
} else {
ooccoutI(nullptr,Generation) << "RooStudyManager: No global Proof objects. No connections closed." << endl ;
}
}



////////////////////////////////////////////////////////////////////////////////

void RooStudyManager::prepareBatchInput(const char* studyName, Int_t nExpPerJob, bool unifiedInput=false)
Expand Down
3 changes: 0 additions & 3 deletions roofit/roostats/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RooStats
RooStats/ProfileInspector.h
RooStats/ProfileLikelihoodCalculator.h
RooStats/ProfileLikelihoodTestStat.h
RooStats/ProofConfig.h
RooStats/ProposalFunction.h
RooStats/ProposalHelper.h
RooStats/RatioOfProfiledLikelihoodsTestStat.h
Expand All @@ -74,7 +73,6 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RooStats
RooStats/TestStatSampler.h
RooStats/ToyMCImportanceSampler.h
RooStats/ToyMCSampler.h
RooStats/ToyMCStudy.h
RooStats/UniformProposal.h
RooStats/UpperLimitMCSModule.h
SOURCES
Expand Down Expand Up @@ -122,7 +120,6 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RooStats
src/SPlot.cxx
src/ToyMCImportanceSampler.cxx
src/ToyMCSampler.cxx
src/ToyMCStudy.cxx
src/UniformProposal.cxx
src/UpperLimitMCSModule.cxx
DICTIONARY_OPTIONS
Expand Down
2 changes: 0 additions & 2 deletions roofit/roostats/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
#pragma link C++ class RooStats::TestStatSampler+; // interface, not concrete
#pragma link C++ class RooStats::DebuggingSampler+;
#pragma link C++ class RooStats::ToyMCSampler+;
#pragma link C++ class RooStats::ToyMCStudy+;
#pragma link C++ class RooStats::ProofConfig+;
#pragma link C++ class RooStats::ToyMCImportanceSampler+;
#pragma link C++ class RooStats::ToyMCPayload+;

Expand Down
5 changes: 0 additions & 5 deletions roofit/roostats/inc/RooStats/HypoTestInverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ class HypoTestInverter : public IntervalCalculator {
/// set numerical error in test statistic evaluation (default is zero)
void SetNumErr(double err) { fNumErr = err; }

/// set flag to close proof for every new run
static void SetCloseProof(bool flag);


protected:

/// copy c-tor
Expand All @@ -174,7 +170,6 @@ class HypoTestInverter : public IntervalCalculator {
static double fgCLAccuracy;
static double fgAbsAccuracy;
static double fgRelAccuracy;
static bool fgCloseProof;
static std::string fgAlgo;

// graph, used to compute the limit, not just for plotting!
Expand Down
Loading

0 comments on commit babc8b4

Please sign in to comment.