66 Info(
"TProofResourcesStatic",
"error encountered while reading config file");
136 const char *fileName)
141 const char *p = (
const char *) strstr(fileName,
":");
152 Info(
"ReadConfigFile",
"file %s cannot be read:"
153 " check existence and/or permissions", cf);
154 if (fileName && strlen(fileName) > 0) {
166 Info(
"ReadConfigFile",
"no PROOF config file found");
172 Info(
"ReadConfigFile",
"no PROOF config file specified");
181 if (infile.is_open()) {
202 for (
Int_t j = 0; j < numberOfLines; j++) {
208 if ( !((
line(0,1) ==
"#") || (line ==
"")) ) {
221 for (
Int_t i = 0; i <
n; i++) {
229 if (keyword ==
"master" || keyword ==
"node") {
234 else if (keyword ==
"submaster") {
262 nodeinfo->
fImage = tmp(equalPosition + 1, tmp.
Length());
265 Error(
"ReadConfigFile",
"Command not recognized: %s (ignored)",
272 const Ssiz_t equalPosition =
277 option = tmp(0, equalPosition);
278 value = tmp(equalPosition + 1, tmp.
Length());
306 else if (isSubmaster) {
316 Error(
"ReadConfigFile",
"No master info found in config file");
336 if (!nodeinfo)
return;
338 if (option ==
"workdir") {
340 }
else if (option ==
"image") {
342 }
else if (option ==
"perf") {
344 }
else if (option ==
"config") {
346 }
else if (option ==
"msd") {
348 }
else if (option ==
"port") {
351 ::Error(
"SetOption",
"No such option [%s=%s]",option.
Data(),value.
Data());
362 if ((word ==
"node") || (word ==
"master") || (word ==
"submaster") ||
363 (word ==
"worker") || (word ==
"slave") ||
364 (word ==
"condorworker") || (word ==
"condorslave")) {
384 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.
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.
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.