ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TCondor.h
Go to the documentation of this file.
1 // @(#)root/proof:$Id$
2 // Author: Maarten Ballintijn 06/12/03
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TCondor
13 #define ROOT_TCondor
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TCondor //
18 // //
19 // Interface to the Condor system. TCondor provides a (partial) API for //
20 // querying and controlling the Condor system, including experimental //
21 // extensions like COD (computing on demand) //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #ifndef ROOT_TObject
26 #include "TObject.h"
27 #endif
28 #ifndef ROOT_TString
29 #include "TString.h"
30 #endif
31 
32 
33 class TList;
34 
35 
36 //------------------------------------------------------------------------
37 
38 class TCondorSlave : public TObject {
39 public:
47 
48  void Print(Option_t *option="") const;
49 
50  ClassDef(TCondorSlave,0) // Describes a claimed slave
51 };
52 
53 
54 //------------------------------------------------------------------------
55 
56 class TCondor : public TObject {
57 public:
59 
60 private:
61 
62  Bool_t fValid; //access to Condor
63  TString fPool; //the condor pool to be accessed
64  EState fState; //our claim state
65  TList *fClaims; //list of claims we manage
66 
67 protected:
68  TCondorSlave *ClaimVM(const char *vm, const char *cmd);
69 
70 public:
71  TCondor(const char *pool = "");
72  virtual ~TCondor();
73 
74 
75  void Print(Option_t *option="") const;
76  Bool_t IsValid() const { return fValid; }
77 
78  TList *GetVirtualMachines() const;
79 
80  TList *Claim(Int_t n, const char *cmd);
81  TCondorSlave *Claim(const char *vmname, const char *cmd);
82  Bool_t SetState(EState state);
83  EState GetState() const {return fState;}
84  Bool_t Suspend();
85  Bool_t Resume();
86  Bool_t Release();
87 
88  Bool_t GetVmInfo(const char *vm, TString &image, Int_t &perfidx) const;
89  TString GetImage(const char *host) const;
90 
91 
92  ClassDef(TCondor,0) // Interface to the Condor System
93 };
94 
95 #endif
Bool_t Release()
Release worker.
Definition: TCondor.cxx:356
Bool_t Suspend()
Suspend worker.
Definition: TCondor.cxx:328
const char Option_t
Definition: RtypesCore.h:62
Bool_t SetState(EState state)
Set the state of workers.
Definition: TCondor.cxx:287
Bool_t GetVmInfo(const char *vm, TString &image, Int_t &perfidx) const
Get info about worker status.
Definition: TCondor.cxx:400
TString fWorkDir
Definition: TCondor.h:46
TList * GetVirtualMachines() const
Get the names of the virtual machines in the pool.
Definition: TCondor.cxx:196
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void Print(Option_t *option="") const
Print master status.
Definition: TCondor.cxx:89
#define ClassDef(name, id)
Definition: Rtypes.h:254
TString fClaimID
Definition: TCondor.h:44
Bool_t IsValid() const
Definition: TCondor.h:76
void Print(Option_t *option="") const
Print worker status.
Definition: TCondor.cxx:478
TList * Claim(Int_t n, const char *cmd)
Claim n virtual machines This function figures out the image and performance index before returning t...
Definition: TCondor.cxx:235
EState
Definition: TCondor.h:58
EState fState
Definition: TCondor.h:64
A doubly linked list.
Definition: TList.h:47
TString fHostname
Definition: TCondor.h:40
virtual ~TCondor()
Cleanup Condor interface.
Definition: TCondor.cxx:75
TString fOrdinal
Definition: TCondor.h:45
TList * fClaims
Definition: TCondor.h:65
TString GetImage(const char *host) const
Get image of the worker.
Definition: TCondor.cxx:439
Bool_t fValid
Definition: TCondor.h:62
Mother of all ROOT objects.
Definition: TObject.h:58
TString fPool
Definition: TCondor.h:63
Int_t fPort
Definition: TCondor.h:41
TCondor(const char *pool="")
EState GetState() const
Definition: TCondor.h:83
TCondorSlave * ClaimVM(const char *vm, const char *cmd)
Claim a VirtualMachine for PROOF usage.
Definition: TCondor.cxx:101
Bool_t Resume()
Resume worker.
Definition: TCondor.cxx:342
const Int_t n
Definition: legend1.C:16
TString fImage
Definition: TCondor.h:43
const char Int_t const char * image
Definition: TXSlave.cxx:46
Int_t fPerfIdx
Definition: TCondor.h:42