22#include "RConfigure.h"
48#if (defined(__FreeBSD__) && (__FreeBSD__ < 4)) || \
49 (defined(__APPLE__) && (!defined(MAC_OS_X_VERSION_10_3) || \
50 (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3)))
52#define lockf(fd, op, sz) flock((fd), (op))
54#define F_LOCK (LOCK_EX | LOCK_NB)
57#define F_ULOCK LOCK_UN
89#include "compiledata.h"
128static const char *__crashreporter_info__ = 0;
129asm(
".desc ___crashreporter_info__, 0x10");
167 Printf(
"Received SIGTERM: terminating");
259 Error(
"TProofServLogHandler",
"executing command in pipe");
263 Error(
"TProofServLogHandler",
264 "undefined command (%p) or socket (%p)", (
int *)cmd, s);
282 Error(
"TProofServLogHandler",
"undefined file (%p) or socket (%p)",
f, s);
295 fgCmdRtn = WIFEXITED(rc) ? WEXITSTATUS(rc) : -1;
313 if ((plf = strchr(
line,
'\n')))
363 Error(
"TProofServLogHandlerGuard",
"invalid handler");
367 Error(
"TProofServLogHandlerGuard",
"undefined command");
383 Error(
"TProofServLogHandlerGuard",
"invalid handler");
387 Error(
"TProofServLogHandlerGuard",
"undefined file");
421 printf(
"TShutdownTimer::Notify: checking activity on the input socket\n");
431 printf(
"TShutdownTimer::Notify: input socket: %p: did not show any activity"
432 " during the last %d mins: aborting\n", xs,
fTimeout);
438 printf(
"TShutdownTimer::Notify: input socket: %p: show activity"
439 " %ld secs ago\n", xs, dt / 60000);
469 spid.
Form(
"%d", pid);
489 pid = waitpid(
p->GetVal(), &status, WNOHANG);
490 }
while (pid < 0 && errno == EINTR);
493 pid = _cwait(&status, (intptr_t)
p->GetVal(), 0);
495 if (pid > 0 && pid ==
p->GetVal()) {
519 Info (
"Notify",
"session idle for more then %lld secs: terminating",
Long64_t(
fTime)/1000);
525 Warning(
"Notify",
"problems updating session status (errno: %d)", -uss_rc);
529 msg.
Form(
"\n//\n// PROOF session at %s (%s) terminated because idle for more than %lld secs\n"
530 "// Please IGNORE any error message possibly displayed below\n//",
533 msg.
Form(
"\n//\n// PROOF session at %s (%s) terminated because idle for more than %lld secs\n//",
541 Warning(
"Notify",
"fProofServ undefined!");
568 Printf(
"proofserv: command line testing: OK");
580 if (fgVirtMemMax < 0 && gSystem->Getenv(
"PROOF_VIRTMEMMAX")) {
582 if (mmx < kMaxLong && mmx > 0)
586 if (fgVirtMemMax < 0 && gSystem->Getenv(
"ROOTPROOFASHARD")) {
588 if (mmx < kMaxLong && mmx > 0)
593 if (fgResMemMax < 0 && gSystem->Getenv(
"PROOF_RESMEMMAX")) {
595 if (mmx < kMaxLong && mmx > 0)
603 Warning(
"TProofServ",
"requested memory fraction threshold to stop processing"
604 " (MemStop) out of range [0,1] - ignoring");
608 Warning(
"TProofServ",
"requested memory fraction threshold for warning and finer monitoring"
609 " (MemHWM) out of range [0,MemStop] - ignoring");
623 if (argc && *argc >= 4)
624 if (!strcmp(argv[3],
"test"))
628 if (argc && *argc < 2) {
629 Error(
"TProofServ",
"Must have at least 1 arguments (see proofd).");
737 Warning(
"TProofServ",
"bad formatted log file size limit ignored: '%s'", logmx.
Data());
757 char c = (slog[0] ==
'M' || slog[0] ==
'm') ?
'm' :
'a';
758 c = (slog[0] ==
'W' || slog[0] ==
'w') ?
'w' :
c;
765 Warning(
"TProofServ",
"request for syslog logging ineffective!");
780 if (enableSchemaEvolution) {
783 Info(
"TProofServ",
"automatic schema evolution in TMessage explicitly disabled");
796 if (opensock.
Length() <= 0)
800 Fatal(
"CreateServer",
"Invalid socket descriptor number (%d)", sock);
824 Info(
"CreateServer",
"Service %s ConfDir %s IsMaster %d\n",
911 TString master =
"proof://__master__";
915 master +=
a.GetPort();
921 Error(
"CreateServer",
"no plugin manager found");
930 Error(
"CreateServer",
"no plugin found for TProof with a"
938 if (
h->LoadPlugin() == -1) {
939 Error(
"CreateServer",
"plugin for TProof could not be loaded");
951 Error(
"CreateServer",
"plugin for TProof could not be executed");
974 msg.
Form(
"Warning: client version is too old: automatic schema evolution is ineffective.\n"
975 " This may generate compatibility problems between streamed objects.\n"
976 " The advise is to move to ROOT >= 5.21/02 .");
988 Info(
"CreateServer",
" idle timer started (%d secs)", idle_to);
990 Info(
"CreateServer",
" idle timer not started (no idle timeout requested)");
1034 motdname +=
"/etc/proof/noproof";
1036 if ((motd = fopen(motdname,
"r"))) {
1039 while ((
c = getc(motd)) != EOF)
1051 Long_t id, flags, modtime, lasttime = 0;
1056 if (time(0) - lasttime > (time_t)86400)
1065 motdname +=
"/etc/proof/motd";
1068 if (modtime > lasttime || show) {
1069 if ((motd = fopen(motdname,
"r"))) {
1072 while ((
c = getc(motd)) != EOF)
1082 Int_t fd = creat(lastname.
Data(), 0600);
1083 if (fd >= 0) close(fd);
1096 Error(
"Get",
"problems sending request");
1114 Error(
"Get",
"command %d cannot be executed while processing",
what);
1115 }
else if (xrc == -2) {
1116 Error(
"Get",
"unknown command %d ! Protocol error?",
what);
1134 Info(
"RestartComputeTime",
"compute time restarted after %f secs (%d entries)",
1163 Error(
"GetNextPacket",
"no progress status object");
1180 req << cacheSize << learnent;
1185 req << totalEntries;
1192 Info(
"GetNextPacket",
"cacheSize: %lld, learnent: %d", cacheSize, learnent);
1200 << bytesRead << totalEntries;
1208 Error(
"GetNextPacket",
"Send() failed, returned %d", rc);
1216 Warning(
"GetNextPacket",
"problems saving partial results");
1227 Error(
"GetNextPacket",
"Recv() failed, returned %d", rc);
1243 PDB(kLoop, 2)
Info(
"GetNextPacket",
"'%s' '%s' '%s' %lld %lld",
1244 e->GetFileName(),
e->GetDirectory(),
1245 e->GetObjName(),
e->GetFirst(),
e->GetNum());
1247 PDB(kLoop, 2)
Info(
"GetNextPacket",
"Done");
1257 PDB(kLoop, 2)
Info(
"GetNextPacket:kPROOF_STOPPROCESS",
"received");
1263 Error(
"GetNextPacket",
"command %d cannot be executed while processing",
what);
1264 }
else if (xrc == -2) {
1265 Error(
"GetNextPacket",
"unknown command %d ! Protocol error?",
what);
1284 Bool_t xtest = (argc && *argc > 3 && !strcmp(argv[3],
"test")) ?
kTRUE :
kFALSE;
1287 if (xtest && !(isatty(0) == 0 || isatty(1) == 0)) {
1288 Printf(
"proofserv: command line testing: OK");
1292 if (!argc || (argc && *argc <= 1)) {
1293 Fatal(
"GetOptions",
"Must be started from proofd with arguments");
1297 if (!strcmp(argv[1],
"proofserv")) {
1300 }
else if (!strcmp(argv[1],
"proofslave")) {
1304 Fatal(
"GetOptions",
"Must be started as 'proofserv' or 'proofslave'");
1312 Fatal(
"GetOptions",
"ROOTCONFDIR shell variable not set");
1343 Error(
"HandleSocketInput",
"retrieving message from input socket");
1364 emsg.
Form(
"HandleSocketInput: command %d cannot be executed while processing",
what);
1365 }
else if (rc == -3) {
1366 emsg.
Form(
"HandleSocketInput: message %d undefined! Protocol error?",
what);
1368 emsg.
Form(
"HandleSocketInput: unknown command %d! Protocol error?",
what);
1371 }
else if (rc == 2) {
1375 Info(
"HandleSocketInput",
"message of type %d enqueued; sz: %d",
1385 Info(
"HandleSocketInput",
"processing enqueued message of type %d; left: %d",
1395 }
catch (std::bad_alloc &) {
1397 exmsg.
Form(
"caught exception 'bad_alloc' (memory leak?) %s %lld",
1399 }
catch (std::exception &exc) {
1401 exmsg.
Form(
"caught standard exception '%s' %s %lld",
1405 exmsg.
Form(
"caught exception throwing %d %s %lld",
1407 }
catch (
const char *str) {
1409 exmsg.
Form(
"caught exception throwing '%s' %s %lld",
1413 exmsg.
Form(
"caught exception <unknown> %s %lld",
1420 Error(
"HandleSocketInput",
"%s", exmsg.
Data());
1431 exmsg.
Form(
"high-memory footprint detected during Process(...) - terminating");
1432 Error(
"HandleSocketInput",
"%s", exmsg.
Data());
1447 if (rc == 0 && ngwrks == 0 && !masterOnly && !dynamicStartup) {
1448 SendAsynMessage(
" *** No workers left: cannot continue! Terminating ... *** ");
1475 if (!mess)
return -3;
1479 Info(
"HandleSocketInput",
"processing message type %d from '%s'",
1484 Int_t rc = 0, lirc = 0;
1502 Info(
"HandleSocketInput:kMESS_CINT",
"processing: %s...", str);
1521 if (pslb) slb = str;
1558 Info(
"HandleSocketInput:kPROOF_LOGLEVEL",
"debug level set to %d (mask: 0x%x)",
1589 Warning(
"HandleSocketInput:kPROOF_STATUS",
1590 "kPROOF_STATUS message is obsolete");
1592 Warning(
"HandleSocketInput:kPROOF_STATUS",
"problem sending of request");
1609 Info(
"HandleSocketInput:kPROOF_STOP",
"request for worker %s", ord.
Data());
1613 Info(
"HandleSocketInput:kPROOF_STOP",
"got request to terminate");
1626 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_STOPPROCESS",
"enter");
1633 Info(
"HandleSocketInput:kPROOF_STOPPROCESS",
1634 "recursive mode: enter %d, %ld", aborted, timeout);
1648 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_PROCESS",
"enter");
1658 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_SENDOUTPUT",
1659 "worker was asked to send output to master");
1662 Error(
"HandleSocketInput:kPROOF_SENDOUTPUT",
"problems sending output list");
1707 Info(
"HandleSocketInput:kPROOF_MAXQUERIES",
"Enter");
1719 Info(
"HandleSocketInput:kPROOF_CLEANUPSESSION",
"Enter");
1723 Printf(
"Session %s cleaned up", stag.
Data());
1725 Printf(
"Could not cleanup session %s", stag.
Data());
1735 {
PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
"Enter");
1743 (*mess) >> isTree >>
filename >> dir >> objname;
1744 PDB(kGlobal, 2)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
1745 "Report size of object %s (%s) in dir %s in file %s",
1746 objname.Data(), isTree ?
"T" :
"O",
1749 PDB(kGlobal, 2)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
1750 "Found %lld %s", entries, isTree ?
"entries" :
"objects");
1755 answ << entries << objname;
1758 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
"Done");
1783 sscanf(str,
"%1023s %d %ld %d",
name, &bin, &
size, &fw);
1785 sscanf(str,
"%1023s %d %ld",
name, &bin, &
size);
1812 Info(
"HandleSocketInput",
"forwarding file: %s", fnam.
Data());
1813 if (
fProof->
SendFile(fnam, opt, (copytocache ?
"cache" :
"")) < 0) {
1814 Error(
"HandleSocketInput",
"forwarding file: %s", fnam.
Data());
1828 (*mess) >> start >> end;
1830 Info(
"HandleSocketInput:kPROOF_LOGFILE",
1831 "Logfile request - byte range: %d - %d", start, end);
1862 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_CACHE",
"enter");
1875 Warning(
"HandleSocketInput:kPROOF_WORKERLISTS",
1876 "Action meaning-less on worker nodes: protocol error?");
1887 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
"Enter");
1901 Error(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
1902 "adding a list of worker nodes returned: %d", ret);
1905 Error(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
1906 "getting list of worker nodes returned: %d", retVal);
1926 answ << (
TList *)info;
1932 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
"Done");
1943 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETTREEHEADER",
"Enter");
1947 p->HandleGetTreeHeader(mess);
1950 Error(
"HandleSocketInput:kPROOF_GETTREEHEADER",
"could not create TProofPlayer instance!");
1953 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETTREEHEADER",
"Done");
1963 {
PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETOUTPUTLIST",
"Enter");
1964 TList* outputList = 0;
1968 outputList =
new TList();
1970 outputList =
new TList();
1975 while ( (o = next()) ) {
1985 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETOUTPUTLIST",
"Done");
1992 Info(
"HandleSocketInput:kPROOF_VALIDATE_DSET",
"Enter");
2005 Info(
"HandleSocketInput:kPROOF_VALIDATE_DSET",
"Done");
2015 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_DATA_READY",
"Enter");
2018 Long64_t totalbytes = 0, bytesready = 0;
2020 answ << dataready << totalbytes << bytesready;
2022 Error(
"HandleSocketInput:kPROOF_DATA_READY",
2023 "This message should not be sent to slaves");
2027 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_DATA_READY",
"Done");
2043 Error(
"HandleSocketInput",
"old client: no or incompatible dataset support");
2068 Info(
"HandleSocketInput:kPROOF_REALTIMELOG",
2069 "setting real-time logging %s", (
on ?
"ON" :
"OFF"));
2092 Error(
"HandleSocketInput",
"no queries enqueued");
2105 Error(
"HandleSocketInput",
"adding a list of worker nodes returned: %d", ret);
2118 Error(
"HandleSocketInput",
"error getting list of worker nodes");
2120 Warning(
"HandleSocketInput",
"query was re-queued!");
2122 Error(
"HandleSocketInput",
"unexpected answer: %d", retVal);
2143 " idle or undefined player - ignoring");
2169 smsg.
Form(
"Echo response from %s:%s: %s",
2180 Error(
"HandleSocketInput",
"Can't redirect output");
2195 smsg.
Form(
"*** Echo response from %s:%s ***\n",
2218 Error(
"HandleSocketInput",
"unknown command %d",
what);
2243 Int_t mergedWorkers = 0;
2245 PDB(kSubmerger, 1)
Info(
"AcceptResults",
"enter");
2253 Int_t numworkers = 0;
2258 Info(
"AcceptResults",
"interrupt!");
2266 if (sw && sw != (
TSocket *)(-1)) {
2270 Info(
"AcceptResults",
"connection from a worker accepted on merger %s ",
2273 if (++numworkers >= connections)
2277 Info(
"AcceptResults",
"spurious signal found of merging socket");
2280 if (s->
Recv(mess) < 0) {
2281 Error(
"AcceptResults",
"problems receiving message");
2285 Info(
"AcceptResults",
"message received: %d ", (mess ? mess->
What() : 0));
2287 Error(
"AcceptResults",
"message received: %p ", mess);
2296 PDB(kSubmerger, 2)
Info(
"AcceptResults",
" type %d ",
type);
2300 Info(
"AcceptResults",
2301 "a new worker has been mergerd. Total merged workers: %d",
2307 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"removing %p (has been merged)", o);
2310 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"%p not merged yet", o);
2320 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"closing socket");
2328 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"exit: %d",
result);
2338 Int_t n, nch, wasted = 0;
2340 const Int_t kBufSize = 1024;
2341 char waste[kBufSize];
2347 Info(
"HandleUrgentData",
"handling oob...");
2368 if (nch > kBufSize) nch = kBufSize;
2371 Error(
"HandleUrgentData",
"error receiving waste");
2376 Error(
"HandleUrgentData",
"error receiving OOB");
2382 Info(
"HandleUrgentData",
"got OOB byte: %d\n", oob_byte);
2389 Info(
"HandleUrgentData",
"*** Hard Interrupt");
2406 Error(
"HandleUrgentData",
"error sending OOB");
2417 if (nch > kBufSize) nch = kBufSize;
2420 Error(
"HandleUrgentData",
"error receiving waste (2)");
2430 Info(
"HandleUrgentData",
"Soft Interrupt");
2437 Error(
"HandleUrgentData",
"soft interrupt flushed stream");
2448 Info(
"HandleUrgentData",
"Shutdown Interrupt");
2459 Error(
"HandleUrgentData",
"unexpected OOB byte");
2479 Info(
"HandleSigPipe",
"keepAlive probe failed");
2488 Info(
"HandleSigPipe",
"keepAlive probe failed");
2534 if ((dup2(fileno(stdout), fileno(stderr))) < 0)
2535 SysError(
"RedirectOutput",
"could not redirect stderr");
2542 Warning(
"RedirectOutput",
"no way to tell master (or client) where"
2543 " to upload packages");
2558 dd.
Replace(0, ic,
"proofserv");
2582 if (
size <= 0)
return 0;
2585 Int_t fd = open(
file, O_CREAT | O_TRUNC | O_WRONLY, 0600);
2587 SysError(
"ReceiveFile",
"error opening file %s",
file);
2591 const Int_t kMAXBUF = 16384;
2592 char buf[kMAXBUF], cpy[kMAXBUF];
2597 while (filesize <
size) {
2610 Int_t k = 0, i = 0, j = 0;
2617 cpy[j++] = buf[i++];
2621 w = write(fd,
q,
r);
2623 w = write(fd,
p,
r);
2627 SysError(
"ReceiveFile",
"error writing to file %s",
file);
2635 Error(
"ReceiveFile",
"error during receiving file %s",
file);
2643 if (chmod(
file, 0644) != 0)
2644 Warning(
"ReceiveFile",
"error setting mode 0644 on file %s",
file);
2683 off_t ltot=0, lnow=0;
2688 ltot = lseek(fileno(stdout), (off_t) 0, SEEK_END);
2691 if (ltot >= 0 && lnow >= 0) {
2694 if (end <= start || end > ltot)
2696 left = (
Int_t)(end - start);
2701 left = (
Int_t)(ltot - lnow);
2708 SysError(
"SendLogFile",
"error sending kPROOF_LOGFILE");
2712 const Int_t kMAXBUF = 32768;
2714 Int_t wanted = (left > kMAXBUF) ? kMAXBUF : left;
2722 SysError(
"SendLogFile",
"error reading log file");
2726 if (end == ltot &&
len == wanted)
2730 SysError(
"SendLogFile",
"error sending log file");
2736 wanted = (left > kMAXBUF) ? kMAXBUF : left;
2738 }
while (
len > 0 && left > 0);
2742 if (adhoc && lnow >=0 )
2749 mess << status << (
Int_t) 1;
2752 SysError(
"SendLogFile",
"error sending kPROOF_LOGDONE");
2756 PDB(kGlobal, 1)
Info(
"SendLogFile",
"kPROOF_LOGDONE sent");
2773 mess << bytesread << realtime << cputime << workdir;
2784 Int_t nparallel = 0;
2787 Info(
"SendParallel",
"Will invoke AskParallel()");
2790 Info(
"SendParallel",
"Will invoke GetParallel()");
2797 mess << nparallel << async;
2816 Error(
"Setup",
"failed to send proof server startup message");
2824 Error(
"Setup",
"failed to receive remote proof protocol");
2828 Error(
"Setup",
"failed to send local proof protocol");
2836 Error(
"Setup",
"OldAuthSetup: failed to setup authentication");
2855 Error(
"Setup",
"failed to receive ordinal and config info");
2884 if (tmpWorkDir !=
"")
2888 Info(
"Setup",
"invalid config file %s (missing or unreadable",
2934 Error(
"Setup",
"common setup failed");
2967 if (paths.
Length() > 0) {
2971 else if (paths.
Contains(
"<compiler>"))
2980 if (!bindir.
IsNull()) bindir +=
":";
2982 }
else if (icomp == -1) {
2983 if (!path.
IsNull()) path +=
":";
2991 else if (paths.
Contains(
"<sysbin>"))
2995 if (!bindir.
IsNull()) bindir +=
":";
2996 bindir +=
"/bin:/usr/bin:/usr/local/bin";
2997 }
else if (isysb == -1) {
2998 if (!path.
IsNull()) path +=
":";
2999 path +=
"/bin:/usr/bin:/usr/local/bin";
3004 if (!bindir.
IsNull()) bindir +=
":";
3012 Error(
"SetupCommon",
"can not change to PROOF directory %s",
3021 Error(
"SetupCommon",
"can not change to PROOF directory %s",
3056 const char *k = (
IsMaster()) ?
"Mst" :
"Wrk";
3060 Info(
"SetupCommon",
"package directory set to %s", packdir.
Data());
3075 Warning(
"SetupCommon",
"problems creating path '%s' (errno: %d)",
3084 if (!dataDirOpts.
IsNull()) {
3092 if (dataDirOpts.
Contains(
"g"))
m = 0775;
3095 Info(
"SetupCommon",
"requested mode for data directories is '%o'",
m);
3102 if (subp.
IsNull())
continue;
3107 Warning(
"SetupCommon",
"problems setting mode '%o' on path '%s' (errno: %d)",
3114 Warning(
"SetupCommon",
"problems stat-ing path '%s' (errno: %d; datadir: %s)",
3127 Info(
"SetupCommon",
" %d global package directories registered", nglb);
3136 Error(
"SetupCommon",
"can not change to working directory '%s'",
3189 while (dsms.
Tokenize(dsm, from,
",")) {
3191 Warning(
"SetupCommon",
"a valid dataset manager already initialized");
3192 Warning(
"SetupCommon",
"support for multiple managers not yet available");
3196 if (
gROOT->GetPluginManager()) {
3198 h =
gROOT->GetPluginManager()->FindHandler(
"TDataSetManager", dsm);
3199 if (
h &&
h->LoadPlugin() != -1) {
3209 Warning(
"SetupCommon",
"dataset manager plug-in initialization failed");
3210 SendAsynMessage(
"TXProofServ::SetupCommon: dataset manager plug-in initialization failed");
3226 h =
gROOT->GetPluginManager()->FindHandler(
"TDataSetManager",
"file");
3227 if (
h &&
h->LoadPlugin() == -1)
h = 0;
3236 Warning(
"SetupCommon",
"default dataset manager plug-in initialization failed");
3242 if (!dsReqCfg.
IsNull()) {
3243 TPMERegexp reReqDir(
"(^| )(dir:)?([^ ]+)( |$)");
3245 if (reReqDir.
Match(dsReqCfg) == 5) {
3247 dsDirFmt.
Form(
"dir:%s perms:open", reReqDir[3].Data());
3253 "failed init of dataset staging requests repository");
3258 "specify, with [dir:]<path>, a valid path for staging requests");
3261 Warning(
"SetupCommon",
"no repository for staging requests available");
3275 while (quotas.
Tokenize(tok, from,
" ")) {
3283 "parsing 'maxquerykept' :ignoring token %s : not a digit", tok.
Data());
3286 const char *ksz[2] = {
"hwmsz=",
"maxsz="};
3287 for (
Int_t j = 0; j < 2; j++) {
3294 const char *s[3] = {
"k",
"m",
"g"};
3295 Int_t i = 0, ki = 1024;
3310 TString ssz(ksz[j], strlen(ksz[j])-1);
3311 Info(
"SetupCommon",
"parsing '%s' : ignoring token %s", ssz.
Data(), tok.
Data());
3321 Warning(
"SetupCommon",
"problems applying fMaxQueries");
3341 if (!
name.IsNull()) {
3363 Info(
"SetupCommon",
"successfully completed");
3383 Info(
"Terminate",
"process memory footprint: %ld/%ld kB virtual, %ld/%ld kB resident ",
3417 Info(
"Terminate",
"data directory '%s' has been removed",
fDataDir.
Data());
3424 while ((fh = next())) {
3442 if (!path || strlen(path) <= 0)
return kFALSE;
3448 const char *ent = 0;
3450 if (!strcmp(ent,
".") || !strcmp(ent,
".."))
continue;
3451 fpath.
Form(
"%s/%s", path, ent);
3468 Warning(
"UnlinkDataDir",
"data directory '%s' is empty but could not be removed", path);
3499 if (!oldAuthSetupHook) {
3501 TString authlib =
"libRootAuth";
3507 Error(
"OldAuthSetup",
"can't load %s",authlib.
Data());
3511 Error(
"OldAuthSetup",
"can't locate %s",authlib.
Data());
3520 Error(
"OldAuthSetup",
"can't find OldProofServAuthSetup");
3536 TDSet *dset,
const char *selec,
3553 fst, dset, selec, elist);
3571 Int_t startlog = lseek(fileno(stdout), (off_t) 0, SEEK_END);
3575 Info(
"SetQueryRunning",
"starting query: %d", pq->
GetSeqNum());
3603 Info(
"HandleArchive",
"Enter");
3607 (*mess) >> queryref >> path;
3609 if (slb) slb->
Form(
"%s %s", queryref.
Data(), path.
Data());
3612 if (queryref ==
"Default") {
3614 Info(
"HandleArchive",
3624 if (path.
Length() <= 0) {
3626 Info(
"HandleArchive",
3627 "archive paths are not defined - do nothing");
3631 path.
Form(
"%s/session-%s-%d.root",
3642 if (!pqr || qry < 0) {
3644 fout +=
"/query-result.root";
3650 TIter nxk(
f->GetListOfKeys());
3652 while ((k = (
TKey *)nxk())) {
3662 Info(
"HandleArchive",
3663 "file cannot be open (%s)",fout.
Data());
3670 PDB(kGlobal, 1)
Info(
"HandleArchive",
3671 "archive path for query #%d: %s",
3678 if (!farc || !(farc->
IsOpen())) {
3679 Info(
"HandleArchive",
3680 "archive file cannot be open (%s)",path.
Data());
3694 if (qry > -1 &&
fQMgr)
3698 Info(
"HandleArchive",
3699 "results of query %s archived to file %s",
3719 emsg.
Form(
"file collection undefined!");
3762 Info(
"HandleProcess",
"Enter");
3787 if ((!hasNoData) && elist)
3798 Error(
"HandleProcess",
"AssertDataSet: %s", emsg.
Data());
3803 }
else if (hasNoData) {
3805 TNamed *ftp =
dynamic_cast<TNamed *
>(
input->FindObject(
"PROOF_FilesToProcess"));
3813 emsg.
Form(
"dataset manager not initialized!");
3818 emsg.
Form(
"requested dataset '%s' does not exists", dsn.
Data());
3825 fcmap->
SetName(
"PROOF_FilesToProcess");
3833 Error(
"HandleProcess",
"%s", emsg.
Data());
3849 if (dset)
input->Add(dset);
3850 if (elist)
input->Add(elist);
3854 input->Clear(
"nodelete");
3859 Warning(
"HandleProcess",
"could not save input data: %s", emsg.
Data());
3885 Error(
"HandleProcess",
"error getting list of worker nodes");
3892 Info(
"HandleProcess",
"query %d enqueued", pq->
GetSeqNum());
3896 Error(
"HandleProcess",
"Adding a list of worker nodes returned: %d",
3906 Error(
"HandleProcess",
"error getting list of worker nodes");
3913 Info(
"HandleProcess",
"query %d enqueued", pq->
GetSeqNum());
3915 Error(
"HandleProcess",
"unknown return value: %d", retVal);
3926 if (!sync || enqueued) {
3934 Info(
"HandleProcess",
4001 Warning(
"HandleProcess",
"could not get input data: %s", emsg.
Data());
4005 Warning(
"HandleProcess",
"could not get query sequential number!");
4009 while ((nord =
input->FindObject(
"PROOF_Ordinal")))
4010 input->Remove(nord);
4016 while ((o = next())) {
4017 PDB(kGlobal, 2)
Info(
"HandleProcess",
"adding: %s", o->
GetName());
4025 while ((obj = nxt())){
4029 Info(
"HandleProcess",
"selector obj for '%s' found", selector_obj->
ClassName());
4045 Info(
"HandleProcess",
"calling fPlayer->Process() with selector object: %s", selector_obj->
ClassName());
4049 Info(
"HandleProcess",
"calling fPlayer->Process() with selector name: %s",
filename.Data());
4061 m << status << abort;
4074 Info(
"TProofServ::Handleprocess",
4075 "worker %s has finished processing with %d objects in output list",
4095 if (!isSubMerging) {
4115 Info(
"HandleProcess",
"controlled mode: worker %s has finished,"
4122 Info(
"HandleProcess",
"submerging disabled because of high-memory case");
4125 PDB(kGlobal, 2)
Info(
"HandleProcess",
"merging mode check: %d", isSubMerging);
4141 Int_t merge_port = 0;
4144 Info(
"HandleProcess",
"possible port for merging connections: %d",
4148 msg_osize << merge_port;
4162 PDB(kGlobal, 2)
Info(
"HandleProcess",
"sending result directly to master");
4164 Warning(
"HandleProcess",
"problems sending output list");
4186 Warning(
"HandleProcess",
"the output list is empty!");
4188 Warning(
"HandleProcess",
"problems sending output list");
4205 while ((obj = nex())) {
4213 TList *added =
dynamic_cast<TList *
>(
input->FindObject(
"PROOF_InputObjsFromFile"));
4221 while ((o = nxo())) {
input->Remove(o); }
4222 input->Remove(added);
4238 PDB(kGlobal, 1)
Info(
"HandleProcess",
"done");
4249 PDB(kOutput, 2)
Info(
"SendResults",
"enter");
4260 msg.
Form(
"%s: merging output objects ... done ",
4264 msg.
Form(
"%s: objects merged; sending output: %d objs",
fPrefix.
Data(), olsz);
4269 if (sock->
Send(mbuf) < 0)
return -1;
4275 Int_t totsz = 0, objsz = 0;
4277 while ((o = nxo())) {
4281 "message has %d bytes: limit of %lld bytes reached - sending ...",
4294 msg.
Form(
"%s: objects merged; sending obj %d/%d (%d bytes) ",
4298 if (sock->
Send(mbuf) < 0)
return -1;
4305 mbuf << (
Int_t) ((ns >= olsz) ? 2 : 1);
4320 msg.
Form(
"%s: objects merged; sending obj %d/%d (%d bytes) ",
4324 if (sock->
Send(mbuf) < 0)
return -1;
4328 msg.
Form(
"%s: grand total: sent %d objects, size: %d bytes ",
4340 msg.
Form(
"%s: merging output objects ... done ",
4344 msg.
Form(
"%s: objects merged; sending output: %d objs",
fPrefix.
Data(), olsz);
4349 if (sock->
Send(mbuf) < 0)
return -1;
4353 Int_t totsz = 0, objsz = 0;
4356 while ((o = nxo())) {
4373 msg.
Form(
"%s: objects merged; sending obj %d/%d (%d bytes) ",
4377 if (sock->
Send(mbuf) < 0)
return -1;
4382 msg.
Form(
"%s: grand total: sent %d objects, size: %d bytes ",
4396 msg.
Form(
"%s: sending output: %d objs, %d bytes",
fPrefix.
Data(), olsz, blen);
4398 if (sock->
Send(mbuf) < 0)
return -1;
4402 PDB(kGlobal, 2)
Info(
"SendResults",
"sending output list");
4404 PDB(kGlobal, 2)
Info(
"SendResults",
"notifying failure or abort");
4409 PDB(kOutput,2)
Info(
"SendResults",
"done");
4461 Error(
"ProcessNext",
"no TDset object: cannot continue");
4483 while ((obj = nxt())){
4487 Info(
"ProcessNext",
"found object for selector '%s'", obj->
ClassName());
4494 Error(
"ProcessNext",
"empty waiting queries list!");
4540 if (
gEnv->
Lookup(
"Proof.UseMergers") && !
input->FindObject(
"PROOF_UseMergers")) {
4544 PDB(kSubmerger, 2)
Info(
"ProcessNext",
"PROOF_UseMergers set to %d", smg);
4550 if ((o =
input->FindObject(
"PROOF_MergersByHost"))) {
input->Remove(o);
delete o; }
4552 PDB(kSubmerger, 2)
Info(
"ProcessNext",
"submergers setup by host/node");
4561 while ((o = next())) {
4567 if ((o =
input->FindObject(
"MissingFiles")))
input->Remove(o);
4572 Info(
"ProcessNext",
"calling fPlayer->Process() with selector object: %s", selector_obj->
ClassName());
4576 Info(
"ProcessNext",
"calling fPlayer->Process() with selector name: %s",
filename.Data());
4591 m << status << abort;
4607 Warning(
"ProcessNext",
"problems registering produced datasets: %s", emsg.
Data());
4628 while ((xo = nxo())) {
4650 Info(
"ProcessNext",
"adding info about dataset '%s' in the light query result", dset->
GetName());
4657 Info(
"ProcessNext",
"sending results");
4660 Warning(
"ProcessNext",
"problems sending output list");
4665 Warning(
"ProcessNext",
"the output list is empty!");
4667 Warning(
"ProcessNext",
"problems sending output list");
4677 if (!(pq->
IsDraw()) && pqr) {
4704 ::
Info(
"TProofServ::RegisterDataSets",
4705 "enter: %d objs in the output list", (out ? out->
GetSize() : -1));
4707 if (!in || !out || !dsm) {
4708 ::Error(
"TProofServ::RegisterDataSets",
"invalid inputs: %p, %p, %p", in, out, dsm);
4716 while ((o = nxo())) {
4734 if (regopt.
Contains(
":sortidx:")) {
4743 const char *vfmsg = regopt.
Contains(
"V") ?
" and verifying" :
"";
4744 msg.
Form(
"Registering%s dataset '%s' ... ", vfmsg, ds->
GetName());
4753 ::Warning(
"TProofServ::RegisterDataSets",
4754 "failure registering or verifying dataset '%s'", ds->
GetName());
4755 msg.
Form(
"Registering%s dataset '%s' ... failed! See log for more details", vfmsg, ds->
GetName());
4757 ::Info(
"TProofServ::RegisterDataSets",
"dataset '%s' successfully registered%s",
4758 ds->
GetName(), (strlen(vfmsg) > 0) ?
" and verified" :
"");
4759 msg.
Form(
"Registering%s dataset '%s' ... OK", vfmsg, ds->
GetName());
4766 ::Info(
"TProofServ::RegisterDataSets",
"printing collection");
4770 ::Warning(
"TProofServ::RegisterDataSets",
"collection '%s' is empty", o->
GetName());
4773 ::Info(
"TProofServ::RegisterDataSets",
"dataset registration not allowed");
4780 while ((o = nxrm())) out->
Remove(o);
4784 while((o = nxtg())) {
4790 PDB(kDataset, 1) ::
Info(
"TProofServ::RegisterDataSets",
"exit");
4801 Info(
"HandleQueryList",
"Enter");
4807 Int_t ntot = 0, npre = 0, ndraw= 0;
4840 Warning(
"HandleQueryList",
"unable to clone TProofQueryResult '%s:%s'",
4850 m << npre << ndraw << ql;
4864 Info(
"HandleRemove",
"Enter");
4867 (*mess) >> queryref;
4869 if (slb) *slb = queryref;
4871 if (queryref ==
"cleanupqueue") {
4875 Info(
"HandleRemove",
"%d queries removed from the waiting list", pend);
4880 if (queryref ==
"cleanupdir") {
4886 Info(
"HandleRemove",
"%d directories removed", nd);
4911 Warning(
"HandleRemove",
"query result manager undefined!");
4915 Info(
"HandleRemove",
4916 "query %s could not be removed (unable to lock session)", queryref.
Data());
4928 Info(
"HandleRetrieve",
"Enter");
4931 (*mess) >> queryref;
4933 if (slb) *slb = queryref;
4941 fout +=
"/query-result.root";
4947 TIter nxk(
f->GetListOfKeys());
4949 while ((k = (
TKey *)nxk())) {
4958 if ((
d =
dynamic_cast<TDSet *
>(o)))
4967 static const char *clb[4] = {
"bytes",
"KB",
"MB",
"GB" };
4968 while (qsz > 1000. && ilb < 3) {
4977 Info(
"HandleRetrieve",
4978 "query not found in file %s",fout.
Data());
4988 Info(
"HandleRetrieve",
4989 "file cannot be open (%s)",fout.
Data());
5008 (*mess) >>
type >> add >> path;
5012 if ((
type !=
"lib") && (
type !=
"inc")) {
5013 Error(
"HandleLibIncPath",
"unknown action type: %s",
type.Data());
5022 if (path.
Length() > 0 && path !=
"-") {
5024 Error(
"HandleLibIncPath",
"decomposing path %s", path.
Data());
5031 if (
type ==
"lib") {
5052 Info(
"HandleLibIncPath",
5053 "libpath %s does not exist or cannot be read - not added", xlib.
Data());
5076 Info(
"HandleLibIncPath",
5077 "incpath %s does not exist or cannot be read - not added", xinc.
Data());
5088 if (
type ==
"lib") {
5141 (*mess) >> filenam >> md5;
5145 if (slb) *slb = filenam;
5157 if (md5local && md5 == (*md5local)) {
5160 Error(
"HandleCheckFile",
"failure cleaning %s", packnam.
Data());
5168 Info(
"HandleCheckFile",
5169 "package %s installed on node", filenam.
Data());
5172 Error(
"HandleCheckFile",
"gunzip not found");
5174 Error(
"HandleCheckFile",
"package %s did not unpack into %s",
5186 Error(
"HandleCheckFile",
5187 "package %s not yet on node", filenam.
Data());
5205 Info(
"HandleCheckFile",
5206 "problems uploading package %s", parpath.
Data());
5221 "problems installing package %s", filenam.
Data());
5229 if (md5local && md5 == (*md5local)) {
5233 Info(
"HandleCheckFile",
5234 "package %s already on node", parname.
Data());
5244 "problems uploading package %s", par.
Data());
5252 Info(
"HandleCheckFile",
5253 "package %s not yet on node", filenam.
Data());
5264 if (md5local && md5 == (*md5local)) {
5267 Info(
"HandleCheckFile",
"file %s already on node", filenam.Data());
5272 Info(
"HandleCheckFile",
"file %s not yet on node", filenam.Data());
5286 Info(
"HandleCache",
"Enter");
5298 const char *k = (
IsMaster()) ?
"Mst" :
"Wrk";
5318 if (slb) slb->
Form(
"%d %d",
type, all);
5324 if (
file.IsNull() ||
file ==
"*") {
5340 if (slb) slb->
Form(
"%d %d",
type, all);
5348 if (slb) slb->
Form(
"%d %d",
type, status);
5357 if (slb) slb->
Form(
"%d %s %d",
type, package.Data(), status);
5366 noth.
Data(), package.Data()));
5379 "kBuildPackage: problems forwarding package %s to workers", package.Data());
5381 noth.
Data(), package.Data()));
5389 "kBuildPackage: package %s exists and has PROOF-INF directory", package.Data());
5396 status = packmgr->
Build(package.Data(), chkveropt);
5407 Info(
"HandleCache",
"package %s successfully built", package.Data());
5409 if (slb) slb->
Form(
"%d %s %d %d",
type, package.Data(), status, chkveropt);
5418 if ((status =
fPackMgr->
Load(package.Data(), optls)) < 0) {
5422 noth.
Data(), package.Data(), optls,
5423 (optls && optls->GetSize() > 0) ? optls->GetSize() : 0));
5428 if (optls && optls->GetSize() > 0) {
5438 Info(
"HandleCache",
"package %s successfully loaded", package.Data());
5441 if (slb) slb->
Form(
"%d %s %d",
type, package.Data(), status);
5446 {
TString title(
"*** Enabled packages ***");
5448 title.
Form(
"*** Enabled packages on %s %s on %s",
5449 (
IsMaster()) ?
"master" :
"worker",
5457 if (slb) slb->
Form(
"%d %d",
type, all);
5464 if (slb) slb->
Form(
"%d %d",
type, all);
5478 if (slb) slb->
Form(
"%d %d",
type, all);
5489 if (slb) slb->
Form(
"%d %s",
type, package.Data());
5496 if (slb) slb->
Form(
"%d %s %d",
type, package.Data(), chkveropt);
5503 if (slb) slb->
Form(
"%d %s %d",
type, package.Data(), status);
5510 if (slb) slb->
Form(
"%d %s",
type, package.Data());
5516 if (slb) slb->
Form(
"%d %s %d",
type, package.Data(), status);
5522 if (slb) slb->
Form(
"%d %s",
type, package.Data());
5538 msg <<
type << pack;
5564 Info(
"HandleCache",
"loading macro %s ...", pack.
Data());
5579 if (slb) slb->
Form(
"%d %s",
type, package.Data());
5583 Error(
"HandleCache",
"unknown type %d",
type);
5597 Info(
"HandleWorkerLists",
"Enter");
5607 if (ord !=
"*" && !ord.BeginsWith(
GetOrdinal()) && ord !=
"restore")
break;
5616 if (nactnew == nactmax) {
5617 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers (re-)activated");
5620 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"%d workers could not be (re-)activated", nactmax - nactnew);
5622 }
else if (ord ==
"restore") {
5624 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"active worker(s) restored");
5626 Error(
"HandleWorkerList",
"some active worker(s) could not be restored; check logs");
5629 if (nactnew == (nact + nwc)) {
5631 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"worker(s) %s (re-)activated", ord.Data());
5634 Error(
"HandleWorkerList",
"some worker(s) could not be (re-)activated;"
5635 " # of actives: %d --> %d (nwc: %d)",
5636 nact, nactnew, nwc);
5638 rc = (nwc < 0) ? nwc : -1;
5642 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers are already active");
5645 Warning(
"HandleWorkerList",
"undefined PROOF session: protocol error?");
5650 if (ord !=
"*" && !ord.BeginsWith(
GetOrdinal()) && ord !=
"restore")
break;
5658 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers deactivated");
5661 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"%d workers could not be deactivated", nactnew);
5664 if (nactnew == (nact - nwc)) {
5666 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"worker(s) %s deactivated", ord.Data());
5669 Error(
"HandleWorkerList",
"some worker(s) could not be deactivated:"
5670 " # of actives: %d --> %d (nwc: %d)",
5671 nact, nactnew, nwc);
5673 rc = (nwc < 0) ? nwc : -1;
5677 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers are already inactive");
5680 Warning(
"HandleWorkerList",
"undefined PROOF session: protocol error?");
5684 Warning(
"HandleWorkerList",
"unknown action type (%d)",
type);
5711 "no appropriate master line found in %s",
fConfFile.
Data());
5791 const char *
type = 0;
5794 Int_t ipos = (location) ? strlen(location) : 0;
5800 if (level >=
kInfo) {
5802 char *ps = location ? (
char *) strrchr(location,
'|') : (
char *)0;
5804 ipos = (
int)(ps - (
char *)location);
5820 type =
"*** Break ***";
5838 if (!location || ipos == 0 ||
5851 type, ipos, location, msg);
5861 if (__crashreporter_info__)
5862 delete [] __crashreporter_info__;
5863 __crashreporter_info__ =
StrDup(buf);
5915 Printf(
" +++ Latest processing times: %f s (CPU: %f s)",
5948 Int_t priority = 100;
5954 sql.
Form(
"SELECT priority WHERE group='%s' FROM proofpriority",
fGroup.
Data());
5960 Error(
"GetPriority",
"failed to connect to SQL server %s as %s %s",
5962 printf(
"%s\n", sql.
Data());
5967 Error(
"GetPriority",
"query into proofpriority failed");
5975 Error(
"GetPriority",
"first row is header is NULL");
5999 Info(
"SendAsynMessage",
"%s", (msg ? msg :
"(null)"));
6005 Warning(
"SendAsynMessage",
"could not send message '%s'", msg);
6018 off_t lend = lseek(fileno(stdout), (off_t)0, SEEK_END);
6019 if (lend >= 0) lseek(
fLogFileDes, lend, SEEK_SET);
6036 if (truncsz < 100) {
6037 emsg.
Form(
"+++ WARNING +++: %s: requested truncate size too small"
6043 while (ftruncate(fileno(stdout), truncsz) != 0 &&
6048 Error(
"TruncateLogFile",
"truncating to %lld bytes; file size is %lld bytes (errno: %d)",
6050 emsg.
Form(
"+++ WARNING +++: %s: problems truncating log file to %lld bytes; file size is %lld bytes"
6054 Info(
"TruncateLogFile",
"file truncated to %lld bytes (80%% of %lld); file size was %lld bytes ",
6056 emsg.
Form(
"+++ WARNING +++: %s: log file truncated to %lld bytes (80%% of %lld)",
6062 emsg.
Form(
"+++ WARNING +++: %s: could not stat log file descriptor"
6075 Error(
"HandleException",
"caugth exception triggered by signal '%d' %s %lld",
6079 emsg.
Form(
"%s: caught exception triggered by signal '%d' %s %lld",
6093 Info(
"HandleDataSets",
"enter");
6097 Warning(
"HandleDataSets",
"no data manager is available to fullfil the request");
6102 TString dsUser, dsGroup, dsName, dsTree, uri, opt;
6118 if (slb) slb->
Form(
"%d %s",
type, uri.Data());
6130 if (slb) slb->
Form(
"%d %s %s",
type, uri.Data(), opt.Data());
6135 Error(
"HandleDataSets",
"can not save an empty list.");
6143 Info(
"HandleDataSets",
"dataset registration not allowed");
6144 if (slb) slb->
Form(
"%d notallowed",
type);
6155 Error(
"HandleDataSets",
6156 "no dataset staging request repository available");
6162 while (reInvalid.
Substitute(validUri,
"_")) {}
6167 Warning(
"HandleDataSets",
"staging of %s already requested",
6175 Error(
"HandleDataSets",
"empty dataset or no dataset returned");
6186 for (
Int_t i=0; i<nToErase; i++)
6197 Error(
"HandleDataSets",
6198 "can't register staging request for %s", uri.Data());
6203 Info(
"HandleDataSets",
6204 "Staging request registered for %s", uri.Data());
6214 Error(
"HandleDataSets",
6215 "no dataset staging request repository available");
6233 Info(
"HandleDataSets",
"no pending staging request for %s",
6243 Error(
"HandleDataSets",
6244 "no dataset staging request repository available");
6262 (*mess) >> uri >> opt;
6263 if (slb) slb->
Form(
"%d %s %s",
type, uri.
Data(), opt.Data());
6271 (*mess) >> uri >> opt;
6272 if (slb) slb->
Form(
"%d %s %s",
type, uri.
Data(), opt.Data());
6276 if (kLite !=
kNPOS) {
6278 opt.Remove(kLite, strlen(
":lite:"));
6282 if (returnMap && !opt.IsNull()) {
6287 TIter nxd(returnMap);
6298 Info(
"HandleDataSets",
"no dataset found on server '%s'", opt.Data());
6315 (*mess) >> uri >> opt;
6316 if (slb) slb->
Form(
"%d %s %s",
type, uri.
Data(), opt.Data());
6332 if (slb) slb->
Form(
"%d %s",
type, uri.Data());
6338 Info(
"HandleDataSets",
"dataset creation / removal not allowed");
6339 if (slb) slb->
Form(
"%d notallowed",
type);
6347 (*mess) >> uri >> opt;
6348 if (slb) slb->
Form(
"%d %s %s",
type, uri.
Data(), opt.Data());
6358 Info(
"HandleDataSets",
"dataset verification not allowed");
6368 if (groupQuotaMap) {
6375 Info(
"HandleDataSets",
"quota control disabled");
6376 if (slb) slb->
Form(
"%d disabled",
type);
6389 Info(
"HandleDataSets",
"quota control disabled");
6390 if (slb) slb->
Form(
"%d disabled",
type);
6398 if (slb) slb->
Form(
"%d %s",
type, uri.Data());
6401 Info(
"HandleDataSets",
"kSetDefaultTreeName: modification of dataset info not allowed");
6402 if (slb) slb->
Form(
"%d notallowed",
type);
6409 (*mess) >> uri >> opt;
6410 if (slb) slb->
Form(
"%d %s %s",
type, uri.
Data(), opt.Data());
6411 if (opt ==
"show") {
6414 }
else if (opt ==
"clear") {
6418 Error(
"HandleDataSets",
"kCache: unknown action: %s", opt.Data());
6424 Error(
"HandleDataSets",
"unknown type %d",
type);
6451 Info(
"HandleSubmerger",
"kSendOutput: interrupting ...");
6462 Int_t merger_id = -1;
6463 (*mess) >> merger_id >>
name >> port;
6465 Info(
"HandleSubmerger",
"worker %s redirected to merger #%d %s:%d",
fOrdinal.
Data(), merger_id,
name.Data(), port);
6470 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6471 "kSendOutput: worker asked for sending output to merger #%d %s:%d",
6472 merger_id,
name.Data(), port);
6475 msg.
Form(
"worker %s cannot send results to merger #%d at %s:%d",
GetPrefix(), merger_id,
name.Data(), port);
6476 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6477 "kSendOutput: %s - inform the master", msg.
Data());
6491 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kSendOutput: worker sent its output");
6498 if (
name ==
"master") {
6499 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6500 "kSendOutput: worker was asked for sending output to master");
6502 Warning(
"HandleSubmerger",
"problems sending output list");
6508 }
else if (!t || !(t->
IsValid())) {
6509 msg.
Form(
"worker %s could not open a valid socket to merger #%d at %s:%d",
6511 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6512 "kSendOutput: %s - inform the master", msg.
Data());
6527 Error(
"HandleSubmerger",
"kSendOutput: received not on worker");
6538 Int_t merger_id = -1;
6540 Int_t connections = 0;
6541 (*mess) >> merger_id >> connections;
6543 Info(
"HandleSubmerger",
"worker %s established as merger",
fOrdinal.
Data());
6546 Info(
"HandleSubmerger",
6547 "kBeMerger: worker asked for being merger #%d for %d connections",
6548 merger_id, connections);
6553 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6554 "kBeMerger: mergerPlayer created (%p) ", mergerPlayer);
6562 Info(
"HandleSubmerger",
"kBeMerger: all outputs from workers accepted");
6574 while ((o = nxo())) {
6580 Info(
"HandleSocketInput",
"removing merged object (%p)", o);
6585 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kBeMerger: own outputs added");
6586 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"starting delayed merging on %s",
fOrdinal.
Data());
6593 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"delayed merging on %s finished ",
fOrdinal.
Data());
6594 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"%s sending results to master ",
fOrdinal.
Data());
6597 Warning(
"HandleSubmerger",
"kBeMerger: problems sending output list");
6601 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kBeMerger: results sent to master");
6618 Warning(
"HandleSubmerger",
"kBeMerger: problems craeting the merger player!");
6627 Error(
"HandleSubmerger",
"kSendOutput: received not on worker");
6641 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kStopMerging");
6643 Info(
"HandleSubmerger",
"kStopMerging: interrupting ...");
6659 Info(
"HandleFork",
"fork cloning not implemented");
6673 if ((pid = fork()) < 0) {
6674 Error(
"Fork",
"failed to fork");
6679 if (!pid)
return pid;
6693 Warning(
"Fork",
"Functionality not provided under windows");
6746 ::Warning(
"TProofServ::ResolveKeywords",
"session tag undefined: ignoring");
6754 ::Warning(
"TProofServ::ResolveKeywords",
"ordinal number undefined: ignoring");
6761 ::Warning(
"TProofServ::ResolveKeywords",
"query seqeuntial number undefined: ignoring");
6764 if (fname.
Contains(
"<file>") && path && strlen(path) > 0) {
6791 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6807 fprintf(
fs,
"%d", st);
6810 Info(
"UpdateSessionStatus",
"status (=%d) update in path: %s", st,
fAdminPath.
Data());
6823 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6832 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6841 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6851 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6861 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6872 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6885 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6890 while ((o = nxq())) {
6957 if (!dsrv.
EndsWith(
"/")) dsrv +=
"/";
6977 if (srvp ==
"root" || srvp ==
"xrd") path.
Remove(0, pfx.
Length());
6991 const char *pname =
GetName();
6994 fLockId = open(pname, O_CREAT|O_RDWR, 0644);
6996 fLockId = open(pname, O_RDWR);
6999 SysError(
"Lock",
"cannot open lock file %s", pname);
7006#if !defined(R__WIN32) && !defined(R__WINGCC)
7007 if (lockf(
fLockId, F_LOCK, (off_t) 1) == -1) {
7008 SysError(
"Lock",
"error locking %s", pname);
7034#if !defined(R__WIN32) && !defined(R__WINGCC)
7035 if (lockf(
fLockId, F_ULOCK, (off_t)1) == -1) {
std::ofstream * logfile() const
RooFitResult * save(const char *name=nullptr, const char *title=nullptr)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
const Bool_t kIterBackward
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
ErrorHandlerFunc_t SetErrorHandler(ErrorHandlerFunc_t newhandler)
Set an errorhandler function. Returns the old handler.
R__EXTERN void Throw(int code)
If an exception context has been set (using the TRY and RETRY macros) jump back to where it was set.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t del
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize fs
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TProofDebug::EProofDebugMask gProofDebugMask
R__EXTERN Int_t gProofDebugLevel
TApplication * GetTProofServ(Int_t *argc, char **argv, FILE *flog)
static volatile Int_t gProofServDebug
static void SendAsynMsg(const char *msg)
R__EXTERN TProofServ * gProofServ
Int_t(* OldProofServAuthSetup_t)(TSocket *, Bool_t, Int_t, TString &, TString &, TString &)
const char *const kPROOF_QueryDir
const char *const kPROOF_DataSetDir
const char *const kPROOF_DataDir
const char *const kPROOF_CacheLockFile
const char *const kPROOF_CacheDir
const char *const kPROOF_PackDir
const char *const kPROOF_WorkDir
const char *const kPROOF_QueryLockFile
R__EXTERN TProof * gProof
const Int_t kPROOF_Protocol
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
char * StrDup(const char *str)
Duplicate the string str.
Bool_t R_ISDIR(Int_t mode)
R__EXTERN TSystem * gSystem
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
virtual Longptr_t ProcessLine(const char *line, Bool_t sync=kFALSE, Int_t *error=nullptr)
Process a single command line, either a C++ statement or an interpreter command starting with a "....
virtual void Run(Bool_t retrn=kFALSE)
Main application eventloop. Calls system dependent eventloop via gSystem.
virtual Longptr_t ProcessFile(const char *file, Int_t *error=nullptr, Bool_t keep=kFALSE)
Process a file containing a C++ macro.
TObject * ReadObject(const TClass *cl) override
Read object from I/O buffer.
char * ReadString(char *s, Int_t max) override
Read string from I/O buffer.
void WriteObject(const TObject *obj, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
void SetName(const char *name)
virtual Int_t GetEntries() const
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
void Print(Option_t *option="") const override
Default print for collections, calls Print(option, 1).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Manages an element of a TDSet.
This class implements a data set to be used for PROOF processing.
virtual TClass * IsA() const
virtual void SetEntryList(TObject *aList)
Set entry (or event) list for this data set.
static Long64_t GetEntries(Bool_t isTree, const char *filename, const char *path, TString &objname)
Returns number of entries in tree or objects in file.
Int_t GetNumOfFiles()
Return the number of files in the dataset.
void Validate()
Validate the TDSet by opening files.
void SetWriteV3(Bool_t on=kTRUE)
Set/Reset the 'OldStreamer' bit in this instance and its elements.
TList * GetListOfElements() const
const char * GetObjName() const
Int_t WriteDataSet(const char *group, const char *user, const char *dsName, TFileCollection *dataset, UInt_t option=0, TMD5 *checksum=0)
Writes indicated dataset.
TFileCollection * GetDataSet(const char *uri, const char *srv=0)
Utility function used in various methods for user dataset upload.
Bool_t ExistsDataSet(const char *group, const char *user, const char *dsName)
Checks if the indicated dataset exits.
Bool_t RemoveDataSet(const char *group, const char *user, const char *dsName)
Removes the indicated dataset.
virtual TFileCollection * GetDataSet(const char *uri, const char *server=0)
Utility function used in various methods for user dataset upload.
Int_t ScanDataSet(const char *uri, const char *opt)
Scans the dataset indicated by 'uri' following the 'opts' directives.
virtual TMap * GetDataSets(const char *uri, UInt_t=TDataSetManager::kExport)
Returns all datasets for the <group> and <user> specified by <uri>.
virtual Bool_t ExistsDataSet(const char *uri)
Checks if the indicated dataset exits.
virtual TMap * GetGroupQuotaMap()
virtual void ShowDataSets(const char *uri="*", const char *opt="")
Prints formatted information about the dataset 'uri'.
virtual void ShowQuota(const char *opt)
Display quota information.
virtual Bool_t RemoveDataSet(const char *uri)
Removes the indicated dataset.
Bool_t ParseUri(const char *uri, TString *dsGroup=0, TString *dsUser=0, TString *dsName=0, TString *dsTree=0, Bool_t onlyCurrent=kFALSE, Bool_t wildcards=kFALSE)
Parses a (relative) URI that describes a DataSet on the cluster.
virtual Int_t ClearCache(const char *uri)
Clear cached information matching uri.
virtual Int_t RegisterDataSet(const char *uri, TFileCollection *dataSet, const char *opt)
Register a dataset, perfoming quota checkings, if needed.
virtual Int_t ShowCache(const char *uri)
Show cached information matching uri.
Bool_t cd() override
Change current directory to "this" directory.
A List of entry numbers in a TTree or TChain.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
Read and parse the resource file for a certain level.
virtual TEnvRec * Lookup(const char *n) const
Loop over all resource records and return the one with name.
A TEventList object is a list of selected events (entries) in a TTree.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
Int_t Update(Long64_t avgsize=-1)
Update accumulated information about the elements of the collection (e.g.
void Sort(Bool_t useindex=kFALSE)
Sort the collection.
Long64_t GetNFiles() const
void Print(Option_t *option="") const override
Prints the contents of the TFileCollection.
TFileCollection * GetFilesOnServer(const char *server)
Return the subset of files served by 'server'.
Class describing a generic file including meta information.
Bool_t RemoveUrlAt(Int_t i)
Remove URL at given position. Returns kTRUE on success, kFALSE on error.
TUrl * GetCurrentUrl() const
Return the current url.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
static Long64_t GetFileBytesRead()
Static function returning the total number of bytes read from all files.
virtual Bool_t IsOpen() const
Returns kTRUE in case file is open and kFALSE if file is not open.
static EFileType GetType(const char *name, Option_t *option="", TString *prefix=nullptr)
Resolve the file type as a function of the protocol field in 'name'.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
TObject * FindObject(const char *name) const override
Find object using its name.
Bool_t Notify()
Handle expiration of the idle timer. The session will just be terminated.
This class represents an Internet Protocol (IP) address.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual const char * GetClassName() const
void Clear(Option_t *option="") override
Remove all objects from the list.
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
TObject * Last() const override
Return the last object in the list. Returns 0 when list is empty.
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
This code implements the MD5 message-digest algorithm.
static TMD5 * FileChecksum(const char *file)
Returns checksum of specified file.
Class supporting a collection of lines with C++ code.
virtual Int_t ReadFile(const char *filename)
Read lines in filename in this macro.
void SaveSource(FILE *fp)
Save macro source in file pointer fp.
TList * GetListOfLines() const
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void DeleteAll()
Remove all (key,value) pairs from the map AND delete the keys AND values when they are allocated on t...
void Add(TObject *obj) override
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
TObject * FindObject(const char *keyname) const override
Check if a (key,value) pair exists with keyname as name of the key.
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
static void EnableSchemaEvolutionForAll(Bool_t enable=kTRUE)
Static function enabling or disabling the automatic schema evolution.
void Reset() override
Reset the message buffer so we can use (i.e. fill) it again.
void SetCompressionSettings(Int_t settings=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
Set compression settings.
Int_t Compress()
Compress the message.
TClass * GetClass() const
virtual void RemoveAll()
Remove all sockets from the monitor.
TSocket * Select()
Return pointer to socket for which an event is waiting.
virtual void Add(TSocket *sock, Int_t interest=kRead)
Add socket to the monitor's active list.
Int_t GetActive(Long_t timeout=-1) const
Return number of sockets in the active list.
virtual void DeActivateAll()
De-activate all activated sockets.
TList * GetListOfDeActives() const
Returns a list with all de-active sockets.
virtual void Remove(TSocket *sock)
Remove a socket from the monitor.
The TNamed class is the base class for all named ROOT classes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Collectable string class.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void SysError(const char *method, const char *msgfmt,...) const
Issue system error message.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
R__ALWAYS_INLINE Bool_t IsZombie() const
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
@ kInvalidObject
if object ctor succeeded but object should not be used
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Wrapper for PCRE library (Perl Compatible Regular Expressions).
Int_t Substitute(TString &s, const TString &r, Bool_t doDollarSubst=kTRUE)
Substitute matching part of s with r, dollar back-ref substitution is performed if doDollarSubst is t...
Int_t Match(const TString &s, UInt_t start=0)
Runs a match on s against the regex 'this' was created with.
The PROOF package manager contains tools to manage packages.
void SetLogger(TPackMgrLog_t logger)
Bool_t IsInDir(const char *path)
Method to check if 'path' is in the managed directory Return kTRUE or kFALSE.
void Show(const char *title=0)
Show available packages.
void GetEnabledPackages(TString &packlist)
Method to get a semi-colon separated list with the names of the enabled packages.
Int_t Build(const char *pack, Int_t opt=TPackMgr::kCheckROOT)
Method to build a package.
Int_t Install(const char *par, Bool_t rmold=kFALSE)
Install package from par (unpack the file in the directory); par can be an URL for remote retrieval.
Int_t GetParPath(const char *pack, TString &path)
Method to get the path of the PAR file for package 'pack'.
Int_t Unpack(const char *pack, TMD5 *sum=0)
Read MD5 checksum of the PAR file from the PROOF-INF/md5.txt file.
TMD5 * GetMD5(const char *pack)
Get MD5 checksum of the PAR file corresponding to given package Returns a pointer to a TMD5 object,...
void ShowEnabled(const char *title=0)
Show enabled packages.
TList * GetList() const
Get list of available packages Returns a pointer to a TList object, transferring ownership to the cal...
Int_t Clean(const char *pack)
Clean dir for package 'pack' Return -1 in case of error, 0 otherwise.
static Int_t RegisterGlobalPath(const char *paths)
Parse one or more paths as possible sources of packages Returns number of paths added; or -1 in case ...
Int_t Load(const char *pack, TList *optls=0)
Method to load a package taking an option list Return -1 on error, 0 otherwise.
Int_t Unload(const char *pack)
Method to unload a package.
TList * GetListOfEnabled() const
Get list of enabled packages Returns a pointer to a TList object, transferring ownership to the calle...
static TPackMgr * GetPackMgr(const char *pack, TPackMgr *packmgr=nullptr)
Get the package manager having 'pack'; priority is given to packmgr, if defined.
void SetPrefix(const char *pfx)
Int_t Remove(const char *pack=0, Bool_t dolock=kTRUE)
Remove package 'pack' If 'pack' is null or empty all packages are cleared.
TMD5 * ReadMD5(const char *pack)
Read MD5 checksum of the PAR file from the PROOF-INF/md5.txt file.
const char * GetTitle() const
Returns title of object.
Class used by TMap to store (key,value) pairs.
Named parameter, streamable and storable.
This class implements a plugin library manager.
TPluginHandler * FindHandler(const char *base, const char *uri=nullptr)
Returns the handler if there exists a handler for the specified URI.
Int_t Unlock()
Unlock the directory.
Int_t Lock()
Locks the directory.
The purpose of this class is to provide a complete node description for masters, submasters and worke...
const TString & GetImage() const
const TString & GetWorkDir() const
Container class for processing statistics.
void Print(Option_t *option="") const
Dump the content.
Long64_t GetEntries() const
void SetLearnTime(Double_t learnTime)
void IncCPUTime(Double_t procTime)
void IncProcTime(Double_t procTime)
Long64_t GetBytesRead() const
TQueryResult version adapted to PROOF neeeds.
void SetRunning(Int_t startlog, const char *par, Int_t nwrks)
Call when running starts.
The purpose of this class is to provide a standard interface to static config files.
TString GetFileName() const
TProofNodeInfo * GetMaster()
Get the master node.
TList * GetSubmasters()
Get the list of submaster nodes.
TList * GetWorkers()
Get the list of worker nodes.
virtual Bool_t IsValid() const
Bool_t Notify()
Handle this interrupt.
TProofServInterruptHandler(TProofServ *s)
TProofServLogHandlerGuard(const char *cmd, TSocket *s, const char *pfx="", Bool_t on=kTRUE)
Init a guard for executing a command in a pipe.
TProofServLogHandler * fExecHandler
virtual ~TProofServLogHandlerGuard()
Close a guard for executing a command in a pipe.
Bool_t Notify()
Handle available message in the open file.
virtual ~TProofServLogHandler()
Handle available message in the open file.
TProofServLogHandler(const char *cmd, TSocket *s, const char *pfx="")
Execute 'cmd' in a pipe and handle output messages from the related file.
static Int_t GetCmdRtn()
Static method to get the return code from the execution of a command via the pipe.
static void SetDefaultPrefix(const char *pfx)
Static method to set the default prefix.
TProofServSigPipeHandler(TProofServ *s)
Bool_t Notify()
Handle this signal.
Bool_t Notify()
Handle this interrupt.
TProofServTerminationHandler(TProofServ *s)
Class providing the PROOF server.
const char * GetOrdinal() const
virtual ~TProofServ()
Cleanup.
void SetIdle(Bool_t st=kTRUE)
Change the idle status.
const char * GetConfDir() const
void TruncateLogFile()
Truncate the log file to the 80% of the required max size if this is set.
Int_t CatMotd()
Print message of the day (in the file pointed by the env PROOFMOTD or from fConfDir/etc/proof/motd).
Int_t GetPriority()
Get the processing priority for the group the user belongs too.
void SendStatistics()
Send statistics of slave server to master or client.
const char * GetImage() const
virtual Int_t CreateServer()
Finalize the server setup.
virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, Bool_t resume=kFALSE)
Get list of workers to be used from now on.
Int_t GetQuerySeqNum() const
Bool_t IsWaiting()
Return kTRUE if the session is waiting for the OK to start processing.
void Print(Option_t *option="") const
Print status of slave server.
static void ErrorHandler(Int_t level, Bool_t abort, const char *location, const char *msg)
The PROOF error handler function.
static Long_t fgResMemMax
TMonitor * fMergingMonitor
const char * GetUser() const
virtual void HandleProcess(TMessage *mess, TString *slb=0)
Handle processing request.
void FlushLogFile()
Reposition the read pointer in the log file to the very end.
Int_t CleanupWaitingQueries(Bool_t del=kTRUE, TList *qls=0)
Cleanup the waiting queries list.
static FILE * fgErrorHandlerFile
static Bool_t IsActive()
Static function that returns kTRUE in case we are a PROOF server.
static TProofServ * This()
Static function returning pointer to global object gProofServ.
static void GetLocalServer(TString &dsrv)
Extract LOCALDATASERVER info in 'dsrv'.
virtual void HandleRemove(TMessage *mess, TString *slb=0)
Handle remove request.
static void SetLastEntry(Long64_t lastentry)
Set the last entry before exception.
virtual void HandleArchive(TMessage *mess, TString *slb=0)
Handle archive request.
static Float_t GetMemHWM()
MemHWM getter.
Bool_t IsParallel() const
True if in parallel mode.
TProofLockPath * fQueryLock
static void FilterLocalroot(TString &path, const char *url="root://dum/")
If 'path' is local and 'dsrv' is Xrootd, apply 'path.Localroot' settings, if any.
static FILE * SetErrorHandlerFile(FILE *ferr)
Set the file stream where to log (default stderr).
virtual void HandleFork(TMessage *mess)
Cloning itself via fork. Not implemented.
virtual void HandleSigPipe()
Called when the client is not alive anymore (i.e.
void RedirectOutput(const char *dir=0, const char *mode="w")
Redirect stdout to a log file.
static void SetLastMsg(const char *lastmsg)
Set the message to be sent back in case of exceptions.
virtual void DeletePlayer()
Delete player instance.
virtual void ProcessNext(TString *slb=0)
process the next query from the queue of submitted jobs.
TSocket * GetSocket() const
virtual void HandleUrgentData()
Handle Out-Of-Band data sent by the master or client.
void SetQueryRunning(TProofQueryResult *pq)
Set query in running state.
TProofQueryResult * NextQuery()
Get the next query from the waiting list.
Int_t SetupCommon()
Common part (between TProofServ and TXProofServ) of the setup phase.
Int_t SendResults(TSocket *sock, TList *outlist=0, TQueryResult *pq=0)
Sends all objects from the given list to the specified socket.
const char * GetGroup() const
TDSetElement * GetNextPacket(Long64_t totalEntries=-1)
Get next range of entries to be processed on this server.
Bool_t IsEndMaster() const
void SendAsynMessage(const char *msg, Bool_t lf=kTRUE)
Send an asychronous message to the master / client .
static void ResolveKeywords(TString &fname, const char *path=0)
Replace <ord>, <user>, <u>, <group>, <stag>, <qnum>, <file>, <rver> and <build> placeholders in fname...
Int_t ReceiveFile(const char *file, Bool_t bin, Long64_t size)
Receive a file, either sent by a client or a master server.
virtual Int_t HandleWorkerLists(TMessage *mess)
Handle here all requests to modify worker lists.
static Int_t RegisterDataSets(TList *in, TList *out, TDataSetManager *dsm, TString &e)
Register TFileCollections in 'out' as datasets according to the rules in 'in'.
TVirtualProofPlayer * fPlayer
virtual Int_t HandleSocketInput(TMessage *mess, Bool_t all)
Process input coming from the client or from the master server.
virtual void HandleQueryList(TMessage *mess)
Handle request for list of queries.
virtual void HandleTermination()
const char * GetDataDir() const
virtual void HandleCheckFile(TMessage *mess, TString *slb=0)
Handle file checking request.
TProofLockPath * fCacheLock
TProofServ(Int_t *argc, char **argv, FILE *flog=0)
Main constructor.
virtual Int_t HandleCache(TMessage *mess, TString *slb=0)
Handle here all cache and package requests.
std::recursive_mutex fQMtx
virtual void HandleSocketInput()
Handle input coming from the client or from the master server.
virtual void MakePlayer()
Make player instance.
virtual void HandleSubmerger(TMessage *mess)
Handle a message of type kPROOF_SUBMERGER.
virtual Int_t HandleLibIncPath(TMessage *mess)
Handle lib, inc search paths modification request.
TShutdownTimer * fShutdownTimer
Bool_t IsIdle()
Return the idle status.
TDataSetManagerFile * fDataSetStgRepo
Int_t GetSessionStatus()
Return the status of this session: 0 idle 1 running 2 being terminated (currently unused) 3 queued 4 ...
virtual Int_t HandleDataSets(TMessage *mess, TString *slb=0)
Handle here requests about datasets.
TServerSocket * fMergingSocket
void GetOptions(Int_t *argc, char **argv)
Get and handle command line options.
virtual Int_t Setup()
Print the ProofServ logo on standard output.
static Long_t fgVirtMemMax
TFileHandler * fInputHandler
void SendParallel(Bool_t async=kFALSE)
Send number of parallel nodes to master or client.
Int_t GetCompressionLevel() const
static Long_t GetResMemMax()
ResMemMax getter.
Int_t QueueQuery(TProofQueryResult *pq)
Add a query to the waiting list Returns the number of queries in the list.
TIdleTOTimer * fIdleTOTimer
static Int_t fgLogToSysLog
virtual Int_t Fork()
Fork a child.
static Long_t GetVirtMemMax()
VirtMemMax getter.
Bool_t UnlinkDataDir(const char *path)
Scan recursively the datadir and unlink it if empty Return kTRUE if it can be unlinked,...
Int_t GetProtocol() const
Bool_t AcceptResults(Int_t connections, TVirtualProofPlayer *mergerPlayer)
Accept and merge results from a set of workers.
TDataSetManager * fDataSetManager
TQueryResultManager * fQMgr
void Reset(const char *dir)
Reset PROOF environment to be ready for execution of next command.
virtual void Terminate(Int_t status)
Terminate the proof server.
virtual void HandleException(Int_t sig)
Exception handler: we do not try to recover here, just exit.
Int_t OldAuthSetup(TString &wconf)
Setup authentication related stuff for old versions.
static TString fgSysLogEntity
Int_t WaitingQueries()
Return the number of waiting queries.
void Run(Bool_t retrn=kFALSE)
Main server eventloop.
const char * GetWorkDir() const
const char * GetPrefix() const
static TString fgSysLogService
void LogToMaster(Bool_t on=kTRUE)
TReaperTimer * fReaperTimer
static Long64_t fgLastEntry
const char * GetSessionTag() const
virtual void SendLogFile(Int_t status=0, Int_t start=-1, Int_t end=-1)
Send log file to master.
static Float_t GetMemStop()
MemStop getter.
Bool_t IsTopMaster() const
void RestartComputeTime()
Reset the compute time.
TProofQueryResult * MakeQueryResult(Long64_t nentries, const char *opt, TList *inl, Long64_t first, TDSet *dset, const char *selec, TObject *elist)
Create a TProofQueryResult instance for this query.
virtual void HandleRetrieve(TMessage *mess, TString *slb=0)
Handle retrieve request.
Int_t UpdateSessionStatus(Int_t xst=-1)
Update the session status in the relevant file.
TObject * Get(const char *namecycle)
Get object with name "name;cycle" (e.g.
static TMap * GetDataSetNodeMap(TFileCollection *fc, TString &emsg)
Get a map {server-name, list-of-files} for collection 'fc' to be used in TPacketizerFile.
const char * GetService() const
This class controls a Parallel ROOT Facility, PROOF, cluster.
const char * GetSessionTag() const
void ShowPackages(Bool_t all=kFALSE, Bool_t redirlog=kFALSE)
List contents of package directory.
Bool_t IsEndMaster() const
Int_t UploadPackage(const char *par, EUploadPackageOpt opt=kUntar, TList *workers=0)
Upload a PROOF archive (PAR file).
Int_t SendCurrentState(ESlaves list=kActive)
Transfer the current state of the master to the active slave servers.
TList * GetListOfSlaves() const
Int_t DisablePackages()
Remove all packages.
static Int_t SaveInputData(TQueryResult *qr, const char *cachedir, TString &emsg)
Save input data file from 'cachedir' into the sandbox or create a the file with input data objects.
Int_t BuildPackage(const char *package, EBuildPackageOpt opt=kBuildAll, Int_t chkveropt=TPackMgr::kCheckROOT, TList *workers=0)
Build specified package.
virtual void Print(Option_t *option="") const
Print status of PROOF cluster.
TList * GetListOfInactiveSlaves() const
static Int_t GetInputData(TList *input, const char *cachedir, TString &emsg)
Get the input data from the file defined in the input list.
Bool_t IsParallel() const
TVirtualProofPlayer * GetPlayer() const
void AskParallel()
Ask the for the number of parallel slaves.
virtual void ClearCache(const char *file=0)
Remove file from all file caches.
Int_t ActivateWorker(const char *ord, Bool_t save=kTRUE)
Make sure that the worker identified by the ordinal number 'ord' is in the active list.
TObject * GetParameter(const char *par) const
Get specified parameter.
void SetRunStatus(ERunStatus rst)
static void AssertMacroPath(const char *macro)
Make sure that the directory path contained by macro is in the macro path.
Int_t AddIncludePath(const char *incpath, Bool_t onClient=kFALSE, TList *wrks=0, Bool_t doCollect=kTRUE)
Add 'incpath' to the inc path search.
virtual void ShowCache(Bool_t all=kFALSE)
List contents of file cache.
Int_t SetParallel(Int_t nodes=-1, Bool_t random=kFALSE)
Tell PROOF how many slaves to use in parallel.
static void AddEnvVar(const char *name, const char *value)
Add an variable to the list of environment variables passed to proofserv on the master and slaves.
static Bool_t GetFileInCmd(const char *cmd, TString &fn)
Static method to extract the filename (if any) form a CINT command.
Float_t GetCpuTime() const
void SetPlayer(TVirtualProofPlayer *player)
Set a new PROOF player.
Int_t ClearPackage(const char *package)
Remove a specific package.
Int_t AddWorkers(TList *wrks)
Works on the master node only.
Int_t ClearPackages()
Remove all packages.
void SetActive(Bool_t=kTRUE)
Int_t RemoveIncludePath(const char *incpath, Bool_t onClient=kFALSE)
Remove 'incpath' from the inc path search.
Int_t GetParallel() const
Returns number of slaves active in parallel mode.
Int_t UnloadPackage(const char *package)
Unload specified package.
Long64_t GetBytesRead() const
void AskStatistics()
Ask the for the statistics of the slaves.
Int_t DeactivateWorker(const char *ord, Bool_t save=kTRUE)
Remove the worker identified by the ordinal number 'ord' from the the active list.
void SetRealTimeLog(Bool_t on=kTRUE)
Switch ON/OFF the real-time logging facility.
Int_t Ping(ESlaves list)
Ping PROOF slaves. Returns the number of slaves that responded.
Int_t UnloadPackages()
Unload all packages.
virtual TVirtualProofPlayer * MakePlayer(const char *player=0, TSocket *s=0)
Construct a TProofPlayer object.
TList * GetListOfActiveSlaves() const
virtual Int_t Load(const char *macro, Bool_t notOnClient=kFALSE, Bool_t uniqueOnly=kTRUE, TList *wrks=0)
Load the specified macro on master, workers and, if notOnClient is kFALSE, on the client.
Int_t AddDynamicPath(const char *libpath, Bool_t onClient=kFALSE, TList *wrks=0, Bool_t doCollect=kTRUE)
Add 'libpath' to the lib path search.
Int_t RemoveWorkers(TList *wrks)
Used for shuting down the workres after a query is finished.
Int_t RemoveDynamicPath(const char *libpath, Bool_t onClient=kFALSE)
Remove 'libpath' from the lib path search.
TList * GetOutputList()
Get list with all object created during processing (see Process()).
void StopProcess(Bool_t abort, Int_t timeout=-1)
Send STOPPROCESS message to master and workers.
Int_t SendFile(const char *file, Int_t opt=(kBinary|kForward|kCp|kCpBin), const char *rfile=0, TSlave *sl=0)
Send a file to master or slave servers.
static Int_t AssertDataSet(TDSet *dset, TList *input, TDataSetManager *mgr, TString &emsg)
Make sure that dataset is in the form to be processed.
void Interrupt(EUrgent type, ESlaves list=kActive)
Send interrupt to master or slave servers.
virtual Int_t Echo(const TObject *obj)
Sends an object to master and workers and expect them to send back a message with the output of its T...
Int_t SendCommand(const char *cmd, ESlaves list=kActive)
Send command to be executed on the PROOF master and/or slaves.
TList * GetListOfSlaveInfos()
Returns list of TSlaveInfo's. In case of error return 0.
virtual void ValidateDSet(TDSet *dset)
Validate a TDSet.
const char * GetUser() const
void TerminateWorker(TSlave *wrk)
Ask an active worker 'wrk' to terminate, i.e. to shutdown.
Int_t LoadPackage(const char *package, Bool_t notOnClient=kFALSE, TList *loadopts=0, TList *workers=0)
Load specified package.
void SetLogLevel(Int_t level, UInt_t mask=TProofDebug::kAll)
Set server logging level.
TList * GetListOfBadSlaves() const
Int_t DisablePackage(const char *package)
Remove a specific package.
void ShowEnabledPackages(Bool_t all=kFALSE)
List which packages are enabled.
Bool_t UseDynamicStartup() const
Bool_t IsDataReady(Long64_t &totalbytes, Long64_t &bytesready)
See if the data is ready to be analyzed.
const char * GetGroup() const
Class managing the query-result area.
void SaveQuery(TProofQueryResult *qr, const char *fout=0)
Save current status of query 'qr' to file name fout.
Bool_t FinalizeQuery(TProofQueryResult *pq, TProof *proof, TVirtualProofPlayer *player)
Final steps after Process() to complete the TQueryResult instance.
void RemoveQuery(TQueryResult *qr, Bool_t soft=kFALSE)
Remove everything about query qr.
TList * PreviousQueries() const
Int_t CleanupQueriesDir()
Remove all queries results referring to previous sessions.
Int_t ApplyMaxQueries(Int_t mxq)
Scan the queries directory and remove the oldest ones (and relative dirs, if empty) in such a way onl...
TProofQueryResult * LocateQuery(TString queryref, Int_t &qry, TString &qdir)
Locate query referenced by queryref.
Int_t CleanupSession(const char *sessiontag)
Cleanup query dir qdir.
Int_t DrawQueries() const
Int_t LockSession(const char *sessiontag, TProofLockPath **lck)
Try locking query area of session tagged sessiontag.
void IncrementDrawQueries()
void ScanPreviousQueries(const char *dir)
Scan the queries directory for the results of previous queries.
A container class for query results.
Long64_t GetEntries() const
void SetArchived(const char *archfile)
Set (or update) query in archived state.
TMacro * GetSelecImp() const
TQueryResult * CloneInfo()
Return an instance of TQueryResult containing only the local info fields, i.e.
virtual void SetProcessInfo(Long64_t ent, Float_t cpu=0., Long64_t siz=-1, Float_t inittime=0., Float_t proctime=0.)
Set processing info.
virtual void SetInputList(TList *in, Bool_t adopt=kTRUE)
Set / change the input list.
TObject * GetInputObject(const char *classname) const
Return first instance of class 'classname' in the input list.
TMacro * GetSelecHdr() const
const char * GetOptions() const
Long64_t GetFirst() const
Int_t fSeqNum
query unique sequential number
Float_t GetUsedCPU() const
Long64_t GetBytes() const
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
static const char * GetMacroPath()
Get macro search path. Static utility function.
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
Bool_t Notify()
Check if any of the registered children has changed its state.
void AddPid(Int_t pid)
Add an entry for 'pid' in the internal list.
virtual ~TReaperTimer()
Destructor.
virtual TSQLRow * Next()=0
virtual const char * GetField(Int_t field)=0
virtual TSQLResult * Query(const char *sql)=0
static TSQLServer * Connect(const char *db, const char *uid, const char *pw)
The db should be of the form: <dbms>://<host>[:<port>][/<database>], e.g.: mysql://pcroot....
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Int_t GetLocalPort() override
Get port # to which server socket is bound. In case of error returns -1.
virtual TSocket * Accept(UChar_t Opt=0)
Accept a connection on a server socket.
TShutdownTimer(TProofServ *p, Int_t delay)
Construtor.
Bool_t Notify()
Handle expiration of the shutdown timer.
ESignals GetSignal() const
void SetSysInfo(SysInfo_t si)
Setter for fSysInfo.
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
TTimeStamp GetLastUsage()
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
virtual void Close(Option_t *opt="")
Close the socket.
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
Option_t * GetOption() const override
virtual Int_t SendObject(const TObject *obj, Int_t kind=kMESS_OBJECT)
Send an object.
void SetCompressionSettings(Int_t settings=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
Used to specify the compression level and algorithm: settings = 100 * algorithm + level.
virtual Bool_t IsValid() const
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
Double_t CpuTime()
Stop the stopwatch (if it is running) and return the cputime (in seconds) passed between the start an...
void Stop()
Stop the stopwatch.
void ToLower()
Change string to lower-case.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
TString & Insert(Ssiz_t pos, const char *s)
Int_t Atoi() const
Return integer value of string.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
const char * Data() const
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
TString & ReplaceAll(const TString &s1, const TString &s2)
Ssiz_t Last(char c) const
Find last occurrence of a character c.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return 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 int Umask(Int_t mask)
Set the process file creation mode mask.
virtual void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
virtual Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=nullptr)
Redirect standard output (stdout, stderr) to the specified file.
virtual const char * GetBuildCompilerVersion() const
Return the build compiler version.
virtual TInetAddress GetSockName(int sock)
Get Internet Protocol (IP) address of host and port #.
virtual Func_t DynFindSymbol(const char *module, const char *entry)
Find specific entry point in specified library.
virtual void Syslog(ELogLevel level, const char *mess)
Send mess to syslog daemon.
static void ResetErrno()
Static function resetting system error number.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual void Openlog(const char *name, Int_t options, ELogFacility facility)
Open connection to system log daemon.
static Int_t GetErrno()
Static function returning system error number.
virtual void AddIncludePath(const char *includePath)
Add a directory to the already set include path.
virtual int Chmod(const char *file, UInt_t mode)
Set the file permission bits. Returns -1 in case or error, 0 otherwise.
virtual void FreeDirectory(void *dirp)
Free a directory.
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
virtual int GetPid()
Get process id.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual const char * GetIncludePath()
Get the list of include path.
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
virtual int MakeDirectory(const char *name)
Make a directory.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual int GetSysInfo(SysInfo_t *info) const
Returns static system info, like OS type, CPU type, number of CPUs RAM size, etc into the SysInfo_t s...
virtual void SetIncludePath(const char *includePath)
IncludePath should contain the list of compiler flags to indicate where to find user defined header f...
virtual TFileHandler * RemoveFileHandler(TFileHandler *fh)
Remove a file handler from the list of file handlers.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
virtual TSeqCollection * GetListOfFileHandlers() const
virtual FILE * OpenPipe(const char *command, const char *mode)
Open a pipe.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual FILE * TempFileName(TString &base, const char *dir=nullptr)
Create a secure temporary file by appending a unique 6 letter string to base.
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
virtual void ExitLoop()
Exit from event loop.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
virtual int GetProcInfo(ProcInfo_t *info) const
Returns cpu and memory used by this process into the ProcInfo_t structure.
virtual int ClosePipe(FILE *pipe)
Close the pipe.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual void AddSignalHandler(TSignalHandler *sh)
Add a signal handler to list of system signal handlers.
virtual const char * GetDynamicPath()
Return the dynamic path (used to find shared libraries).
virtual void Exit(int code, Bool_t mode=kTRUE)
Exit the application.
virtual Int_t GetGid(const char *group=nullptr)
Returns the group's id. If group = 0, returns current user's group.
virtual const char * HostName()
Return the system's host name.
virtual Int_t GetUid(const char *user=nullptr)
Returns the user's id. If user = 0, returns current user's id.
virtual void SetDynamicPath(const char *pathname)
Set the dynamic path to a new value.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
virtual const char * WorkingDirectory()
Return working directory.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual void Setenv(const char *name, const char *value)
Set environment variable.
virtual const char * GetBuildArch() const
Return the build architecture.
virtual const char * HomeDirectory(const char *userName=nullptr)
Return the user's home directory.
virtual void Abort(int code=0)
Abort the application.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
virtual int Unlink(const char *name)
Unlink, i.e.
virtual void StackTrace()
Print a stack trace.
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
char * DynamicPathName(const char *lib, Bool_t quiet=kFALSE)
Find a dynamic library called lib using the system search paths.
The TTimeStamp encapsulates seconds and ns since EPOCH.
const char * AsString(const Option_t *option="") const
Return the date & time as a string.
Handles synchronous and a-synchronous timer events.
virtual void Start(Long_t milliSec=-1, Bool_t singleShot=kFALSE)
Starts the timer with a milliSec timeout.
virtual void TurnOn()
Add the timer to the system timer list.
void Reset()
Reset the timer.
This class represents a WWW compatible URL.
const char * GetFile() const
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
const char * GetProtocol() const
Abstract interface for the PROOF player.
virtual void AddInput(TObject *inp)=0
virtual TQueryResult * GetCurrentQuery() const =0
virtual Int_t GetLearnEntries()=0
virtual TList * GetInputList() const =0
virtual void UpdateProgressInfo()=0
virtual Long64_t GetEventsProcessed() const =0
virtual void SetMerging(Bool_t on=kTRUE)=0
virtual EExitStatus GetExitStatus() const =0
virtual void AddQueryResult(TQueryResult *q)=0
virtual void MergeOutput(Bool_t=kFALSE)=0
static TVirtualProofPlayer * Create(const char *player, TProof *p, TSocket *s=0)
Create a PROOF player.
virtual Int_t AddOutputObject(TObject *obj)=0
virtual TClass * IsA() const
virtual void RemoveQueryResult(const char *ref)=0
virtual Int_t SavePartialResults(Bool_t queryend=kFALSE, Bool_t force=kFALSE)=0
virtual void StopProcess(Bool_t abort, Int_t timeout=-1)=0
virtual Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)=0
virtual TProofProgressStatus * GetProgressStatus() const =0
virtual void SetOutputFilePath(const char *fp)=0
virtual TList * GetOutputList() const =0
virtual void SetCurrentQuery(TQueryResult *q)=0
virtual Long64_t GetCacheSize()=0