ROOT logo
// @(#)root/roostats:$Id: ProofConfig.h 39928 2011-06-24 08:18:59Z moneta $
// Author: Kyle Cranmer and Sven Kreiss  July 2010
/*************************************************************************
 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOSTATS_ProofConfig
#define ROOSTATS_ProofConfig

//_________________________________________________
/*
BEGIN_HTML
<p>
Holds configuration options for proof and proof-lite.

This class will be expanded in the future to hold more specific configuration
options for the tools in RooStats.
</p>


<p>
Access to TProof::Mgr for configuration is still possible as usual
(e.g. to set Root Version to be used on workers). You can do:</p>
<ul>
  <li>TProof::Mgr("my.server.url")->ShowROOTVersions()</li>
  <li>TProof::Mgr("my.server.url")->SetROOTVersion("v5-27-06_dbg")</li>
</ul>

<p>
See doc: http://root.cern.ch/drupal/content/changing-default-root-version
</p>
END_HTML
*/
//

#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif

#include "RooWorkspace.h"
#include "RooStudyManager.h"

namespace RooStats {

class ProofConfig {

   public:
      ProofConfig(RooWorkspace &w, Int_t nExperiments = 8, const char *host = "", Bool_t showGui = kFALSE) :
         fWorkspace(w),
         fNExperiments(nExperiments),
         fHost(host),
         fShowGui(showGui)
      {
      }

      virtual ~ProofConfig() {
         ProofConfig::CloseProof();
      }

      /// close all proof connections
      static void CloseProof(Option_t *option = "s") { RooStudyManager::closeProof(option); }

      // returns fWorkspace
      RooWorkspace& GetWorkspace(void) { return fWorkspace; }
      // returns fHost
      const char* GetHost(void) { return fHost; }
      // return fNExperiments
      Int_t GetNExperiments(void) { return fNExperiments; }
      // return fShowGui
      Bool_t GetShowGui(void) { return fShowGui; }

   protected:
      RooWorkspace& fWorkspace;   // workspace that is to be used with the RooStudyManager
      Int_t fNExperiments;        // number of experiments. This is sometimes called "events" in proof; "experiments" in RooStudyManager.
      const char* fHost;          // Proof hostname. Use empty string (ie "") for proof-lite. Can also handle options like "workers=2" to run on two nodes.
      Bool_t fShowGui;            // Whether to show the Proof Progress window.

   protected:
   ClassDef(ProofConfig,1) // Configuration options for proof.
};
}


#endif
 ProofConfig.h:1
 ProofConfig.h:2
 ProofConfig.h:3
 ProofConfig.h:4
 ProofConfig.h:5
 ProofConfig.h:6
 ProofConfig.h:7
 ProofConfig.h:8
 ProofConfig.h:9
 ProofConfig.h:10
 ProofConfig.h:11
 ProofConfig.h:12
 ProofConfig.h:13
 ProofConfig.h:14
 ProofConfig.h:15
 ProofConfig.h:16
 ProofConfig.h:17
 ProofConfig.h:18
 ProofConfig.h:19
 ProofConfig.h:20
 ProofConfig.h:21
 ProofConfig.h:22
 ProofConfig.h:23
 ProofConfig.h:24
 ProofConfig.h:25
 ProofConfig.h:26
 ProofConfig.h:27
 ProofConfig.h:28
 ProofConfig.h:29
 ProofConfig.h:30
 ProofConfig.h:31
 ProofConfig.h:32
 ProofConfig.h:33
 ProofConfig.h:34
 ProofConfig.h:35
 ProofConfig.h:36
 ProofConfig.h:37
 ProofConfig.h:38
 ProofConfig.h:39
 ProofConfig.h:40
 ProofConfig.h:41
 ProofConfig.h:42
 ProofConfig.h:43
 ProofConfig.h:44
 ProofConfig.h:45
 ProofConfig.h:46
 ProofConfig.h:47
 ProofConfig.h:48
 ProofConfig.h:49
 ProofConfig.h:50
 ProofConfig.h:51
 ProofConfig.h:52
 ProofConfig.h:53
 ProofConfig.h:54
 ProofConfig.h:55
 ProofConfig.h:56
 ProofConfig.h:57
 ProofConfig.h:58
 ProofConfig.h:59
 ProofConfig.h:60
 ProofConfig.h:61
 ProofConfig.h:62
 ProofConfig.h:63
 ProofConfig.h:64
 ProofConfig.h:65
 ProofConfig.h:66
 ProofConfig.h:67
 ProofConfig.h:68
 ProofConfig.h:69
 ProofConfig.h:70
 ProofConfig.h:71
 ProofConfig.h:72
 ProofConfig.h:73
 ProofConfig.h:74
 ProofConfig.h:75
 ProofConfig.h:76
 ProofConfig.h:77
 ProofConfig.h:78
 ProofConfig.h:79
 ProofConfig.h:80
 ProofConfig.h:81
 ProofConfig.h:82
 ProofConfig.h:83
 ProofConfig.h:84
 ProofConfig.h:85
 ProofConfig.h:86
 ProofConfig.h:87
 ProofConfig.h:88