28#include "XrdOuc/XrdOucEnv.hh"
29#include "XrdOuc/XrdOucStream.hh"
30#include "XrdOuc/XrdOucString.hh"
43 : fCfgFile(fn), fEDest(edest)
69 XPDLOC(ALL,
"Config::ReadFile")
79 TRACE(DBG,
"time of last modification: " << st.st_mtime);
104 XPDLOC(ALL,
"Config::ParseFile")
110 TRACE(DBG,
"config file already parsed ");
115 if (
fgHost.length() <= 0) {
116 char *host = XrdSysDNS::getHostName();
117 fgHost = host ? host :
"";
128 if ((cfgFD = open(cfn, O_RDONLY, 0)) < 0) {
129 TRACE(XERR,
"unable to open : " << cfn);
135 XrdOucStream cfg(
fEDest, getenv(
"XRDINSTANCE"), &myEnv);
139 char *var = 0, *val = 0;
140 while ((var = cfg.GetMyFirstWord())) {
141 if (!(strncmp(
"xpd.", var, 4)) && var[4]) {
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
#define TRACE(Flag, Args)
int SetHostInDirectives(const char *, XrdProofdDirective *d, void *h)
Set host field for directive 'd' to (const char *h)
static char * Expand(char *p)
Expand path 'p' relative to: $HOME if begins with ~/ <user>'s $HOME if begins with ~<user>/ $PWD if d...
bool ReadFile(bool update=true)
Return true if the file has never been read or did change since last reading, false otherwise.
void SetCfgEDest(const char *cfg, XrdSysError *edest)
Set config file and error handler.
XrdOucHash< XrdProofdDirective > fDirectives
XrdProofdConfig(const char *cfg=0, XrdSysError *edest=0)
Main constructor.
static XrdOucString fgHost
int ParseFile(bool rcf=false)
Parse config file for the registered directives.
int DoDirective(char *val, XrdOucStream *cfg, bool reconfig)