Logo ROOT   6.08/07
Reference Guide
TProofNodeInfo.h
Go to the documentation of this file.
1 // @(#)root/proof:$Id$
2 // Author: Paul Nilsson 7/12/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, 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_TProofNodeInfo
13 #define ROOT_TProofNodeInfo
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TProofNodeInfo //
19 // //
20 // Implementation of PROOF node info. //
21 // The purpose of this class is to provide a complete node description //
22 // for masters, submasters and workers. //
23 // //
24 //////////////////////////////////////////////////////////////////////////
25 
26 #ifndef ROOT_TObject
27 #include "TObject.h"
28 #endif
29 #ifndef ROOT_TString
30 #include "TString.h"
31 #endif
32 
34 
35 
36 class TProofNodeInfo : public TObject {
37 
38 friend class TProofResourcesStatic;
39 
40 public:
42 
43 private:
44  ENodeType fNodeType; // Distinction between master, submaster and worker
45  TString fName; // Tag of the node (name:port)
46  TString fNodeName; // Name of the node
47  TString fWorkDir; // Working directory
48  TString fOrdinal; // Worker ordinal number
49  TString fImage; // File system image
50  TString fId; // Id number
51  TString fConfig; // Configuration file name [for submasters]
52  TString fMsd; // Msd value [for submasters]
53  Int_t fPort; // Port number
54  Int_t fPerfIndex; // Performance index
55  Int_t fNWrks; // Number of workers (when kSubMaster)
56 
57  void operator=(const TProofNodeInfo &); // idem
58 
59 public:
61  TProofNodeInfo(const char *str);
62  TProofNodeInfo(const TProofNodeInfo &nodeInfo);
64 
65  const char *GetName() const { return fName; }
66  ENodeType GetNodeType() const { return fNodeType; }
67  const TString &GetNodeName() const { return fNodeName; }
68  const TString &GetWorkDir() const { return fWorkDir; }
69  const TString &GetOrdinal() const { return fOrdinal; }
70  const TString &GetImage() const { return fImage; }
71  const TString &GetId() const { return fId; }
72  const TString &GetConfig() const { return fConfig; }
73  const TString &GetMsd() const { return fMsd; }
74  Int_t GetPort() const { return fPort; }
75  Int_t GetPerfIndex() const { return fPerfIndex; }
76  Int_t GetNWrks() const { return fNWrks; }
77 
78  Bool_t IsMaster() const { return (fNodeType == kMaster) ? kTRUE : kFALSE; }
79  Bool_t IsSubMaster() const { return (fNodeType == kSubMaster) ? kTRUE : kFALSE; }
80  Bool_t IsWorker() const { return (fNodeType == kWorker) ? kTRUE : kFALSE; }
81 
82  void SetNodeType(ENodeType nt) { fNodeType = nt; }
83  void SetNWrks(Int_t nw) { fNWrks = nw; }
84 
85  void Assign(const TProofNodeInfo &n);
86 
87  void Print(const Option_t *) const;
88 
89  static ENodeType GetNodeType(const TString &type);
90 
91  ClassDef(TProofNodeInfo,1) // Class describing a PROOF node
92 };
93 
94 #endif
ENodeType GetNodeType() const
const char Option_t
Definition: RtypesCore.h:62
Int_t GetPerfIndex() const
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
const TString & GetImage() const
#define ClassDef(name, id)
Definition: Rtypes.h:254
Bool_t IsMaster() const
void Print(const Option_t *) const
Print the TProofNodeInfo structure.
The purpose of this class is to provide a complete node description for masters, submasters and worke...
const TString & GetNodeName() const
ENodeType fNodeType
Int_t GetNWrks() const
const TString & GetConfig() const
const TString & GetMsd() const
const TString & GetOrdinal() const
const TString & GetId() const
void SetNWrks(Int_t nw)
int type
Definition: TGX11.cxx:120
Mother of all ROOT objects.
Definition: TObject.h:37
The purpose of this class is to provide a standard interface to static config files.
Bool_t IsWorker() const
const TString & GetWorkDir() const
Bool_t IsSubMaster() const
void SetNodeType(ENodeType nt)
const char * GetName() const
Returns name of object.
TProofNodeInfo()
Default constructor.
void Assign(const TProofNodeInfo &n)
Asssign content of node n to this node.
const Bool_t kTRUE
Definition: Rtypes.h:91
const Int_t n
Definition: legend1.C:16
void operator=(const TProofNodeInfo &)
Int_t GetPort() const