#ifndef ROOT_TProofMgr
#define ROOT_TProofMgr
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TUrl
#include "TUrl.h"
#endif
class TList;
class TObjString;
class TProof;
class TProofDesc;
class TProofLog;
class TProofMgr;
typedef TProofMgr *(*TProofMgr_t)(const char *, Int_t, const char *);
class TProofMgr : public TNamed {
public:
enum EServType { kProofd = 0, kXProofd = 1 };
private:
static TProofMgr_t fgTXProofMgrHook;
static TProofMgr_t GetXProofMgrHook();
protected:
Int_t fRemoteProtocol;
EServType fServType;
TList *fSessions;
TUrl fUrl;
static TList fgListOfManagers;
TProofMgr() : fRemoteProtocol(-1),
fServType(kXProofd), fSessions(0), fUrl() { }
public:
TProofMgr(const char *url, Int_t loglevel = -1, const char *alias = "");
virtual ~TProofMgr();
virtual Bool_t IsProofd() const { return (fServType == kProofd); }
virtual Bool_t IsValid() const { return kTRUE; }
virtual TProof *AttachSession(Int_t, Bool_t = kFALSE);
virtual TProof *CreateSession(const char * = 0, const char * = 0, Int_t = -1);
virtual void DetachSession(Int_t, Option_t * = "");
virtual TProofDesc *GetProofDesc(Int_t id);
virtual Int_t GetRemoteProtocol() const { return fRemoteProtocol; }
virtual TProofLog *GetSessionLogs(Int_t = 0, const char * = 0)
{ return (TProofLog *)0; }
virtual const char *GetUrl() { return fUrl.GetUrl(); }
virtual Bool_t MatchUrl(const char *url);
virtual TList *QuerySessions(Option_t *opt = "S");
virtual TObjString *ReadBuffer(const char * = 0, Long64_t = 0,
Int_t = 0) { return (TObjString *)0; }
virtual Int_t Reset(const char *usr = 0);
virtual void ShowWorkers();
virtual void SetAlias(const char *alias="") { TNamed::SetTitle(alias); }
virtual void ShutdownSession(Int_t id) { DetachSession(id,"S"); }
virtual void ShutdownSession(TProof *p);
static TList *GetListOfManagers();
static void SetTXProofMgrHook(TProofMgr_t pmh);
static TProofMgr *Create(const char *url, Int_t loglevel = -1,
const char *alias = 0, Bool_t xpd = kTRUE);
ClassDef(TProofMgr,0)
};
class TProofDesc : public TNamed {
public:
enum EStatus { kUnknown = -1, kIdle = 0, kRunning =1, kShutdown = 2};
private:
Int_t fLocalId;
Int_t fStatus;
TProof *fProof;
Int_t fRemoteId;
TString fUrl;
public:
TProofDesc(const char *tag = 0, const char *alias = 0, const char *url = 0,
Int_t id = -1, Int_t remid = -1, Int_t status = kIdle, TProof *p = 0)
: TNamed(tag, alias),
fLocalId(id), fProof(p), fRemoteId(remid), fUrl(url) { SetStatus(status); }
virtual ~TProofDesc() { }
Int_t GetLocalId() const { return fLocalId; }
TProof *GetProof() const { return fProof; }
Int_t GetRemoteId() const { return fRemoteId; }
Int_t GetStatus() const { return fStatus; }
const char *GetUrl() const { return fUrl; }
Bool_t IsIdle() const { return (fStatus == kIdle) ? kTRUE : kFALSE; }
Bool_t IsRunning() const { return (fStatus == kRunning) ? kTRUE : kFALSE; }
Bool_t IsShuttingDown() const { return (fStatus == kShutdown) ? kTRUE : kFALSE; }
Bool_t MatchId(Int_t id) const { return (fLocalId == id); }
void Print(Option_t *opt = "") const;
void SetStatus(Int_t st) { fStatus = (st < kIdle || st > kShutdown) ? -1 : st; }
void SetProof(TProof *p) { fProof = p; }
void SetRemoteId(Int_t id) { fRemoteId = id; }
ClassDef(TProofDesc,1)
};
#endif
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.