Logo ROOT   6.10/09
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 #include "TObject.h"
27 #include "TString.h"
28 
30 
31 
32 class TProofNodeInfo : public TObject {
33 
34 friend class TProofResourcesStatic;
35 
36 public:
38 
39 private:
40  ENodeType fNodeType; // Distinction between master, submaster and worker
41  TString fName; // Tag of the node (name:port)
42  TString fNodeName; // Name of the node
43  TString fWorkDir; // Working directory
44  TString fOrdinal; // Worker ordinal number
45  TString fImage; // File system image
46  TString fId; // Id number
47  TString fConfig; // Configuration file name [for submasters]
48  TString fMsd; // Msd value [for submasters]
49  Int_t fPort; // Port number
50  Int_t fPerfIndex; // Performance index
51  Int_t fNWrks; // Number of workers (when kSubMaster)
52 
53  void operator=(const TProofNodeInfo &); // idem
54 
55 public:
57  TProofNodeInfo(const char *str);
58  TProofNodeInfo(const TProofNodeInfo &nodeInfo);
60 
61  const char *GetName() const { return fName; }
62  ENodeType GetNodeType() const { return fNodeType; }
63  const TString &GetNodeName() const { return fNodeName; }
64  const TString &GetWorkDir() const { return fWorkDir; }
65  const TString &GetOrdinal() const { return fOrdinal; }
66  const TString &GetImage() const { return fImage; }
67  const TString &GetId() const { return fId; }
68  const TString &GetConfig() const { return fConfig; }
69  const TString &GetMsd() const { return fMsd; }
70  Int_t GetPort() const { return fPort; }
71  Int_t GetPerfIndex() const { return fPerfIndex; }
72  Int_t GetNWrks() const { return fNWrks; }
73 
74  Bool_t IsMaster() const { return (fNodeType == kMaster) ? kTRUE : kFALSE; }
75  Bool_t IsSubMaster() const { return (fNodeType == kSubMaster) ? kTRUE : kFALSE; }
76  Bool_t IsWorker() const { return (fNodeType == kWorker) ? kTRUE : kFALSE; }
77 
78  void SetNodeType(ENodeType nt) { fNodeType = nt; }
79  void SetNWrks(Int_t nw) { fNWrks = nw; }
80 
81  void Assign(const TProofNodeInfo &n);
82 
83  void Print(const Option_t *) const;
84 
85  static ENodeType GetNodeType(const TString &type);
86 
87  ClassDef(TProofNodeInfo,1) // Class describing a PROOF node
88 };
89 
90 #endif
ENodeType GetNodeType() const
const char Option_t
Definition: RtypesCore.h:62
Int_t GetPerfIndex() const
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const TString & GetImage() const
#define ClassDef(name, id)
Definition: Rtypes.h:297
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 Bool_t kFALSE
Definition: RtypesCore.h:92
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: RtypesCore.h:91
const Int_t n
Definition: legend1.C:16
void operator=(const TProofNodeInfo &)
Int_t GetPort() const