64 Info(
"TProofResourcesStatic",
"error encountered while reading config file");
134 const char *fileName)
139 const char *p = (
const char *) strstr(fileName,
":");
150 Info(
"ReadConfigFile",
"file %s cannot be read:"
151 " check existence and/or permissions", cf);
152 if (fileName && strlen(fileName) > 0) {
164 Info(
"ReadConfigFile",
"no PROOF config file found");
170 Info(
"ReadConfigFile",
"no PROOF config file specified");
200 for (
Int_t j = 0; j < numberOfLines; j++) {
206 if ( !((
line(0,1) ==
"#") || (line ==
"")) ) {
219 for (
Int_t i = 0; i <
n; i++) {
227 if (keyword ==
"master" || keyword ==
"node") {
232 else if (keyword ==
"submaster") {
260 nodeinfo->
fImage = tmp(equalPosition + 1, tmp.
Length());
263 Error(
"ReadConfigFile",
"Command not recognized: %s (ignored)",
270 const Ssiz_t equalPosition =
275 option = tmp(0, equalPosition);
276 value = tmp(equalPosition + 1, tmp.
Length());
304 else if (isSubmaster) {
314 Error(
"ReadConfigFile",
"No master info found in config file");
334 if (!nodeinfo)
return;
336 if (option ==
"workdir") {
338 }
else if (option ==
"image") {
340 }
else if (option ==
"perf") {
342 }
else if (option ==
"config") {
344 }
else if (option ==
"msd") {
346 }
else if (option ==
"port") {
349 ::Error(
"SetOption",
"No such option [%s=%s]",option.
Data(),value.
Data());
360 if ((word ==
"node") || (word ==
"master") || (word ==
"submaster") ||
361 (word ==
"worker") || (word ==
"slave") ||
362 (word ==
"condorworker") || (word ==
"condorslave")) {
382 nodeInfo->
fPort = -1;
const char * GetHost() const
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
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.
const char * GetHostName() const
static EInfoType GetInfoType(const TString &word)
Static method to determine the info type.
Collectable string class.
ClassImp(TProofResourcesStatic) TProofResourcesStatic
This ctor is used in TProofServ::Setup() in combination with GetWorkDir() for a quick scan of the con...
This class represents a WWW compatible URL.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual ~TProofResourcesStatic()
Destructor.
This class represents an Internet Protocol (IP) address.
virtual const char * HomeDirectory(const char *userName=0)
Return the user's home directory.
TProofNodeInfo * GetMaster()
Get the master node.
const char * Data() const
TList * GetWorkers()
Get the list of worker nodes.
static TString * ReadString(TBuffer &b, const TClass *clReq)
Read TString object from buffer.
virtual const char * Getenv(const char *env)
Get environment variable.
Int_t Atoi() const
Return integer value of string.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.
The purpose of this class is to provide a complete node description for masters, submasters and worke...
TString GetString() const
R__EXTERN TSystem * gSystem
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
TSubString Strip(EStripType s=kTrailing, char c= ' ') const
Return a substring of self stripped at beginning and/or end.
void InitResources()
Create master node info and submaster/worker lists, and set default values.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
virtual const char * HostName()
Return the system's host name.
Int_t GetEntries() const
Return the number of objects in array (i.e.
The purpose of this class is to provide a standard interface to static config files.
virtual void Add(TObject *obj)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
ENodeType GetNodeType() const
static void SetOption(TProofNodeInfo *nodeinfo, const TString &option, const TString &value)
Static method to set the node info options.
void Assign(const TProofNodeInfo &n)
Asssign content of node n to this node.
TObject * At(Int_t idx) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
static TProofNodeInfo * CreateNodeInfo(const TString &name)
Fill out the preliminary TProofNodeInfo structure.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.