00001 // @(#)root/proof:$Id: TProofNodeInfo.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: Paul Nilsson 7/12/2005 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TProofNodeInfo 00013 #define ROOT_TProofNodeInfo 00014 00015 00016 ////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // TProofNodeInfo // 00019 // // 00020 // Implementation of PROOF node info. // 00021 // The purpose of this class is to provide a complete node description // 00022 // for masters, submasters and workers. // 00023 // // 00024 ////////////////////////////////////////////////////////////////////////// 00025 00026 #ifndef ROOT_TObject 00027 #include "TObject.h" 00028 #endif 00029 #ifndef ROOT_TString 00030 #include "TString.h" 00031 #endif 00032 00033 class TProofResourcesStatic; 00034 00035 00036 class TProofNodeInfo : public TObject { 00037 00038 friend class TProofResourcesStatic; 00039 00040 public: 00041 enum ENodeType { kMaster, kSubMaster, kWorker }; 00042 00043 private: 00044 ENodeType fNodeType; // Distinction between master, submaster and worker 00045 TString fNodeName; // Name of the node 00046 TString fWorkDir; // Working directory 00047 TString fOrdinal; // Worker ordinal number 00048 TString fImage; // File system image 00049 TString fId; // Id number 00050 TString fConfig; // Configuration file name [for submasters] 00051 TString fMsd; // Msd value [for submasters] 00052 Int_t fPort; // Port number 00053 Int_t fPerfIndex; // Performance index 00054 00055 public: 00056 TProofNodeInfo(); 00057 TProofNodeInfo(const char *str); 00058 TProofNodeInfo(const TProofNodeInfo &nodeInfo); 00059 ~TProofNodeInfo() { } 00060 00061 ENodeType GetNodeType() const { return fNodeType; } 00062 const TString &GetNodeName() const { return fNodeName; } 00063 const TString &GetWorkDir() const { return fWorkDir; } 00064 const TString &GetOrdinal() const { return fOrdinal; } 00065 const TString &GetImage() const { return fImage; } 00066 const TString &GetId() const { return fId; } 00067 const TString &GetConfig() const { return fConfig; } 00068 const TString &GetMsd() const { return fMsd; } 00069 Int_t GetPort() const { return fPort; } 00070 Int_t GetPerfIndex() const { return fPerfIndex; } 00071 00072 void Assign(const TProofNodeInfo &n); 00073 00074 void Print(const Option_t *) const; 00075 00076 static ENodeType GetNodeType(const TString &type); 00077 00078 ClassDef(TProofNodeInfo,1) // Class describing a PROOF node 00079 }; 00080 00081 #endif