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");
179 if (infile.is_open()) {
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") {
345 nodeinfo->
fMsd = value;
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;
R__EXTERN TSystem * gSystem
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
This class represents an Internet Protocol (IP) address.
const char * GetHostName() const
virtual void Add(TObject *obj)
Int_t GetEntries() const
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const
Collectable string class.
const TString & GetString() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
The purpose of this class is to provide a complete node description for masters, submasters and worke...
void Assign(const TProofNodeInfo &n)
Asssign content of node n to this node.
ENodeType GetNodeType() const
The purpose of this class is to provide a standard interface to static config files.
virtual ~TProofResourcesStatic()
Destructor.
static void SetOption(TProofNodeInfo *nodeinfo, const TString &option, const TString &value)
Static method to set the node info options.
static TProofNodeInfo * CreateNodeInfo(const TString &name)
Fill out the preliminary TProofNodeInfo structure.
TProofNodeInfo * GetMaster()
Get the master node.
TList * GetSubmasters()
Get the list of submaster nodes.
TProofResourcesStatic()
This ctor is used in TProofServ::Setup() in combination with GetWorkDir() for a quick scan of the con...
static EInfoType GetInfoType(const TString &word)
Static method to determine the info type.
TList * GetWorkers()
Get the list of worker nodes.
void InitResources()
Create master node info and submaster/worker lists, and set default values.
Bool_t ReadConfigFile(const char *confDir, const char *fileName)
Read the PROOF config file and fill the master and worker list.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
Int_t Atoi() const
Return integer value of string.
const char * Data() const
static TString * ReadString(TBuffer &b, const TClass *clReq)
Read TString object from buffer.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual const char * Getenv(const char *env)
Get environment variable.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual const char * HostName()
Return the system's host name.
virtual TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.
virtual const char * HomeDirectory(const char *userName=nullptr)
Return the user's home directory.
This class represents a WWW compatible URL.
const char * GetHost() const