Dear ROOT experts,
I am trying to write a code to dump toys in Roostats in the limit configurations,
I get a crash on lxplus. I must certainly be doing something stupid, but cannot
find what 
A few lines of code copied here:
//
// 2) Test statistics definition
//
RooStats::ProfileLikelihoodTestStat profll(*mc->GetPdf());
profll.SetOneSided(1);
profll.SetReuseNLL(false);
//
// 3) Defines the calculator (asymptotic)
//
RooStats::FrequentistCalculator* hypoCalc = new RooStats::FrequentistCalculator(*data,*mcbOnly, *mc);
hypoCalc -> SetToys(m_nToys,m_nToys/10.);// null toys, alt toys
RooStats::ToyMCSampler *toymcs = (RooStats::ToyMCSampler*)hypoCalc->GetTestStatSampler();
toymcs->SetTestStatistic(testStat);
if(m_nWorkers>0) {
RooStats::ProofConfig pc(*ws, m_nWorkers, "", false);
toymcs->SetProofConfig(&pc); // enable proof
}
//
// 4) Uses the HypoTestInverter class to get the confidence interval
//
RooStats::HypoTestInverter calc(*hypoCalc);
calc.SetVerbose(0);
calc.SetConfidenceLevel(0.95);
calc.UseCLs(true);
if(m_poi_scanN>-1)calc.SetFixedScan(m_poi_scanN,m_poi_scanMin,m_poi_scanMax);
//
// 5) Save the limit result into the HypoTestInverterResult object
//
m_pHTIR = calc.GetInterval();
Here is the crash I get when using PROOF (m_nWorkers = 4).
===========================================================
There was a crash.
This is the entire stack trace of all threads:
#0 0x00007f3521b1a65e in waitpid () from /lib64/libc.so.6
#1 0x00007f3521aac609 in do_system () from /lib64/libc.so.6
#2 0x00007f3526de8c5a in TUnixSystem::StackTrace() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libCore.so
#3 0x00007f3526deac2c in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libCore.so
#4
#5 0x00007f3526d3fd6e in TObject::TObject(TObject const&) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libCore.so
#6 0x00007f3526d1e543 in TNamed::TNamed(TNamed const&) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libCore.so
#7 0x00007f3522fa75f1 in RooWorkspace::RooWorkspace(RooWorkspace const&) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libRooFitCore.so
#8 0x00007f35239221ef in RooStats::ToyMCSampler::GetSamplingDistributions(RooArgSet&) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libRooStats.so
#9 0x00007f352394771b in RooStats::HypoTestCalculatorGeneric::GetHypoTest() const () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libRooStats.so
#10 0x00007f35238bc219 in RooStats::HypoTestInverter::Eval(RooStats::HypoTestCalculatorGeneric&, bool, double) const () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libRooStats.so
#11 0x00007f35238bd24c in RooStats::HypoTestInverter::RunOnePoint(double, bool, double) const () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libRooStats.so
#12 0x00007f35238bde14 in RooStats::HypoTestInverter::RunFixedScan(int, double, double, bool) const () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libRooStats.so
#13 0x00007f35238c070e in RooStats::HypoTestInverter::GetInterval() const () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.14-x86_64-slc6-gcc49-opt/lib/libRooStats.so
#14 0x00000000004092b4 in LimitFrequentist::GetLimit(RooWorkspace*, RooStats::ModelConfig*, RooDataSet*, RooRealVar*) ()
#15 0x0000000000406ca7 in LimitManager::GetLimit() ()
#16 0x0000000000406047 in main ()
I use ROOT 6.4.14 (and it seems to be the case for various ROOT version I tested).
Is there anything I should setup when wanting to use PROOF ?
Thanks,
Best,
Loïc
Unfortunately, I get the same crashes using 6.06.06