Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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#include "TObject.h"
26#include "TString.h"
27
28
29class TList;
30
31
32//------------------------------------------------------------------------
33
34class TCondorSlave : public TObject {
35public:
43
44 void Print(Option_t *option="") const;
45
46 ClassDef(TCondorSlave,0) // Describes a claimed slave
47};
48
49
50//------------------------------------------------------------------------
51
52class TCondor : public TObject {
53public:
55
56private:
57
58 Bool_t fValid; //access to Condor
59 TString fPool; //the condor pool to be accessed
60 EState fState; //our claim state
61 TList *fClaims; //list of claims we manage
62
63protected:
64 TCondorSlave *ClaimVM(const char *vm, const char *cmd);
65
66public:
67 TCondor(const char *pool = "");
68 virtual ~TCondor();
69
70
71 void Print(Option_t *option="") const;
72 Bool_t IsValid() const { return fValid; }
73
75
76 TList *Claim(Int_t n, const char *cmd);
77 TCondorSlave *Claim(const char *vmname, const char *cmd);
78 Bool_t SetState(EState state);
79 EState GetState() const {return fState;}
81 Bool_t Resume();
83
84 Bool_t GetVmInfo(const char *vm, TString &image, Int_t &perfidx) const;
85 TString GetImage(const char *host) const;
86
87
88 ClassDef(TCondor,0) // Interface to the Condor System
89};
90
91#endif
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:337
Option_t Option_t option
void Print(Option_t *option="") const
Print worker status.
Definition TCondor.cxx:479
Int_t fPerfIdx
Definition TCondor.h:38
TString fClaimID
Definition TCondor.h:40
TString fWorkDir
Definition TCondor.h:42
TString fImage
Definition TCondor.h:39
TString fOrdinal
Definition TCondor.h:41
TString fHostname
Definition TCondor.h:36
Int_t fPort
Definition TCondor.h:37
Bool_t Suspend()
Suspend worker.
Definition TCondor.cxx:329
Bool_t Release()
Release worker.
Definition TCondor.cxx:357
Bool_t Resume()
Resume worker.
Definition TCondor.cxx:343
void Print(Option_t *option="") const
Print master status.
Definition TCondor.cxx:89
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:233
@ kActive
Definition TCondor.h:54
@ kFree
Definition TCondor.h:54
@ kSuspended
Definition TCondor.h:54
TCondorSlave * ClaimVM(const char *vm, const char *cmd)
Claim a VirtualMachine for PROOF usage.
Definition TCondor.cxx:101
EState GetState() const
Definition TCondor.h:79
virtual ~TCondor()
Cleanup Condor interface.
Definition TCondor.cxx:75
Bool_t fValid
Definition TCondor.h:58
TString GetImage(const char *host) const
Get image of the worker.
Definition TCondor.cxx:440
EState fState
Definition TCondor.h:60
Bool_t GetVmInfo(const char *vm, TString &image, Int_t &perfidx) const
Get info about worker status.
Definition TCondor.cxx:401
TList * fClaims
Definition TCondor.h:61
TList * GetVirtualMachines() const
Get the names of the virtual machines in the pool.
Definition TCondor.cxx:194
TString fPool
Definition TCondor.h:59
Bool_t SetState(EState state)
Set the state of workers.
Definition TCondor.cxx:288
Bool_t IsValid() const
Definition TCondor.h:72
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139
const Int_t n
Definition legend1.C:16