#ifndef ROOT_TGrid
#define ROOT_TGrid
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
#ifndef ROOT_TGridJob
#include "TGridJob.h"
#endif
class TGridResult;
class TGridJDL;
class TGridJob;
class TGridCollection;
class TGridJobStatusList;
class TGrid : public TObject {
protected:
TString fGridUrl;
TString fGrid;
TString fHost;
TString fUser;
TString fPw;
TString fOptions;
Int_t fPort;
public:
TGrid() : fGridUrl(), fGrid(), fHost(), fUser(), fPw(), fOptions(), fPort(-1) { }
virtual ~TGrid() { }
const char *GridUrl() const { return fGridUrl; }
const char *GetGrid() const { return fGrid; }
const char *GetHost() const { return fHost; }
const char *GetUser() const { return fUser; }
const char *GetPw() const { return fPw; }
const char *GetOptions() const { return fOptions; }
Int_t GetPort() const { return fPort; }
virtual Bool_t IsConnected() const { return fPort == -1 ? kFALSE : kTRUE; }
virtual void Shell() { MayNotUse("Shell"); }
virtual void Stdout() { MayNotUse("Stdout"); }
virtual void Stderr() { MayNotUse("Stderr"); }
virtual TGridResult *Command(const char * ,
Bool_t = kFALSE,
UInt_t = 2)
{ MayNotUse("Command"); return 0; }
virtual TGridResult *Query(const char * , const char * ,
const char * = "", const char * = "")
{ MayNotUse("Query"); return 0; }
virtual TGridResult *LocateSites() { MayNotUse("LocalSites"); return 0; }
virtual TGridResult *Ls(const char* ="", Option_t* ="", Bool_t =kFALSE)
{ MayNotUse("Ls"); return 0; }
virtual const char *Pwd(Bool_t =kFALSE)
{ MayNotUse("Pwd"); return 0; }
virtual const char *GetHomeDirectory()
{ MayNotUse("GetHomeDirectory"); return 0; }
virtual Bool_t Cd(const char* ="",Bool_t =kFALSE)
{ MayNotUse("Cd"); return kFALSE; }
virtual Int_t Mkdir(const char* ="", Option_t* ="", Bool_t =kFALSE)
{ MayNotUse("Mkdir"); return kFALSE; }
virtual Bool_t Rmdir(const char* ="", Option_t* ="", Bool_t =kFALSE)
{ MayNotUse("Mkdir"); return kFALSE; }
virtual Bool_t Register(const char* , const char* , Long_t =-1, const char* =0, const char* =0, Bool_t =kFALSE)
{ MayNotUse("Mkdir"); return kFALSE; }
virtual Bool_t Rm(const char* , Option_t* ="", Bool_t =kFALSE)
{ MayNotUse("Mkdir"); return kFALSE; }
virtual TGridJob *Submit(const char * )
{ MayNotUse("Submit"); return 0; }
virtual TGridJDL *GetJDLGenerator()
{ MayNotUse("GetJDLGenerator"); return 0; }
virtual TGridCollection *OpenCollection(const char *, UInt_t = 1000000)
{ MayNotUse("OpenCollection"); return 0; }
virtual TGridCollection *OpenCollectionQuery(TGridResult * ,Bool_t = kFALSE)
{ MayNotUse("OpenCollection"); return 0; }
virtual TGridJobStatusList* Ps(const char* , Bool_t = kTRUE)
{ MayNotUse("Ps"); return 0; }
virtual Bool_t KillById(TString )
{ MayNotUse("KillById"); return kFALSE; }
virtual Bool_t ResubmitById(TString )
{ MayNotUse("ResubmitById"); return 0; }
virtual Bool_t Kill(TGridJob *gridjob)
{ return ((gridjob)?KillById(gridjob->GetJobID()):kFALSE); }
virtual Bool_t Resubmit(TGridJob* gridjob)
{ return ((gridjob)?ResubmitById(gridjob->GetJobID()):kFALSE); }
static TGrid *Connect(const char *grid, const char *uid = 0,
const char *pw = 0, const char *options = 0);
ClassDef(TGrid,0)
};
R__EXTERN TGrid *gGrid;
#endif