ROOT  6.06/09
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 #ifndef ROOT_TProofResources
31 #include "TProofResources.h"
32 #endif
33 #ifndef ROOT_TString
34 #include "TString.h"
35 #endif
36 
37 class TList;
38 class TProofNodeInfo;
39 
40 
42 
43 public:
45 
46 private:
47  TProofNodeInfo *fMaster; // Master node info
48  TList *fSubmasterList; // Node info list with all submasters
49  TList *fWorkerList; // Node info list with all workers
50  Bool_t fFoundMaster; // kTRUE if config file has master info
51  TString fFileName; // Config file name
52 
53  void InitResources();
54  Bool_t ReadConfigFile(const char *confDir, const char *fileName);
55 
56  static EInfoType GetInfoType(const TString &word);
57  static void SetOption(TProofNodeInfo *nodeinfo, const TString &option,
58  const TString &value);
59  static TProofNodeInfo *CreateNodeInfo(const TString &name);
60 
61 public:
63  TProofResourcesStatic(const char *confDir, const char *fileName);
64  virtual ~TProofResourcesStatic();
65 
68  TList *GetWorkers();
69  TString GetFileName() const { return fFileName; }
70 
71  ClassDef(TProofResourcesStatic,0) // Class to handle PROOF static config
72 };
73 
74 #endif
75 
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:137
bool Bool_t
Definition: RtypesCore.h:59
TProofNodeInfo * GetMaster()
Get the master node.
TList * GetWorkers()
Get the list of worker nodes.
#define ClassDef(name, id)
Definition: Rtypes.h:254
A doubly linked list.
Definition: TList.h:47
void InitResources()
Create master node info and submaster/worker lists, and set default values.
TString GetFileName() const
#define name(a, b)
Definition: linkTestLib0.cpp:5
static void SetOption(TProofNodeInfo *nodeinfo, const TString &option, const TString &value)
Static method to set the node info options.
float value
Definition: math.cpp:443
static TProofNodeInfo * CreateNodeInfo(const TString &name)
Fill out the preliminary TProofNodeInfo structure.