ROOT logo
// @(#)root/proof:$Id: TCondor.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Maarten Ballintijn   06/12/03

/*************************************************************************
 * Copyright (C) 1995-2003, 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 ROOT_TCondor
#define ROOT_TCondor

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TCondor                                                              //
//                                                                      //
// Interface to the Condor system. TCondor provides a (partial) API for //
// querying and controlling the Condor system, including experimental   //
// extensions like COD (computing on demand)                            //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif


class TList;


//------------------------------------------------------------------------

class TCondorSlave : public TObject {
public:
   TString  fHostname;
   Int_t    fPort;
   Int_t    fPerfIdx;
   TString  fImage;
   TString  fClaimID;
   TString  fOrdinal;
   TString  fWorkDir;

   void        Print(Option_t *option="") const;

   ClassDef(TCondorSlave,0)  // Describes a claimed slave
};


//------------------------------------------------------------------------

class TCondor : public TObject {
public:
   enum EState { kFree, kSuspended, kActive };

private:

   Bool_t   fValid;     //access to Condor
   TString  fPool;      //the condor pool to be accessed
   EState   fState;     //our claim state
   TList   *fClaims;    //list of claims we manage

protected:
   TCondorSlave  *ClaimVM(const char *vm, const char *cmd);

public:
   TCondor(const char *pool = "");
   virtual ~TCondor();


   void           Print(Option_t *option="") const;
   Bool_t         IsValid() const { return fValid; }

   TList         *GetVirtualMachines() const;

   TList         *Claim(Int_t n, const char *cmd);
   TCondorSlave  *Claim(const char *vmname, const char *cmd);
   Bool_t         SetState(EState state);
   EState         GetState() const {return fState;}
   Bool_t         Suspend();
   Bool_t         Resume();
   Bool_t         Release();

   Bool_t         GetVmInfo(const char *vm, TString &image, Int_t &perfidx) const;
   TString        GetImage(const char *host) const;


   ClassDef(TCondor,0)  // Interface to the Condor System
};

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