Logo ROOT   6.12/07
Reference Guide
TProofResourcesStatic.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_TProofResourcesStatic
13 #define ROOT_TProofResourcesStatic
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TProofResourcesStatic //
18 // //
19 // Implementation of PROOF static resources. //
20 // The purpose of this class is to provide a standard interface to //
21 // static config files. It interprets Proof config files (proof.conf) //
22 // and sorts the contents into TProofNodeInfo objects. Master info will //
23 // be placed in fMaster (of type TProofNodeInfo). Submaster info will //
24 // be put in fSubmasterList (a TList of TProofNodeInfo objects), while //
25 // workers (and condorworkers) will be placed in fWorkerList (a TList //
26 // of TProofNodeInfo objects). //
27 // //
28 //////////////////////////////////////////////////////////////////////////
29 
30 #include "TProofResources.h"
31 #include "TString.h"
32 
33 class TList;
34 class TProofNodeInfo;
35 
36 
38 
39 public:
41 
42 private:
43  TProofNodeInfo *fMaster; // Master node info
44  TList *fSubmasterList; // Node info list with all submasters
45  TList *fWorkerList; // Node info list with all workers
46  Bool_t fFoundMaster; // kTRUE if config file has master info
47  TString fFileName; // Config file name
48 
49  void InitResources();
50  Bool_t ReadConfigFile(const char *confDir, const char *fileName);
51 
52  static EInfoType GetInfoType(const TString &word);
53  static void SetOption(TProofNodeInfo *nodeinfo, const TString &option,
54  const TString &value);
55  static TProofNodeInfo *CreateNodeInfo(const TString &name);
56 
57 public:
59  TProofResourcesStatic(const char *confDir, const char *fileName);
60  virtual ~TProofResourcesStatic();
61 
64  TList *GetWorkers();
65  TString GetFileName() const { return fFileName; }
66 
67  ClassDef(TProofResourcesStatic,0) // Class to handle PROOF static config
68 };
69 
70 #endif
71 
Bool_t ReadConfigFile(const char *confDir, const char *fileName)
Read the PROOF config file and fill the master and worker list.
TList * GetSubmasters()
Get the list of submaster nodes.
static EInfoType GetInfoType(const TString &word)
Static method to determine the info type.
virtual ~TProofResourcesStatic()
Destructor.
Basic string class.
Definition: TString.h:125
bool Bool_t
Definition: RtypesCore.h:59
TProofResourcesStatic()
This ctor is used in TProofServ::Setup() in combination with GetWorkDir() for a quick scan of the con...
TProofNodeInfo * GetMaster()
Get the master node.
TList * GetWorkers()
Get the list of worker nodes.
#define ClassDef(name, id)
Definition: Rtypes.h:320
A doubly linked list.
Definition: TList.h:44
The purpose of this class is to provide a complete node description for masters, submasters and worke...
void InitResources()
Create master node info and submaster/worker lists, and set default values.
The purpose of this class is to provide a standard interface to static config files.
static void SetOption(TProofNodeInfo *nodeinfo, const TString &option, const TString &value)
Static method to set the node info options.
static TProofNodeInfo * CreateNodeInfo(const TString &name)
Fill out the preliminary TProofNodeInfo structure.
char name[80]
Definition: TGX11.cxx:109