ROOT logo
// @(#)root/proof:$Id: TProofResourcesStatic.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Paul Nilsson   7/12/2005

/*************************************************************************
 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TProofResourcesStatic
#define ROOT_TProofResourcesStatic

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TProofResourcesStatic                                                //
//                                                                      //
// Implementation of PROOF static resources.                            //
// The purpose of this class is to provide a standard interface to      //
// static config files. It interprets Proof config files (proof.conf)   //
// and sorts the contents into TProofNodeInfo objects. Master info will //
// be placed in fMaster (of type TProofNodeInfo). Submaster info will   //
// be put in fSubmasterList (a TList of TProofNodeInfo objects), while  //
// workers (and condorworkers) will be placed in fWorkerList (a TList   //
// of TProofNodeInfo objects).                                          //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TProofResources
#include "TProofResources.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif

class TList;
class TProofNodeInfo;


class TProofResourcesStatic : public TProofResources {

public:
   enum EInfoType { kNodeType, kOption, kHost };

private:
   TProofNodeInfo *fMaster;           // Master node info
   TList          *fSubmasterList;    // Node info list with all submasters
   TList          *fWorkerList;       // Node info list with all workers
   Bool_t          fFoundMaster;      // kTRUE if config file has master info
   TString         fFileName;         // Config file name

   void             InitResources();
   Bool_t           ReadConfigFile(const char *confDir, const char *fileName);

   static EInfoType GetInfoType(const TString &word);
   static void      SetOption(TProofNodeInfo *nodeinfo, const TString &option,
                              const TString &value);
   static TProofNodeInfo *CreateNodeInfo(const TString &name);

public:
   TProofResourcesStatic();
   TProofResourcesStatic(const char *confDir, const char *fileName);
   virtual ~TProofResourcesStatic();

   TProofNodeInfo *GetMaster();
   TList          *GetSubmasters();
   TList          *GetWorkers();
   TString         GetFileName() const { return fFileName; }

   ClassDef(TProofResourcesStatic,0) // Class to handle PROOF static config
};

#endif

 TProofResourcesStatic.h:1
 TProofResourcesStatic.h:2
 TProofResourcesStatic.h:3
 TProofResourcesStatic.h:4
 TProofResourcesStatic.h:5
 TProofResourcesStatic.h:6
 TProofResourcesStatic.h:7
 TProofResourcesStatic.h:8
 TProofResourcesStatic.h:9
 TProofResourcesStatic.h:10
 TProofResourcesStatic.h:11
 TProofResourcesStatic.h:12
 TProofResourcesStatic.h:13
 TProofResourcesStatic.h:14
 TProofResourcesStatic.h:15
 TProofResourcesStatic.h:16
 TProofResourcesStatic.h:17
 TProofResourcesStatic.h:18
 TProofResourcesStatic.h:19
 TProofResourcesStatic.h:20
 TProofResourcesStatic.h:21
 TProofResourcesStatic.h:22
 TProofResourcesStatic.h:23
 TProofResourcesStatic.h:24
 TProofResourcesStatic.h:25
 TProofResourcesStatic.h:26
 TProofResourcesStatic.h:27
 TProofResourcesStatic.h:28
 TProofResourcesStatic.h:29
 TProofResourcesStatic.h:30
 TProofResourcesStatic.h:31
 TProofResourcesStatic.h:32
 TProofResourcesStatic.h:33
 TProofResourcesStatic.h:34
 TProofResourcesStatic.h:35
 TProofResourcesStatic.h:36
 TProofResourcesStatic.h:37
 TProofResourcesStatic.h:38
 TProofResourcesStatic.h:39
 TProofResourcesStatic.h:40
 TProofResourcesStatic.h:41
 TProofResourcesStatic.h:42
 TProofResourcesStatic.h:43
 TProofResourcesStatic.h:44
 TProofResourcesStatic.h:45
 TProofResourcesStatic.h:46
 TProofResourcesStatic.h:47
 TProofResourcesStatic.h:48
 TProofResourcesStatic.h:49
 TProofResourcesStatic.h:50
 TProofResourcesStatic.h:51
 TProofResourcesStatic.h:52
 TProofResourcesStatic.h:53
 TProofResourcesStatic.h:54
 TProofResourcesStatic.h:55
 TProofResourcesStatic.h:56
 TProofResourcesStatic.h:57
 TProofResourcesStatic.h:58
 TProofResourcesStatic.h:59
 TProofResourcesStatic.h:60
 TProofResourcesStatic.h:61
 TProofResourcesStatic.h:62
 TProofResourcesStatic.h:63
 TProofResourcesStatic.h:64
 TProofResourcesStatic.h:65
 TProofResourcesStatic.h:66
 TProofResourcesStatic.h:67
 TProofResourcesStatic.h:68
 TProofResourcesStatic.h:69
 TProofResourcesStatic.h:70
 TProofResourcesStatic.h:71
 TProofResourcesStatic.h:72
 TProofResourcesStatic.h:73
 TProofResourcesStatic.h:74
 TProofResourcesStatic.h:75