Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
32class TProofNodeInfo : public TObject {
33
35
36public:
38
39private:
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
55public:
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
const Bool_t kFALSE
Definition RtypesCore.h:101
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
int type
Definition TGX11.cxx:121
ENodeType
Definition TStructNode.h:18
Mother of all ROOT objects.
Definition TObject.h:41
The purpose of this class is to provide a complete node description for masters, submasters and worke...
const TString & GetMsd() const
void SetNodeType(ENodeType nt)
const TString & GetId() const
Int_t GetNWrks() const
void Print(const Option_t *) const
Print the TProofNodeInfo structure.
const TString & GetImage() const
Bool_t IsWorker() const
void SetNWrks(Int_t nw)
const TString & GetOrdinal() const
const TString & GetConfig() const
const TString & GetWorkDir() const
TProofNodeInfo()
Default constructor.
Bool_t IsMaster() const
ENodeType fNodeType
Int_t GetPerfIndex() const
Bool_t IsSubMaster() const
const TString & GetNodeName() const
void operator=(const TProofNodeInfo &)
Int_t GetPort() const
const char * GetName() const
Returns name of object.
void Assign(const TProofNodeInfo &n)
Asssign content of node n to this node.
ENodeType GetNodeType() const
The purpose of this class is to provide a standard interface to static config files.
Basic string class.
Definition TString.h:136
const Int_t n
Definition legend1.C:16