TProofResourcesStatic.h

Go to the documentation of this file.
00001 // @(#)root/proof:$Id: TProofResourcesStatic.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_TProofResourcesStatic
00013 #define ROOT_TProofResourcesStatic
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TProofResourcesStatic                                                //
00018 //                                                                      //
00019 // Implementation of PROOF static resources.                            //
00020 // The purpose of this class is to provide a standard interface to      //
00021 // static config files. It interprets Proof config files (proof.conf)   //
00022 // and sorts the contents into TProofNodeInfo objects. Master info will //
00023 // be placed in fMaster (of type TProofNodeInfo). Submaster info will   //
00024 // be put in fSubmasterList (a TList of TProofNodeInfo objects), while  //
00025 // workers (and condorworkers) will be placed in fWorkerList (a TList   //
00026 // of TProofNodeInfo objects).                                          //
00027 //                                                                      //
00028 //////////////////////////////////////////////////////////////////////////
00029 
00030 #ifndef ROOT_TProofResources
00031 #include "TProofResources.h"
00032 #endif
00033 #ifndef ROOT_TString
00034 #include "TString.h"
00035 #endif
00036 
00037 class TList;
00038 class TProofNodeInfo;
00039 
00040 
00041 class TProofResourcesStatic : public TProofResources {
00042 
00043 public:
00044    enum EInfoType { kNodeType, kOption, kHost };
00045 
00046 private:
00047    TProofNodeInfo *fMaster;           // Master node info
00048    TList          *fSubmasterList;    // Node info list with all submasters
00049    TList          *fWorkerList;       // Node info list with all workers
00050    Bool_t          fFoundMaster;      // kTRUE if config file has master info
00051    TString         fFileName;         // Config file name
00052 
00053    void             InitResources();
00054    Bool_t           ReadConfigFile(const char *confDir, const char *fileName);
00055 
00056    static EInfoType GetInfoType(const TString &word);
00057    static void      SetOption(TProofNodeInfo *nodeinfo, const TString &option,
00058                               const TString &value);
00059    static TProofNodeInfo *CreateNodeInfo(const TString &name);
00060 
00061 public:
00062    TProofResourcesStatic();
00063    TProofResourcesStatic(const char *confDir, const char *fileName);
00064    virtual ~TProofResourcesStatic();
00065 
00066    TProofNodeInfo *GetMaster();
00067    TList          *GetSubmasters();
00068    TList          *GetWorkers();
00069    TString         GetFileName() const { return fFileName; }
00070 
00071    ClassDef(TProofResourcesStatic,0) // Class to handle PROOF static config
00072 };
00073 
00074 #endif
00075 

Generated on Tue Jul 5 14:28:03 2011 for ROOT_528-00b_version by  doxygen 1.5.1