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);
59 ~TProofNodeInfo() override { }
60
61 const char *GetName() const override { 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 override;
84
85 static ENodeType GetNodeType(const TString &type);
86
87 ClassDefOverride(TProofNodeInfo,1) // Class describing a PROOF node
88};
89
90#endif
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
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
const TString & GetImage() const
Bool_t IsWorker() const
void SetNWrks(Int_t nw)
~TProofNodeInfo() override
const TString & GetOrdinal() const
const TString & GetConfig() const
const TString & GetWorkDir() const
TProofNodeInfo()
Default constructor.
Bool_t IsMaster() const
void Print(const Option_t *) const override
Print the TProofNodeInfo structure.
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 override
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:139
const Int_t n
Definition legend1.C:16