Logo ROOT  
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
n
const Int_t n
Definition: legend1.C:16
TProofNodeInfo::IsMaster
Bool_t IsMaster() const
Definition: TProofNodeInfo.h:74
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TProofNodeInfo::GetNWrks
Int_t GetNWrks() const
Definition: TProofNodeInfo.h:72
TProofNodeInfo::fWorkDir
TString fWorkDir
Definition: TProofNodeInfo.h:43
TProofNodeInfo::GetMsd
const TString & GetMsd() const
Definition: TProofNodeInfo.h:69
TProofNodeInfo::fNodeName
TString fNodeName
Definition: TProofNodeInfo.h:42
TProofNodeInfo::GetOrdinal
const TString & GetOrdinal() const
Definition: TProofNodeInfo.h:65
TProofNodeInfo::fPerfIndex
Int_t fPerfIndex
Definition: TProofNodeInfo.h:50
TProofNodeInfo::IsSubMaster
Bool_t IsSubMaster() const
Definition: TProofNodeInfo.h:75
TString
Definition: TString.h:136
TProofNodeInfo::GetWorkDir
const TString & GetWorkDir() const
Definition: TProofNodeInfo.h:64
TString.h
TProofNodeInfo::IsWorker
Bool_t IsWorker() const
Definition: TProofNodeInfo.h:76
TProofNodeInfo
Definition: TProofNodeInfo.h:32
TProofNodeInfo::GetPerfIndex
Int_t GetPerfIndex() const
Definition: TProofNodeInfo.h:71
bool
TProofNodeInfo::fNodeType
ENodeType fNodeType
Definition: TProofNodeInfo.h:40
TProofNodeInfo::GetId
const TString & GetId() const
Definition: TProofNodeInfo.h:67
TProofNodeInfo::GetName
const char * GetName() const
Returns name of object.
Definition: TProofNodeInfo.h:61
TProofNodeInfo::SetNodeType
void SetNodeType(ENodeType nt)
Definition: TProofNodeInfo.h:78
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TProofNodeInfo::kMaster
@ kMaster
Definition: TProofNodeInfo.h:37
TProofNodeInfo::kSubMaster
@ kSubMaster
Definition: TProofNodeInfo.h:37
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TProofNodeInfo::GetImage
const TString & GetImage() const
Definition: TProofNodeInfo.h:66
TProofNodeInfo::fImage
TString fImage
Definition: TProofNodeInfo.h:45
TProofNodeInfo::TProofNodeInfo
TProofNodeInfo()
Default constructor.
Definition: TProofNodeInfo.cxx:27
TProofNodeInfo::GetPort
Int_t GetPort() const
Definition: TProofNodeInfo.h:70
TProofNodeInfo::GetNodeType
ENodeType GetNodeType() const
Definition: TProofNodeInfo.h:62
TProofNodeInfo::fId
TString fId
Definition: TProofNodeInfo.h:46
TProofNodeInfo::operator=
void operator=(const TProofNodeInfo &)
TProofNodeInfo::fMsd
TString fMsd
Definition: TProofNodeInfo.h:48
TObject.h
TObject
Definition: TObject.h:37
TProofNodeInfo::fName
TString fName
Definition: TProofNodeInfo.h:41
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TProofNodeInfo::Print
void Print(const Option_t *) const
Print the TProofNodeInfo structure.
Definition: TProofNodeInfo.cxx:125
TProofNodeInfo::fOrdinal
TString fOrdinal
Definition: TProofNodeInfo.h:44
TProofNodeInfo::~TProofNodeInfo
~TProofNodeInfo()
Definition: TProofNodeInfo.h:59
TProofNodeInfo::kWorker
@ kWorker
Definition: TProofNodeInfo.h:37
TProofNodeInfo::fPort
Int_t fPort
Definition: TProofNodeInfo.h:49
TProofNodeInfo::Assign
void Assign(const TProofNodeInfo &n)
Asssign content of node n to this node.
Definition: TProofNodeInfo.cxx:106
TProofNodeInfo::fNWrks
Int_t fNWrks
Definition: TProofNodeInfo.h:51
TProofNodeInfo::ENodeType
ENodeType
Definition: TProofNodeInfo.h:37
type
int type
Definition: TGX11.cxx:121
ENodeType
ENodeType
Definition: TStructNode.h:18
TProofNodeInfo::SetNWrks
void SetNWrks(Int_t nw)
Definition: TProofNodeInfo.h:79
TProofResourcesStatic
Definition: TProofResourcesStatic.h:37
TProofNodeInfo::fConfig
TString fConfig
Definition: TProofNodeInfo.h:47
TProofNodeInfo::GetConfig
const TString & GetConfig() const
Definition: TProofNodeInfo.h:68
TProofNodeInfo::GetNodeName
const TString & GetNodeName() const
Definition: TProofNodeInfo.h:63
int