diff --git a/proof/proof/src/TProof.cxx b/proof/proof/src/TProof.cxx index e28601cd7064a6958624b02a71346b61d1b810be..ccf9b06dc484214d8eed881603c851d6bc8e83f9 100644 --- a/proof/proof/src/TProof.cxx +++ b/proof/proof/src/TProof.cxx @@ -5305,6 +5305,13 @@ Long64_t TProof::Process(TDSet *dset, const char *selector, Option_t *option, // Finalise output file settings (opt is ignored in here) if (HandleOutputOptions(opt, outfile, 1) != 0) return -1; + // Retrieve status from the output list + if (rv >= 0) { + TParameter<Long64_t> *sst = + (TParameter<Long64_t> *) fOutputList.FindObject("PROOF_SelectorStatus"); + if (sst) rv = sst->GetVal(); + } + if (fSync) { // reactivate the default application interrupt handler if (sh) @@ -5627,6 +5634,7 @@ Long64_t TProof::Process(const char *dsetname, const char *selector, } else { delete dset; } + return retval; } diff --git a/proof/proof/src/TProofLite.cxx b/proof/proof/src/TProofLite.cxx index 3b3053b70a90bbe28ad638101bcdba9f20dbd151..8d006adefd0bd8de32666e038af1cbb90e499f08 100644 --- a/proof/proof/src/TProofLite.cxx +++ b/proof/proof/src/TProofLite.cxx @@ -40,6 +40,7 @@ #include "TPluginManager.h" #include "TDataSetManager.h" #include "TDataSetManagerFile.h" +#include "TParameter.h" #include "TPRegexp.h" #include "TProofQueryResult.h" #include "TProofServ.h" @@ -1408,6 +1409,14 @@ Long64_t TProofLite::Process(TDSet *dset, const char *selector, Option_t *option // Finalise output file settings (opt is ignored in here) if (HandleOutputOptions(opt, outfile, 1) != 0) return -1; + // Retrieve status from the output list + if (rv >= 0) { + TParameter<Long64_t> *sst = + (TParameter<Long64_t> *) fOutputList.FindObject("PROOF_SelectorStatus"); + if (sst) rv = sst->GetVal(); + } + + // Done return rv; } diff --git a/proof/proofplayer/src/TProofPlayer.cxx b/proof/proofplayer/src/TProofPlayer.cxx index cdc5de5594b1c48cf0ef75f48f14ae8789a4ca51..735c9ad86a5af6db0cfead993fbfc49827999ae1 100644 --- a/proof/proofplayer/src/TProofPlayer.cxx +++ b/proof/proofplayer/src/TProofPlayer.cxx @@ -1470,6 +1470,11 @@ Long64_t TProofPlayer::Process(TDSet *dset, const char *selector_file, } } } + + // Add Selector status in the output list so it can be returned to the client as done + // by Tree::Process (see ROOT-748). The status from the various workers will be added. + fOutput->Add(new TParameter<Long64_t>("PROOF_SelectorStatus", (Long64_t) fSelector->GetStatus())); + if (gProofServ && !gProofServ->IsParallel()) { // put all the canvases onto the output list TIter nxc(gROOT->GetListOfCanvases()); while (TObject *c = nxc())