23 #include "RConfigure.h"
36 #include <sys/types.h>
49 #if (defined(__FreeBSD__) && (__FreeBSD__ < 4)) || \
50 (defined(__APPLE__) && (!defined(MAC_OS_X_VERSION_10_3) || \
51 (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3)))
53 #define lockf(fd, op, sz) flock((fd), (op))
55 #define F_LOCK (LOCK_EX | LOCK_NB)
58 #define F_ULOCK LOCK_UN
89 #include "compiledata.h"
132 static const char *__crashreporter_info__ = 0;
133 asm(
".desc ___crashreporter_info__, 0x10");
166 Printf(
"Received SIGTERM: terminating");
167 fServ->HandleTermination();
187 fServ->HandleUrgentData();
210 fServ->HandleSigPipe();
231 fServ->HandleSocketInput();
235 TString TProofServLogHandler::fgPfx =
"";
236 Int_t TProofServLogHandler::fgCmdRtn = 0;
258 Error(
"TProofServLogHandler",
"executing command in pipe");
262 Error(
"TProofServLogHandler",
263 "undefined command (%p) or socket (%p)", (
int *)cmd, s);
281 Error(
"TProofServLogHandler",
"undefined file (%p) or socket (%p)", f, s);
294 fgCmdRtn = WIFEXITED(rc) ? WEXITSTATUS(rc) : -1;
311 while (fgets(line,
sizeof(line),
fFile)) {
312 if ((plf = strchr(line,
'\n')))
354 const char *pfx,
Bool_t on)
362 Error(
"TProofServLogHandlerGuard",
"invalid handler");
366 Error(
"TProofServLogHandlerGuard",
"undefined command");
374 const char *pfx,
Bool_t on)
382 Error(
"TProofServLogHandlerGuard",
"invalid handler");
386 Error(
"TProofServLogHandlerGuard",
"undefined file");
420 printf(
"TShutdownTimer::Notify: checking activity on the input socket\n");
430 printf(
"TShutdownTimer::Notify: input socket: %p: did not show any activity"
431 " during the last %d mins: aborting\n", xs,
fTimeout);
437 printf(
"TShutdownTimer::Notify: input socket: %p: show activity"
438 " %ld secs ago\n", xs, dt / 60000);
468 spid.
Form(
"%d", pid);
489 }
while (pid < 0 && errno == EINTR);
492 pid = _cwait(&status, (intptr_t)p->
GetVal(), 0);
494 if (pid > 0 && pid == p->
GetVal()) {
518 Info (
"Notify",
"session idle for more then %lld secs: terminating",
Long64_t(
fTime)/1000);
524 Warning(
"Notify",
"problems updating session status (errno: %d)", -uss_rc);
528 msg.
Form(
"\n//\n// PROOF session at %s (%s) terminated because idle for more than %lld secs\n"
529 "// Please IGNORE any error message possibly displayed below\n//",
532 msg.
Form(
"\n//\n// PROOF session at %s (%s) terminated because idle for more than %lld secs\n//",
540 Warning(
"Notify",
"fProofServ undefined!");
567 Printf(
"proofserv: command line testing: OK");
579 if (fgVirtMemMax < 0 && gSystem->Getenv(
"PROOF_VIRTMEMMAX")) {
581 if (mmx < kMaxLong && mmx > 0)
585 if (fgVirtMemMax < 0 && gSystem->Getenv(
"ROOTPROOFASHARD")) {
587 if (mmx < kMaxLong && mmx > 0)
592 if (fgResMemMax < 0 && gSystem->Getenv(
"PROOF_RESMEMMAX")) {
594 if (mmx < kMaxLong && mmx > 0)
602 Warning(
"TProofServ",
"requested memory fraction threshold to stop processing"
603 " (MemStop) out of range [0,1] - ignoring");
607 Warning(
"TProofServ",
"requested memory fraction threshold for warning and finer monitoring"
608 " (MemHWM) out of range [0,MemStop] - ignoring");
615 if ((
gEnv->
GetValue(
"Proof.GdbHook",0) == 3 && !test) ||
617 while (gProofServDebug)
622 if (argc && *argc >= 4)
623 if (!strcmp(argv[3],
"test"))
627 if (argc && *argc < 2) {
628 Error(
"TProofServ",
"Must have at least 1 arguments (see proofd).");
741 Warning(
"TProofServ",
"bad formatted log file size limit ignored: '%s'", logmx.
Data());
761 char c = (slog[0] ==
'M' || slog[0] ==
'm') ?
'm' :
'a';
762 c = (slog[0] ==
'W' || slog[0] ==
'w') ?
'w' : c;
769 Warning(
"TProofServ",
"request for syslog logging ineffective!");
784 if (enableSchemaEvolution) {
787 Info(
"TProofServ",
"automatic schema evolution in TMessage explicitly disabled");
800 if (opensock.
Length() <= 0)
804 Fatal(
"CreateServer",
"Invalid socket descriptor number (%d)", sock);
816 while (gProofServDebug)
822 while (gProofServDebug)
828 Info(
"CreateServer",
"Service %s ConfDir %s IsMaster %d\n",
915 TString master =
"proof://__master__";
925 Error(
"CreateServer",
"no plugin manager found");
934 Error(
"CreateServer",
"no plugin found for TProof with a"
943 Error(
"CreateServer",
"plugin for TProof could not be loaded");
955 Error(
"CreateServer",
"plugin for TProof could not be executed");
978 msg.
Form(
"Warning: client version is too old: automatic schema evolution is ineffective.\n"
979 " This may generate compatibility problems between streamed objects.\n"
980 " The advise is to move to ROOT >= 5.21/02 .");
992 Info(
"CreateServer",
" idle timer started (%d secs)", idle_to);
994 Info(
"CreateServer",
" idle timer not started (no idle timeout requested)");
1041 motdname +=
"/etc/proof/noproof";
1043 if ((motd = fopen(motdname,
"r"))) {
1046 while ((c = getc(motd)) != EOF)
1058 Long_t id, flags, modtime, lasttime = 0;
1063 if (time(0) - lasttime > (time_t)86400)
1072 motdname +=
"/etc/proof/motd";
1075 if (modtime > lasttime || show) {
1076 if ((motd = fopen(motdname,
"r"))) {
1079 while ((c = getc(motd)) != EOF)
1089 Int_t fd = creat(last, 0600);
1090 if (fd >= 0)
close(fd);
1104 Error(
"Get",
"problems sending request");
1122 Error(
"Get",
"command %d cannot be executed while processing", what);
1123 }
else if (xrc == -2) {
1124 Error(
"Get",
"unknown command %d ! Protocol error?", what);
1142 Info(
"RestartComputeTime",
"compute time restarted after %f secs (%d entries)",
1171 Error(
"GetNextPacket",
"no progress status object");
1188 req << cacheSize << learnent;
1193 req << totalEntries;
1199 PDB(kLoop, 2) status->Print();
1200 Info(
"GetNextPacket",
"cacheSize: %lld, learnent: %d", cacheSize, learnent);
1208 << bytesRead << totalEntries;
1216 Error(
"GetNextPacket",
"Send() failed, returned %d", rc);
1224 Warning(
"GetNextPacket",
"problems saving partial results");
1235 Error(
"GetNextPacket",
"Recv() failed, returned %d", rc);
1251 PDB(kLoop, 2)
Info(
"GetNextPacket",
"'%s' '%s' '%s' %lld %lld",
1252 e->GetFileName(), e->GetDirectory(),
1253 e->GetObjName(), e->GetFirst(),e->GetNum());
1255 PDB(kLoop, 2)
Info(
"GetNextPacket",
"Done");
1265 PDB(kLoop, 2)
Info(
"GetNextPacket:kPROOF_STOPPROCESS",
"received");
1271 Error(
"GetNextPacket",
"command %d cannot be executed while processing", what);
1272 }
else if (xrc == -2) {
1273 Error(
"GetNextPacket",
"unknown command %d ! Protocol error?", what);
1292 Bool_t xtest = (argc && *argc > 3 && !strcmp(argv[3],
"test")) ?
kTRUE :
kFALSE;
1295 if (xtest && !(isatty(0) == 0 || isatty(1) == 0)) {
1296 Printf(
"proofserv: command line testing: OK");
1300 if (!argc || (argc && *argc <= 1)) {
1301 Fatal(
"GetOptions",
"Must be started from proofd with arguments");
1305 if (!strcmp(argv[1],
"proofserv")) {
1308 }
else if (!strcmp(argv[1],
"proofslave")) {
1312 Fatal(
"GetOptions",
"Must be started as 'proofserv' or 'proofslave'");
1320 Fatal(
"GetOptions",
"ROOTCONFDIR shell variable not set");
1351 Error(
"HandleSocketInput",
"retrieving message from input socket");
1372 emsg.
Form(
"HandleSocketInput: command %d cannot be executed while processing", what);
1373 }
else if (rc == -3) {
1374 emsg.
Form(
"HandleSocketInput: message %d undefined! Protocol error?", what);
1376 emsg.
Form(
"HandleSocketInput: unknown command %d! Protocol error?", what);
1379 }
else if (rc == 2) {
1383 Info(
"HandleSocketInput",
"message of type %d enqueued; sz: %d",
1393 Info(
"HandleSocketInput",
"processing enqueued message of type %d; left: %d",
1403 }
catch (std::bad_alloc &) {
1405 exmsg.
Form(
"caught exception 'bad_alloc' (memory leak?) %s %lld",
1407 }
catch (std::exception &exc) {
1409 exmsg.
Form(
"caught standard exception '%s' %s %lld",
1413 exmsg.
Form(
"caught exception throwing %d %s %lld",
1415 }
catch (
const char *str) {
1417 exmsg.
Form(
"caught exception throwing '%s' %s %lld",
1421 exmsg.
Form(
"caught exception <unknown> %s %lld",
1428 Error(
"HandleSocketInput",
"%s", exmsg.
Data());
1439 exmsg.
Form(
"high-memory footprint detected during Process(...) - terminating");
1440 Error(
"HandleSocketInput",
"%s", exmsg.
Data());
1455 if (rc == 0 && ngwrks == 0 && !masterOnly && !dynamicStartup) {
1456 SendAsynMessage(
" *** No workers left: cannot continue! Terminating ... *** ");
1483 if (!mess)
return -3;
1487 Info(
"HandleSocketInput",
"processing message type %d from '%s'",
1492 Int_t rc = 0, lirc = 0;
1510 Info(
"HandleSocketInput:kMESS_CINT",
"processing: %s...", str);
1529 if (pslb) slb = str;
1561 sscanf(str,
"%d %u", &
fLogLevel, &mask);
1566 Info(
"HandleSocketInput:kPROOF_LOGLEVEL",
"debug level set to %d (mask: 0x%x)",
1597 Warning(
"HandleSocketInput:kPROOF_STATUS",
1598 "kPROOF_STATUS message is obsolete");
1600 Warning(
"HandleSocketInput:kPROOF_STATUS",
"problem sending of request");
1617 Info(
"HandleSocketInput:kPROOF_STOP",
"request for worker %s", ord.Data());
1621 Info(
"HandleSocketInput:kPROOF_STOP",
"got request to terminate");
1634 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_STOPPROCESS",
"enter");
1641 Info(
"HandleSocketInput:kPROOF_STOPPROCESS",
1642 "recursive mode: enter %d, %ld", aborted, timeout);
1656 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_PROCESS",
"enter");
1666 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_SENDOUTPUT",
1667 "worker was asked to send output to master");
1670 Error(
"HandleSocketInput:kPROOF_SENDOUTPUT",
"problems sending output list");
1715 Info(
"HandleSocketInput:kPROOF_MAXQUERIES",
"Enter");
1727 Info(
"HandleSocketInput:kPROOF_CLEANUPSESSION",
"Enter");
1731 Printf(
"Session %s cleaned up", stag.Data());
1733 Printf(
"Could not cleanup session %s", stag.Data());
1743 {
PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
"Enter");
1751 (*mess) >> isTree >> filename >> dir >> objname;
1752 PDB(kGlobal, 2)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
1753 "Report size of object %s (%s) in dir %s in file %s",
1754 objname.Data(), isTree ?
"T" :
"O",
1757 PDB(kGlobal, 2)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
1758 "Found %lld %s", entries, isTree ?
"entries" :
"objects");
1763 answ << entries << objname;
1766 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
"Done");
1790 sscanf(str,
"%1023s %d %ld %d", name, &bin, &size, &fw);
1792 sscanf(str,
"%1023s %d %ld", name, &bin, &size);
1812 if (copytocache && size > 0 &&
1821 Info(
"HandleSocketInput",
"forwarding file: %s", fnam.
Data());
1822 if (
fProof->
SendFile(fnam, opt, (copytocache ?
"cache" :
"")) < 0) {
1823 Error(
"HandleSocketInput",
"forwarding file: %s", fnam.
Data());
1837 (*mess) >> start >> end;
1839 Info(
"HandleSocketInput:kPROOF_LOGFILE",
1840 "Logfile request - byte range: %d - %d", start, end);
1871 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_CACHE",
"enter");
1884 Warning(
"HandleSocketInput:kPROOF_WORKERLISTS",
1885 "Action meaning-less on worker nodes: protocol error?");
1896 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
"Enter");
1909 Error(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
1910 "adding a list of worker nodes returned: %d", ret);
1913 Error(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
1914 "getting list of worker nodes returned: %d", retVal);
1934 answ << (
TList *)info;
1940 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
"Done");
1951 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETTREEHEADER",
"Enter");
1958 Error(
"HandleSocketInput:kPROOF_GETTREEHEADER",
"could not create TProofPlayer instance!");
1961 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETTREEHEADER",
"Done");
1971 {
PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETOUTPUTLIST",
"Enter");
1972 TList* outputList = 0;
1976 outputList =
new TList();
1978 outputList =
new TList();
1983 while ( (o =
next()) ) {
1993 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETOUTPUTLIST",
"Done");
2000 Info(
"HandleSocketInput:kPROOF_VALIDATE_DSET",
"Enter");
2006 else dset->Validate();
2013 Info(
"HandleSocketInput:kPROOF_VALIDATE_DSET",
"Done");
2023 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_DATA_READY",
"Enter");
2026 Long64_t totalbytes = 0, bytesready = 0;
2028 answ << dataready << totalbytes << bytesready;
2030 Error(
"HandleSocketInput:kPROOF_DATA_READY",
2031 "This message should not be sent to slaves");
2035 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_DATA_READY",
"Done");
2051 Error(
"HandleSocketInput",
"old client: no or incompatible dataset support");
2076 Info(
"HandleSocketInput:kPROOF_REALTIMELOG",
2077 "setting real-time logging %s", (on ?
"ON" :
"OFF"));
2100 Error(
"HandleSocketInput",
"no queries enqueued");
2113 Error(
"HandleSocketInput",
"adding a list of worker nodes returned: %d", ret);
2126 Error(
"HandleSocketInput",
"error getting list of worker nodes");
2128 Warning(
"HandleSocketInput",
"query was re-queued!");
2130 Error(
"HandleSocketInput",
"unexpected answer: %d", retVal);
2151 " idle or undefined player - ignoring");
2177 smsg.
Form(
"Echo response from %s:%s: %s",
2188 Error(
"HandleSocketInput",
"Can't redirect output");
2203 smsg.
Form(
"*** Echo response from %s:%s ***\n",
2209 while (( line = (
TObjString *)nextLine() )) {
2210 smsg.
Append( line->String() );
2226 Error(
"HandleSocketInput",
"unknown command %d", what);
2251 Int_t mergedWorkers = 0;
2253 PDB(kSubmerger, 1)
Info(
"AcceptResults",
"enter");
2261 Int_t numworkers = 0;
2266 Info(
"AcceptResults",
"interrupt!");
2274 if (sw && sw != (
TSocket *)(-1)) {
2278 Info(
"AcceptResults",
"connection from a worker accepted on merger %s ",
2281 if (++numworkers >= connections)
2285 Info(
"AcceptResults",
"spurious signal found of merging socket");
2288 if (s->
Recv(mess) < 0) {
2289 Error(
"AcceptResults",
"problems receiving message");
2293 Info(
"AcceptResults",
"message received: %d ", (mess ? mess->
What() : 0));
2295 Error(
"AcceptResults",
"message received: %p ", mess);
2304 PDB(kSubmerger, 2)
Info(
"AcceptResults",
" type %d ", type);
2308 Info(
"AcceptResults",
2309 "a new worker has been mergerd. Total merged workers: %d",
2315 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"removing %p (has been merged)", o);
2318 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"%p not merged yet", o);
2326 for (
Int_t i =0; i< size; ++i){
2328 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"closing socket");
2335 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"exit: %d", result);
2345 Int_t n, nch, wasted = 0;
2347 const Int_t kBufSize = 1024;
2348 char waste[kBufSize];
2354 Info(
"HandleUrgentData",
"handling oob...");
2375 if (nch > kBufSize) nch = kBufSize;
2378 Error(
"HandleUrgentData",
"error receiving waste");
2383 Error(
"HandleUrgentData",
"error receiving OOB");
2389 Info(
"HandleUrgentData",
"got OOB byte: %d\n", oob_byte);
2396 Info(
"HandleUrgentData",
"*** Hard Interrupt");
2413 Error(
"HandleUrgentData",
"error sending OOB");
2424 if (nch > kBufSize) nch = kBufSize;
2427 Error(
"HandleUrgentData",
"error receiving waste (2)");
2437 Info(
"HandleUrgentData",
"Soft Interrupt");
2444 Error(
"HandleUrgentData",
"soft interrupt flushed stream");
2455 Info(
"HandleUrgentData",
"Shutdown Interrupt");
2466 Error(
"HandleUrgentData",
"unexpected OOB byte");
2486 Info(
"HandleSigPipe",
"keepAlive probe failed");
2495 Info(
"HandleSigPipe",
"keepAlive probe failed");
2538 if ((freopen(logfile, mode, stdout)) == 0)
2539 SysError(
"RedirectOutput",
"could not freopen stdout (%s)", logfile);
2541 if ((dup2(fileno(stdout), fileno(stderr))) < 0)
2542 SysError(
"RedirectOutput",
"could not redirect stderr");
2544 if ((
fLogFile = fopen(logfile,
"r")) == 0)
2545 SysError(
"RedirectOutput",
"could not open logfile '%s'", logfile);
2549 Warning(
"RedirectOutput",
"no way to tell master (or client) where"
2550 " to upload packages");
2565 dd.
Replace(0, ic,
"proofserv");
2589 if (size <= 0)
return 0;
2592 Int_t fd =
open(file, O_CREAT | O_TRUNC | O_WRONLY, 0600);
2594 SysError(
"ReceiveFile",
"error opening file %s", file);
2598 const Int_t kMAXBUF = 16384;
2599 char buf[kMAXBUF], cpy[kMAXBUF];
2604 while (filesize < size) {
2605 left =
Int_t(size - filesize);
2617 Int_t k = 0, i = 0, j = 0;
2624 cpy[j++] = buf[i++];
2628 w =
write(fd, q, r);
2630 w =
write(fd, p, r);
2634 SysError(
"ReceiveFile",
"error writing to file %s", file);
2642 Error(
"ReceiveFile",
"error during receiving file %s", file);
2650 if (chmod(file, 0644) != 0)
2651 Warning(
"ReceiveFile",
"error setting mode 0644 on file %s", file);
2690 off_t ltot=0, lnow=0;
2695 ltot = lseek(fileno(stdout), (off_t) 0, SEEK_END);
2698 if (ltot >= 0 && lnow >= 0) {
2701 if (end <= start || end > ltot)
2703 left = (
Int_t)(end - start);
2708 left = (
Int_t)(ltot - lnow);
2715 SysError(
"SendLogFile",
"error sending kPROOF_LOGFILE");
2719 const Int_t kMAXBUF = 32768;
2721 Int_t wanted = (left > kMAXBUF) ? kMAXBUF : left;
2729 SysError(
"SendLogFile",
"error reading log file");
2733 if (end == ltot && len == wanted)
2737 SysError(
"SendLogFile",
"error sending log file");
2743 wanted = (left > kMAXBUF) ? kMAXBUF : left;
2745 }
while (len > 0 && left > 0);
2749 if (adhoc && lnow >=0 )
2756 mess << status << (
Int_t) 1;
2759 SysError(
"SendLogFile",
"error sending kPROOF_LOGDONE");
2763 PDB(kGlobal, 1)
Info(
"SendLogFile",
"kPROOF_LOGDONE sent");
2780 mess << bytesread << realtime << cputime <<
workdir;
2791 Int_t nparallel = 0;
2794 Info(
"SendParallel",
"Will invoke AskParallel()");
2797 Info(
"SendParallel",
"Will invoke GetParallel()");
2804 mess << nparallel << async;
2834 Info(
"UnloadPackage",
2835 "package %s successfully unloaded", package);
2841 Warning(
"UnloadPackage",
"unable to remove symlink to %s", package);
2854 while (
TPair *pck = dynamic_cast<TPair *>(nextpackage()))
2859 Info(
"UnloadPackages",
2860 "packages successfully unloaded");
2874 snprintf(str, 512,
"**** Welcome to the PROOF server @ %s ****",
gSystem->
HostName());
2876 snprintf(str, 512,
"**** PROOF slave server @ %s started ****",
gSystem->
HostName());
2880 Error(
"Setup",
"failed to send proof server startup message");
2888 Error(
"Setup",
"failed to receive remote proof protocol");
2892 Error(
"Setup",
"failed to send local proof protocol");
2900 Error(
"Setup",
"OldAuthSetup: failed to setup authentication");
2919 Error(
"Setup",
"failed to receive ordinal and config info");
2927 if (fWorkDir.IsNull())
2948 if (tmpWorkDir !=
"")
2952 Info(
"Setup",
"invalid config file %s (missing or unreadable",
2982 if (host.Index(
".") !=
kNPOS)
2983 host.Remove(host.Index(
"."));
3000 Error(
"Setup",
"common setup failed");
3031 bindir = ROOTBINDIR;
3034 if (!bindir.IsNull()) bindir +=
"/bin";
3039 if (paths.
Length() > 0) {
3043 else if (paths.
Contains(
"<compiler>"))
3052 if (!bindir.IsNull()) bindir +=
":";
3054 }
else if (icomp == -1) {
3055 if (!path.IsNull()) path +=
":";
3063 else if (paths.
Contains(
"<sysbin>"))
3067 if (!bindir.IsNull()) bindir +=
":";
3068 bindir +=
"/bin:/usr/bin:/usr/local/bin";
3069 }
else if (isysb == -1) {
3070 if (!path.IsNull()) path +=
":";
3071 path +=
"/bin:/usr/bin:/usr/local/bin";
3076 if (!bindir.IsNull()) bindir +=
":";
3084 Error(
"SetupCommon",
"can not change to PROOF directory %s",
3093 Error(
"SetupCommon",
"can not change to PROOF directory %s",
3142 Warning(
"SetupCommon",
"problems creating path '%s' (errno: %d)",
3151 if (!dataDirOpts.IsNull()) {
3154 if ((
IsMaster() && !dataDirOpts.Contains(
"M")) ||
3159 if (dataDirOpts.Contains(
"g")) m = 0775;
3160 if (dataDirOpts.Contains(
"a") || dataDirOpts.Contains(
"o")) m = 0777;
3162 Info(
"SetupCommon",
"requested mode for data directories is '%o'", m);
3169 if (subp.
IsNull())
continue;
3174 Warning(
"SetupCommon",
"problems setting mode '%o' on path '%s' (errno: %d)",
3181 Warning(
"SetupCommon",
"problems stat-ing path '%s' (errno: %d; datadir: %s)",
3191 if (globpack.
Length() > 0) {
3195 while (globpack.
Tokenize(ldir, from,
":")) {
3197 Warning(
"SetupCommon",
"directory for global packages %s does not"
3198 " exist or is not readable", ldir.
Data());
3202 key.
Form(
"G%d", ng++);
3209 Info(
"SetupCommon",
"directory for global packages %s added to the list",
3222 Error(
"SetupCommon",
"can not change to working directory '%s'",
3275 while (dsms.
Tokenize(dsm, from,
",")) {
3277 Warning(
"SetupCommon",
"a valid dataset manager already initialized");
3278 Warning(
"SetupCommon",
"support for multiple managers not yet available");
3282 if (
gROOT->GetPluginManager()) {
3284 h =
gROOT->GetPluginManager()->FindHandler(
"TDataSetManager", dsm);
3289 fUser.Data(), dsm.
Data()));
3295 Warning(
"SetupCommon",
"dataset manager plug-in initialization failed");
3296 SendAsynMessage(
"TXProofServ::SetupCommon: dataset manager plug-in initialization failed");
3312 h =
gROOT->GetPluginManager()->FindHandler(
"TDataSetManager",
"file");
3322 Warning(
"SetupCommon",
"default dataset manager plug-in initialization failed");
3328 if (!dsReqCfg.
IsNull()) {
3329 TPMERegexp reReqDir(
"(^| )(dir:)?([^ ]+)( |$)");
3331 if (reReqDir.
Match(dsReqCfg) == 5) {
3333 dsDirFmt.
Form(
"dir:%s perms:open", reReqDir[3].
Data());
3339 "failed init of dataset staging requests repository");
3344 "specify, with [dir:]<path>, a valid path for staging requests");
3347 Warning(
"SetupCommon",
"no repository for staging requests available");
3361 while (quotas.
Tokenize(tok, from,
" ")) {
3369 "parsing 'maxquerykept' :ignoring token %s : not a digit", tok.
Data());
3372 const char *ksz[2] = {
"hwmsz=",
"maxsz="};
3373 for (
Int_t j = 0; j < 2; j++) {
3380 const char *s[3] = {
"k",
"m",
"g"};
3381 Int_t i = 0, k = 1024;
3396 TString ssz(ksz[j], strlen(ksz[j])-1);
3397 Info(
"SetupCommon",
"parsing '%s' : ignoring token %s", ssz.
Data(), tok.
Data());
3407 Warning(
"SetupCommon",
"problems applying fMaxQueries");
3414 if (rtag.Length() > 0)
3426 while (all_vars.Tokenize(name, from,
",")) {
3427 if (!name.IsNull()) {
3449 Info(
"SetupCommon",
"successfully completed");
3469 Info(
"Terminate",
"process memory footprint: %ld/%ld kB virtual, %ld/%ld kB resident ",
3503 Info(
"Terminate",
"data directory '%s' has been removed",
fDataDir.
Data());
3510 while ((fh =
next())) {
3511 TProofServInputHandler *ih =
dynamic_cast<TProofServInputHandler *
>(fh);
3528 if (!path || strlen(path) <= 0)
return kFALSE;
3534 const char *ent = 0;
3536 if (!strcmp(ent,
".") || !strcmp(ent,
".."))
continue;
3537 fpath.
Form(
"%s/%s", path, ent);
3554 Warning(
"UnlinkDataDir",
"data directory '%s' is empty but could not be removed", path);
3585 if (!oldAuthSetupHook) {
3587 TString authlib =
"libRootAuth";
3593 Error(
"OldAuthSetup",
"can't load %s",authlib.
Data());
3597 Error(
"OldAuthSetup",
"can't locate %s",authlib.
Data());
3606 Error(
"OldAuthSetup",
"can't find OldProofServAuthSetup");
3622 TDSet *dset,
const char *selec,
3639 fst, dset, selec, elist);
3657 Int_t startlog = lseek(fileno(stdout), (off_t) 0, SEEK_END);
3661 Info(
"SetQueryRunning",
"starting query: %d", pq->
GetSeqNum());
3667 while ((pck = (
TPair *)nxp())) {
3668 if (parlist.Length() <= 0)
3696 Info(
"HandleArchive",
"Enter");
3700 (*mess) >> queryref >> path;
3702 if (slb) slb->
Form(
"%s %s", queryref.
Data(), path.Data());
3705 if (queryref ==
"Default") {
3707 Info(
"HandleArchive",
3717 if (path.Length() <= 0) {
3719 Info(
"HandleArchive",
3720 "archive paths are not defined - do nothing");
3724 path.Form(
"%s/session-%s-%d.root",
3735 if (!pqr || qry < 0) {
3737 fout +=
"/query-result.root";
3745 while ((k = (
TKey *)nxk())) {
3746 if (!strcmp(k->GetClassName(),
"TProofQueryResult")) {
3755 Info(
"HandleArchive",
3756 "file cannot be open (%s)",fout.
Data());
3763 PDB(kGlobal, 1)
Info(
"HandleArchive",
3764 "archive path for query #%d: %s",
3771 if (!farc || !(farc->IsOpen())) {
3772 Info(
"HandleArchive",
3773 "archive file cannot be open (%s)",path.Data());
3787 if (qry > -1 &&
fQMgr)
3791 Info(
"HandleArchive",
3792 "results of query %s archived to file %s",
3793 queryref.
Data(), path.Data());
3812 emsg.
Form(
"file collection undefined!");
3823 TUrl *xurl = fiind->GetCurrentUrl();
3855 Info(
"HandleProcess",
"Enter");
3869 (*mess) >> dset >> filename >> input >> opt >> nentries >> first >> evl >> sync;
3880 if ((!hasNoData) && elist)
3891 Error(
"HandleProcess",
"AssertDataSet: %s", emsg.
Data());
3896 }
else if (hasNoData) {
3901 if (!dsn.Contains(
":") || dsn.BeginsWith(
"dataset:")) {
3906 emsg.
Form(
"dataset manager not initialized!");
3911 emsg.
Form(
"requested dataset '%s' does not exists", dsn.Data());
3918 fcmap->
SetName(
"PROOF_FilesToProcess");
3926 Error(
"HandleProcess",
"%s", emsg.
Data());
3942 if (dset) input->
Add(dset);
3943 if (elist) input->
Add(elist);
3947 input->
Clear(
"nodelete");
3952 Warning(
"HandleProcess",
"could not save input data: %s", emsg.
Data());
3978 Error(
"HandleProcess",
"error getting list of worker nodes");
3985 Info(
"HandleProcess",
"query %d enqueued", pq->
GetSeqNum());
3987 Error(
"HandleProcess",
"Adding a list of worker nodes returned: %d",
3996 Error(
"HandleProcess",
"error getting list of worker nodes");
4003 Info(
"HandleProcess",
"query %d enqueued", pq->
GetSeqNum());
4005 Error(
"HandleProcess",
"unknown return value: %d", retVal);
4016 if (!sync || enqueued) {
4024 Info(
"HandleProcess",
4091 Warning(
"HandleProcess",
"could not get input data: %s", emsg.
Data());
4095 Warning(
"HandleProcess",
"could not get query sequential number!");
4099 while ((nord = input->
FindObject(
"PROOF_Ordinal")))
4106 while ((o =
next())) {
4107 PDB(kGlobal, 2)
Info(
"HandleProcess",
"adding: %s", o->
GetName());
4115 while ((obj = nxt())){
4119 Info(
"HandleProcess",
"selector obj for '%s' found", selector_obj->
ClassName());
4135 Info(
"HandleProcess",
"calling fPlayer->Process() with selector object: %s", selector_obj->
ClassName());
4139 Info(
"HandleProcess",
"calling fPlayer->Process() with selector name: %s", filename.
Data());
4151 m << status << abort;
4164 Info(
"TProofServ::Handleprocess",
4165 "worker %s has finished processing with %d objects in output list",
4185 if (!isSubMerging) {
4205 Info(
"HandleProcess",
"controlled mode: worker %s has finished,"
4212 Info(
"HandleProcess",
"submerging disabled because of high-memory case");
4215 PDB(kGlobal, 2)
Info(
"HandleProcess",
"merging mode check: %d", isSubMerging);
4231 Int_t merge_port = 0;
4234 Info(
"HandleProcess",
"possible port for merging connections: %d",
4238 msg_osize << merge_port;
4252 PDB(kGlobal, 2)
Info(
"HandleProcess",
"sending result directly to master");
4254 Warning(
"HandleProcess",
"problems sending output list");
4276 Warning(
"HandleProcess",
"the output list is empty!");
4278 Warning(
"HandleProcess",
"problems sending output list");
4295 while ((obj = nex())) {
4311 while ((o = nxo())) { input->
Remove(o); }
4328 PDB(kGlobal, 1)
Info(
"HandleProcess",
"done");
4339 PDB(kOutput, 2)
Info(
"SendResults",
"enter");
4350 msg.
Form(
"%s: merging output objects ... done ",
4354 msg.
Form(
"%s: objects merged; sending output: %d objs",
fPrefix.
Data(), olsz);
4359 if (sock->
Send(mbuf) < 0)
return -1;
4362 Int_t ns = 0, np = 0;
4365 Int_t totsz = 0, objsz = 0;
4367 while ((o = nxo())) {
4371 "message has %d bytes: limit of %lld bytes reached - sending ...",
4384 msg.
Form(
"%s: objects merged; sending obj %d/%d (%d bytes) ",
4388 if (sock->
Send(mbuf) < 0)
return -1;
4395 mbuf << (Int_t) ((ns >= olsz) ? 2 : 1);
4410 msg.
Form(
"%s: objects merged; sending obj %d/%d (%d bytes) ",
4414 if (sock->
Send(mbuf) < 0)
return -1;
4418 msg.
Form(
"%s: grand total: sent %d objects, size: %d bytes ",
4430 msg.
Form(
"%s: merging output objects ... done ",
4434 msg.
Form(
"%s: objects merged; sending output: %d objs",
fPrefix.
Data(), olsz);
4439 if (sock->
Send(mbuf) < 0)
return -1;
4443 Int_t totsz = 0, objsz = 0;
4446 while ((o = nxo())) {
4463 msg.
Form(
"%s: objects merged; sending obj %d/%d (%d bytes) ",
4467 if (sock->
Send(mbuf) < 0)
return -1;
4472 msg.
Form(
"%s: grand total: sent %d objects, size: %d bytes ",
4486 msg.
Form(
"%s: sending output: %d objs, %d bytes",
fPrefix.
Data(), olsz, blen);
4488 if (sock->
Send(mbuf) < 0)
return -1;
4492 PDB(kGlobal, 2)
Info(
"SendResults",
"sending output list");
4494 PDB(kGlobal, 2)
Info(
"SendResults",
"notifying failure or abort");
4499 PDB(kOutput,2)
Info(
"SendResults",
"done");
4541 filename += opt(
id + 1, opt.
Length());
4551 Error(
"ProcessNext",
"no TDset object: cannot continue");
4573 while ((obj = nxt())){
4577 Info(
"ProcessNext",
"found object for selector '%s'", obj->
ClassName());
4584 Error(
"ProcessNext",
"empty waiting queries list!");
4634 PDB(kSubmerger, 2)
Info(
"ProcessNext",
"PROOF_UseMergers set to %d", smg);
4640 if ((o = input->
FindObject(
"PROOF_MergersByHost"))) { input->
Remove(o);
delete o; }
4642 PDB(kSubmerger, 2)
Info(
"ProcessNext",
"submergers setup by host/node");
4651 while ((o =
next())) {
4662 Info(
"ProcessNext",
"calling fPlayer->Process() with selector object: %s", selector_obj->
ClassName());
4666 Info(
"ProcessNext",
"calling fPlayer->Process() with selector name: %s", filename.
Data());
4681 m << status << abort;
4697 Warning(
"ProcessNext",
"problems registering produced datasets: %s", emsg.
Data());
4718 while ((xo = nxo())) {
4728 if (oopt.BeginsWith(
"of:")) {
4740 Info(
"ProcessNext",
"adding info about dataset '%s' in the light query result", dset->
GetName());
4747 Info(
"ProcessNext",
"sending results");
4750 Warning(
"ProcessNext",
"problems sending output list");
4755 Warning(
"ProcessNext",
"the output list is empty!");
4757 Warning(
"ProcessNext",
"problems sending output list");
4767 if (!(pq->
IsDraw()) && pqr) {
4794 ::
Info(
"TProofServ::RegisterDataSets",
4795 "enter: %d objs in the output list", (out ? out->
GetSize() : -1));
4797 if (!in || !out || !dsm) {
4798 ::Error(
"TProofServ::RegisterDataSets",
"invalid inputs: %p, %p, %p", in, out, dsm);
4806 while ((o = nxo())) {
4824 if (regopt.Contains(
":sortidx:")) {
4826 regopt.ReplaceAll(
":sortidx:",
"");
4833 const char *vfmsg = regopt.Contains(
"V") ?
" and verifying" :
"";
4834 msg.
Form(
"Registering%s dataset '%s' ... ", vfmsg, ds->
GetName());
4843 ::Warning(
"TProofServ::RegisterDataSets",
4844 "failure registering or verifying dataset '%s'", ds->
GetName());
4845 msg.
Form(
"Registering%s dataset '%s' ... failed! See log for more details", vfmsg, ds->
GetName());
4847 ::Info(
"TProofServ::RegisterDataSets",
"dataset '%s' successfully registered%s",
4848 ds->
GetName(), (strlen(vfmsg) > 0) ?
" and verified" :
"");
4849 msg.
Form(
"Registering%s dataset '%s' ... OK", vfmsg, ds->
GetName());
4856 ::Info(
"TProofServ::RegisterDataSets",
"printing collection");
4860 ::Warning(
"TProofServ::RegisterDataSets",
"collection '%s' is empty", o->
GetName());
4863 ::Info(
"TProofServ::RegisterDataSets",
"dataset registration not allowed");
4870 while ((o = nxrm())) out->
Remove(o);
4874 while((o = nxtg())) {
4880 PDB(kDataset, 1) ::
Info(
"TProofServ::RegisterDataSets",
"exit");
4891 Info(
"HandleQueryList",
"Enter");
4897 Int_t ntot = 0, npre = 0, ndraw= 0;
4930 Warning(
"HandleQueryList",
"unable to clone TProofQueryResult '%s:%s'",
4931 pqr->GetName(), pqr->GetTitle());
4940 m << npre << ndraw << ql;
4954 Info(
"HandleRemove",
"Enter");
4957 (*mess) >> queryref;
4959 if (slb) *slb = queryref;
4961 if (queryref ==
"cleanupqueue") {
4965 Info(
"HandleRemove",
"%d queries removed from the waiting list", pend);
4970 if (queryref ==
"cleanupdir") {
4976 Info(
"HandleRemove",
"%d directories removed", nd);
5001 Warning(
"HandleRemove",
"query result manager undefined!");
5005 Info(
"HandleRemove",
5006 "query %s could not be removed (unable to lock session)", queryref.Data());
5018 Info(
"HandleRetrieve",
"Enter");
5021 (*mess) >> queryref;
5023 if (slb) *slb = queryref;
5031 fout +=
"/query-result.root";
5039 while ((k = (
TKey *)nxk())) {
5040 if (!strcmp(k->GetClassName(),
"TProofQueryResult")) {
5048 if ((d = dynamic_cast<TDSet *>(o)))
5057 static const char *clb[4] = {
"bytes",
"KB",
"MB",
"GB" };
5058 while (qsz > 1000. && ilb < 3) {
5067 Info(
"HandleRetrieve",
5068 "query not found in file %s",fout.
Data());
5078 Info(
"HandleRetrieve",
5079 "file cannot be open (%s)",fout.
Data());
5098 (*mess) >> type >> add >> path;
5102 if ((type !=
"lib") && (type !=
"inc")) {
5103 Error(
"HandleLibIncPath",
"unknown action type: %s", type.
Data());
5108 path.ReplaceAll(
",",
" ");
5112 if (path.Length() > 0 && path !=
"-") {
5113 if (!(op = path.Tokenize(
" "))) {
5114 Error(
"HandleLibIncPath",
"decomposing path %s", path.Data());
5121 if (type ==
"lib") {
5142 Info(
"HandleLibIncPath",
5143 "libpath %s does not exist or cannot be read - not added", xlib.
Data());
5166 Info(
"HandleLibIncPath",
5167 "incpath %s does not exist or cannot be read - not added", xinc.
Data());
5178 if (type ==
"lib") {
5231 (*mess) >> filenam >> md5;
5235 if (slb) *slb = filenam;
5248 if (md5local && md5 == (*md5local)) {
5254 Error(
"HandleCheckFile",
"failure executing: %s %s/%s",
5265 Error(
"HandleCheckFile",
"failure executing: %s",
5277 Error(
"HandleCheckFile",
"package %s did not unpack into %s",
5286 Info(
"HandleCheckFile",
5287 "package %s installed on node", filenam.
Data());
5294 Info(
"HandleCheckFile",
5295 "package %s not yet on node", filenam.
Data());
5314 Info(
"HandleCheckFile",
5315 "problems uploading package %s", filenam.
Data());
5332 if (md5local && md5 == (*md5local)) {
5336 Info(
"HandleCheckFile",
5337 "package %s already on node", filenam.
Data());
5340 Info(
"HandleCheckFile",
5341 "problems uploading package %s", filenam.
Data());
5347 Info(
"HandleCheckFile",
5348 "package %s not yet on node", filenam.
Data());
5362 if (md5local && md5 == (*md5local)) {
5366 Info(
"HandleCheckFile",
5367 "package %s already on node", filenam.
Data());
5370 Info(
"HandleCheckFile",
5371 "problems with uploading package %s", filenam.
Data());
5376 Info(
"HandleCheckFile",
5377 "package %s not yet on node", filenam.
Data());
5388 if (md5local && md5 == (*md5local)) {
5391 Info(
"HandleCheckFile",
"file %s already on node", filenam.Data());
5396 Info(
"HandleCheckFile",
"file %s not yet on node", filenam.Data());
5410 Info(
"HandleCache",
"Enter");
5421 const char *k = (
IsMaster()) ?
"Mst" :
"Wrk";
5441 if (slb) slb->
Form(
"%d %d", type, all);
5447 if (file.IsNull() || file ==
"*") {
5455 if (slb) slb->
Form(
"%d %s", type, file.Data());
5463 while ((nm = (
TNamed *)nxd())) {
5464 printf(
"*** Global Package cache %s %s:%s ***\n",
5479 if (slb) slb->
Form(
"%d %d", type, all);
5490 if (slb) slb->
Form(
"%d %d", type, status);
5507 if (slb) slb->
Form(
"%d %s %d", type, package.Data(),
status);
5524 while ((nm = (
TNamed *)nxd())) {
5535 if (pdir.
Length() <= 0) {
5538 noth.
Data(), package.Data()));
5549 "kBuildPackage: problems forwarding package %s to workers", package.Data());
5551 noth.
Data(), package.Data()));
5560 "kBuildPackage: package %s exists and has PROOF-INF directory", package.Data());
5579 FILE *
f = fopen(
"PROOF-INF/proofvers.txt",
"r");
5590 if (!f || !goodver) {
5594 " build: %s:%s): cleaning ... ",
5595 noth.
Data(), package.Data(),
gROOT->GetVersion(),
5612 Error(
"HandleCache",
"kBuildPackage: failure executing: %s", cmd.
Data());
5617 TString md5f = packagedir +
"/" +
package + "/PROOF-INF/md5.txt";
5624 Warning(
"HandleCache",
"kBuildPackage: failure calculating/saving MD5sum for '%s'", par.
Data());
5629 Error(
"HandleCache",
"kBuildPackage: %s not found",
kGUNZIP);
5634 " global package: cannot re-build!!! ",
5635 noth.
Data(), package.Data(),
gROOT->GetVersion(), v.
Data()));
5649 cmd.
Form(
"export ROOTINCLUDEPATH=\"%s\" ; PROOF-INF/BUILD.sh", ipath.Data());
5656 f = fopen(
"PROOF-INF/proofvers.txt",
"w");
5658 fputs(
gROOT->GetVersion(),
f);
5668 Info(
"HandleCache",
"no PROOF-INF/BUILD.sh found for package %s", package.Data());
5683 Info(
"HandleCache",
"package %s successfully built", package.Data());
5685 if (slb) slb->
Form(
"%d %s %d %d", type, package.Data(),
status, chkveropt);
5693 "package %s already loaded", package.Data());
5706 while ((nm = (
TNamed *)nxd())) {
5714 if (pdir.
Length() <= 0) {
5717 noth.
Data(), package.Data()));
5736 TMacro setupmc(
"PROOF-INF/SETUP.C");
5745 " function", noth.
Data(), package.Data()));
5749 if (!setupmc.
Load()) {
5753 noth.
Data(), package.Data()));
5762 noth.
Data(), package.Data()));
5773 " the specified argument will be ignored", noth.
Data()));
5783 if (argsig.BeginsWith(
"TList")) {
5786 }
else if (argsig.BeginsWith(
"const char")) {
5792 if (optls && optls->First()) {
5794 " SETUP expects 'const char *': ignoring",
5795 noth.
Data(), optls->First()->ClassName()));
5808 " cannot continue", noth.
Data()));
5814 " cannot continue", noth.
Data()));
5818 Long_t setuprc = (status == 0) ? 0 : -1;
5821 if (setuprc < 0) status = -1;
5854 if (optls && optls->
GetSize() > 0) {
5864 Info(
"HandleCache",
"package %s successfully loaded", package.Data());
5866 if (slb) slb->
Form(
"%d %s %d", type, package.Data(),
status);
5872 printf(
"*** Enabled packages on master %s on %s\n",
5875 printf(
"*** Enabled packages ***\n");
5877 printf(
"*** Enabled packages on slave %s on %s\n",
5883 printf(
"%s\n", pck->GetName());
5888 if (slb) slb->
Form(
"%d %d", type, all);
5895 if (slb) slb->
Form(
"%d %d", type, all);
5902 if (slb) slb->
Form(
"%d %s", type, file.Data());
5909 if (slb) slb->
Form(
"%d %d", type, all);
5914 if (slb) slb->
Form(
"%d", type);
5920 if (slb) slb->
Form(
"%d %s", type, package.Data());
5927 if (slb) slb->
Form(
"%d %s %d", type, package.Data(), chkveropt);
5934 if (slb) slb->
Form(
"%d %s %d", type, package.Data(),
status);
5947 if (slb) slb->
Form(
"%d %s", type, package.Data());
5953 if (slb) slb->
Form(
"%d %s %d", type, package.Data(),
status);
5961 if (slb) slb->
Form(
"%d %s", type, package.Data());
5976 if (slb) slb->
Form(
"%d", type);
5984 while (pac.Length() > 0) {
5985 if (pac.EndsWith(
".par")) {
5994 msg << type << pack;
5997 if (slb) slb->
Form(
"%d", type);
6018 Info(
"HandleCache",
"loading macro %s ...", pack.
Data());
6033 if (slb) slb->
Form(
"%d %s", type, package.Data());
6037 Error(
"HandleCache",
"unknown type %d", type);
6051 Info(
"HandleWorkerLists",
"Enter");
6053 Int_t type = 0, rc = 0;
6061 if (ord !=
"*" && !ord.BeginsWith(
GetOrdinal()) && ord !=
"restore")
break;
6070 if (nactnew == nactmax) {
6071 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers (re-)activated");
6074 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"%d workers could not be (re-)activated", nactmax - nactnew);
6076 }
else if (ord ==
"restore") {
6078 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"active worker(s) restored");
6080 Error(
"HandleWorkerList",
"some active worker(s) could not be restored; check logs");
6083 if (nactnew == (nact + nwc)) {
6085 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"worker(s) %s (re-)activated", ord.Data());
6088 Error(
"HandleWorkerList",
"some worker(s) could not be (re-)activated;"
6089 " # of actives: %d --> %d (nwc: %d)",
6090 nact, nactnew, nwc);
6092 rc = (nwc < 0) ? nwc : -1;
6096 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers are already active");
6099 Warning(
"HandleWorkerList",
"undefined PROOF session: protocol error?");
6104 if (ord !=
"*" && !ord.BeginsWith(
GetOrdinal()) && ord !=
"restore")
break;
6112 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers deactivated");
6115 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"%d workers could not be deactivated", nactnew);
6118 if (nactnew == (nact - nwc)) {
6120 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"worker(s) %s deactivated", ord.Data());
6123 Error(
"HandleWorkerList",
"some worker(s) could not be deactivated:"
6124 " # of actives: %d --> %d (nwc: %d)",
6125 nact, nactnew, nwc);
6127 rc = (nwc < 0) ? nwc : -1;
6131 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers are already inactive");
6134 Warning(
"HandleWorkerList",
"undefined PROOF session: protocol error?");
6138 Warning(
"HandleWorkerList",
"unknown action type (%d)", type);
6165 "no appropriate master line found in %s",
fConfFile.
Data());
6170 fImage = master->GetImage();
6240 if (level >=
kError && gProofServ)
6245 const char *type = 0;
6248 Int_t ipos = (location) ? strlen(location) : 0;
6254 if (level >=
kInfo) {
6256 char *ps = location ? (
char *) strrchr(location,
'|') : (
char *)0;
6258 ipos = (int)(ps - (
char *)location);
6274 type =
"*** Break ***";
6292 if (!location || ipos == 0 ||
6297 (gProofServ ? gProofServ->
GetPrefix() :
"proof"),
6304 (gProofServ ? gProofServ->
GetPrefix() :
"proof"),
6305 type, ipos, location, msg);
6315 if (__crashreporter_info__)
6316 delete [] __crashreporter_info__;
6317 __crashreporter_info__ =
StrDup(buf);
6324 if (gProofServ != 0 && !recursive) {
6369 Printf(
" +++ Latest processing times: %f s (CPU: %f s)",
6402 Int_t priority = 100;
6408 sql.
Form(
"SELECT priority WHERE group='%s' FROM proofpriority",
fGroup.
Data());
6414 Error(
"GetPriority",
"failed to connect to SQL server %s as %s %s",
6421 Error(
"GetPriority",
"query into proofpriority failed");
6429 Error(
"GetPriority",
"first row is header is NULL");
6453 Info(
"SendAsynMessage",
"%s", (msg ? msg :
"(null)"));
6472 off_t lend = lseek(fileno(stdout), (off_t)0, SEEK_END);
6473 if (lend >= 0) lseek(
fLogFileDes, lend, SEEK_SET);
6490 if (truncsz < 100) {
6491 emsg.
Form(
"+++ WARNING +++: %s: requested truncate size too small"
6497 while (ftruncate(fileno(stdout), truncsz) != 0 &&
6502 Error(
"TruncateLogFile",
"truncating to %lld bytes; file size is %lld bytes (errno: %d)",
6504 emsg.
Form(
"+++ WARNING +++: %s: problems truncating log file to %lld bytes; file size is %lld bytes"
6508 Info(
"TruncateLogFile",
"file truncated to %lld bytes (80%% of %lld); file size was %lld bytes ",
6510 emsg.
Form(
"+++ WARNING +++: %s: log file truncated to %lld bytes (80%% of %lld)",
6516 emsg.
Form(
"+++ WARNING +++: %s: could not stat log file descriptor"
6529 Error(
"HandleException",
"caugth exception triggered by signal '%d' %s %lld",
6533 emsg.
Form(
"%s: caught exception triggered by signal '%d' %s %lld",
6547 Info(
"HandleDataSets",
"enter");
6551 Warning(
"HandleDataSets",
"no data manager is available to fullfil the request");
6556 TString dsUser, dsGroup, dsName, dsTree, uri, opt;
6572 if (slb) slb->
Form(
"%d %s", type, uri.Data());
6584 if (slb) slb->
Form(
"%d %s %s", type, uri.Data(), opt.Data());
6589 Error(
"HandleDataSets",
"can not save an empty list.");
6597 Info(
"HandleDataSets",
"dataset registration not allowed");
6598 if (slb) slb->
Form(
"%d notallowed", type);
6609 Error(
"HandleDataSets",
6610 "no dataset staging request repository available");
6616 while (reInvalid.
Substitute(validUri,
"_")) {}
6621 Warning(
"HandleDataSets",
"staging of %s already requested",
6629 Error(
"HandleDataSets",
"empty dataset or no dataset returned");
6637 while ((fi = dynamic_cast<TFileInfo *>(it.Next()))) {
6639 Int_t nToErase = fi->GetNUrls() - 1;
6640 for (
Int_t i=0; i<nToErase; i++)
6651 Error(
"HandleDataSets",
6652 "can't register staging request for %s", uri.Data());
6657 Info(
"HandleDataSets",
6658 "Staging request registered for %s", uri.Data());
6668 Error(
"HandleDataSets",
6669 "no dataset staging request repository available");
6687 Info(
"HandleDataSets",
"no pending staging request for %s",
6697 Error(
"HandleDataSets",
6698 "no dataset staging request repository available");
6716 (*mess) >> uri >> opt;
6717 if (slb) slb->
Form(
"%d %s %s", type, uri.
Data(), opt.Data());
6725 (*mess) >> uri >> opt;
6726 if (slb) slb->
Form(
"%d %s %s", type, uri.
Data(), opt.Data());
6730 if (kLite !=
kNPOS) {
6732 opt.Remove(kLite, strlen(
":lite:"));
6736 if (returnMap && !opt.IsNull()) {
6741 TIter nxd(returnMap);
6752 Info(
"HandleDataSets",
"no dataset found on server '%s'", opt.Data());
6769 (*mess) >> uri >> opt;
6770 if (slb) slb->
Form(
"%d %s %s", type, uri.
Data(), opt.Data());
6786 if (slb) slb->
Form(
"%d %s", type, uri.Data());
6792 Info(
"HandleDataSets",
"dataset creation / removal not allowed");
6793 if (slb) slb->
Form(
"%d notallowed", type);
6801 (*mess) >> uri >> opt;
6802 if (slb) slb->
Form(
"%d %s %s", type, uri.
Data(), opt.Data());
6812 Info(
"HandleDataSets",
"dataset verification not allowed");
6820 if (slb) slb->
Form(
"%d", type);
6822 if (groupQuotaMap) {
6829 Info(
"HandleDataSets",
"quota control disabled");
6830 if (slb) slb->
Form(
"%d disabled", type);
6838 if (slb) slb->
Form(
"%d", type);
6843 Info(
"HandleDataSets",
"quota control disabled");
6844 if (slb) slb->
Form(
"%d disabled", type);
6852 if (slb) slb->
Form(
"%d %s", type, uri.Data());
6855 Info(
"HandleDataSets",
"kSetDefaultTreeName: modification of dataset info not allowed");
6856 if (slb) slb->
Form(
"%d notallowed", type);
6863 (*mess) >> uri >> opt;
6864 if (slb) slb->
Form(
"%d %s %s", type, uri.
Data(), opt.Data());
6865 if (opt ==
"show") {
6868 }
else if (opt ==
"clear") {
6872 Error(
"HandleDataSets",
"kCache: unknown action: %s", opt.Data());
6878 Error(
"HandleDataSets",
"unknown type %d", type);
6905 Info(
"HandleSubmerger",
"kSendOutput: interrupting ...");
6916 Int_t merger_id = -1;
6917 (*mess) >> merger_id >> name >> port;
6919 Info(
"HandleSubmerger",
"worker %s redirected to merger #%d %s:%d",
fOrdinal.
Data(), merger_id, name.
Data(), port);
6922 if (name.
Length() > 0 && port > 0 && (t =
new TSocket(name, port)) && t->IsValid()) {
6924 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6925 "kSendOutput: worker asked for sending output to merger #%d %s:%d",
6926 merger_id, name.
Data(), port);
6929 msg.
Form(
"worker %s cannot send results to merger #%d at %s:%d",
GetPrefix(), merger_id, name.
Data(), port);
6930 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6931 "kSendOutput: %s - inform the master", msg.
Data());
6945 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kSendOutput: worker sent its output");
6952 if (name ==
"master") {
6953 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6954 "kSendOutput: worker was asked for sending output to master");
6956 Warning(
"HandleSubmerger",
"problems sending output list");
6962 }
else if (!t || !(t->IsValid())) {
6963 msg.
Form(
"worker %s could not open a valid socket to merger #%d at %s:%d",
6965 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6966 "kSendOutput: %s - inform the master", msg.
Data());
6981 Error(
"HandleSubmerger",
"kSendOutput: received not on worker");
6992 Int_t merger_id = -1;
6994 Int_t connections = 0;
6995 (*mess) >> merger_id >> connections;
6997 Info(
"HandleSubmerger",
"worker %s established as merger",
fOrdinal.
Data());
7000 Info(
"HandleSubmerger",
7001 "kBeMerger: worker asked for being merger #%d for %d connections",
7002 merger_id, connections);
7007 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
7008 "kBeMerger: mergerPlayer created (%p) ", mergerPlayer);
7016 Info(
"HandleSubmerger",
"kBeMerger: all outputs from workers accepted");
7028 while ((o = nxo())) {
7034 Info(
"HandleSocketInput",
"removing merged object (%p)", o);
7039 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kBeMerger: own outputs added");
7040 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"starting delayed merging on %s",
fOrdinal.
Data());
7047 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"delayed merging on %s finished ",
fOrdinal.
Data());
7048 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"%s sending results to master ",
fOrdinal.
Data());
7051 Warning(
"HandleSubmerger",
"kBeMerger: problems sending output list");
7055 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kBeMerger: results sent to master");
7072 Warning(
"HandleSubmerger",
"kBeMerger: problems craeting the merger player!");
7081 Error(
"HandleSubmerger",
"kSendOutput: received not on worker");
7095 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kStopMerging");
7097 Info(
"HandleSubmerger",
"kStopMerging: interrupting ...");
7113 Info(
"HandleFork",
"fork cloning not implemented");
7127 if ((pid = fork()) < 0) {
7128 Error(
"Fork",
"failed to fork");
7133 if (!pid)
return pid;
7147 Warning(
"Fork",
"Functionality not provided under windows");
7163 if (gProofServ && gProofServ->
GetUser() && strlen(gProofServ->
GetUser())) {
7173 if (gProofServ && gProofServ->
GetUser() && strlen(gProofServ->
GetUser())) {
7185 if (gProofServ && gProofServ->
GetGroup() && strlen(gProofServ->
GetGroup())) {
7200 ::Warning(
"TProofServ::ResolveKeywords",
"session tag undefined: ignoring");
7208 ::Warning(
"TProofServ::ResolveKeywords",
"ordinal number undefined: ignoring");
7215 ::Warning(
"TProofServ::ResolveKeywords",
"query seqeuntial number undefined: ignoring");
7218 if (fname.
Contains(
"<file>") && path && strlen(path) > 0) {
7261 fprintf(fs,
"%d", st);
7264 Info(
"UpdateSessionStatus",
"status (=%d) update in path: %s", st,
fAdminPath.
Data());
7344 while ((o = nxq())) {
7411 if (!dsrv.
EndsWith(
"/")) dsrv +=
"/";
7431 if (srvp ==
"root" || srvp ==
"xrd") path.
Remove(0, pfx.
Length());
7445 const char *pname =
GetName();
7448 fLockId =
open(pname, O_CREAT|O_RDWR, 0644);
7450 fLockId =
open(pname, O_RDWR);
7452 if (fLockId == -1) {
7453 SysError(
"Lock",
"cannot open lock file %s", pname);
7460 #if !defined(R__WIN32) && !defined(R__WINGCC)
7461 if (lockf(fLockId, F_LOCK, (off_t) 1) == -1) {
7462 SysError(
"Lock",
"error locking %s", pname);
7487 lseek(fLockId, 0, SEEK_SET);
7488 #if !defined(R__WIN32) && !defined(R__WINGCC)
7489 if (lockf(fLockId, F_ULOCK, (off_t)1) == -1) {
const char * GetName() const
Returns name of object.
virtual void HandleException(Int_t sig)
Exception handler: we do not try to recover here, just exit.
TList * GetListOfBadSlaves() const
void SetCompressionSettings(Int_t settings=1)
void IncrementDrawQueries()
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
Bool_t AcceptResults(Int_t connections, TVirtualProofPlayer *mergerPlayer)
Accept and merge results from a set of workers.
virtual Int_t GetEntries() const
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual const char * GetTitle() const
Returns title of object.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
static Int_t GetCmdRtn()
Static method to get the return code from the execution of a command via the pipe.
static FILE * SetErrorHandlerFile(FILE *ferr)
Set the file stream where to log (default stderr).
void Interrupt(EUrgent type, ESlaves list=kActive)
Send interrupt to master or slave servers.
Int_t Compress()
Compress the message.
double read(const std::string &file_name)
reading
Ssiz_t Last(char c) const
Find last occurrence of a character c.
ErrorHandlerFunc_t SetErrorHandler(ErrorHandlerFunc_t newhandler)
Set an errorhandler function. Returns the old handler.
static FILE * fgErrorHandlerFile
Int_t CatMotd()
Print message of the day (in the file pointed by the env PROOFMOTD or from fConfDir/etc/proof/motd).
Bool_t IsIdle()
Return the idle status.
virtual Long_t ProcessLine(const char *line, Bool_t sync=kFALSE, Int_t *error=0)
Process a single command line, either a C++ statement or an interpreter command starting with a "...
Long64_t GetNFiles() const
virtual TList * GetInputList() const =0
void IncCPUTime(Double_t procTime)
virtual void HandleRemove(TMessage *mess, TString *slb=0)
Handle remove request.
virtual int GetPid()
Get process id.
virtual Long64_t GetSize() const
Returns the current file size.
void Print(Option_t *option="") const
Dump the content.
virtual Int_t GetLearnEntries()=0
Int_t UnloadPackages()
Unload all packages.
void GetOptions(Int_t *argc, char **argv)
Get and handle command line options.
TList * GetSubmasters()
Get the list of submaster nodes.
const char *const kGUNZIP
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void Syslog(ELogLevel level, const char *mess)
Send mess to syslog daemon.
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.
void AskParallel()
Ask the for the number of parallel slaves.
void LogToMaster(Bool_t on=kTRUE)
static Bool_t GetFileInCmd(const char *cmd, TString &fn)
Static method to extract the filename (if any) form a CINT command.
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
Int_t ClearPackages()
Remove all packages.
TFileCollection * GetFilesOnServer(const char *server)
Return the subset of files served by 'server'.
virtual void Remove(TSocket *sock)
Remove a socket from the monitor.
virtual Int_t ClearCache(const char *uri)
Clear cached information matching uri.
virtual void AddInput(TObject *inp)=0
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
R__EXTERN Int_t gErrorIgnoreLevel
Bool_t IsWaiting()
Return kTRUE if the session is waiting for the OK to start processing.
R__EXTERN TProofDebug::EProofDebugMask gProofDebugMask
virtual const char * WorkingDirectory()
Return working directory.
virtual void StackTrace()
Print a stack trace.
const char * AsString(const Option_t *option="") const
Return the date & time as a string.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
static TMD5 * FileChecksum(const char *file)
Returns checksum of specified file.
void SetRealTimeLog(Bool_t on=kTRUE)
Switch ON/OFF the real-time logging facility.
void Reset()
Reset the timer.
virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, Bool_t resume=kFALSE)
Get list of workers to be used from now on.
double write(int n, const std::string &file_name, const std::string &vector_type, int compress=0)
writing
static Long_t fgResMemMax
void SetCompressionSettings(Int_t settings=1)
Used to specify the compression level and algorithm: settings = 100 * algorithm + level...
Int_t SetupCommon()
Common part (between TProofServ and TXProofServ) of the setup phase.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Collectable string class.
virtual TVirtualProofPlayer * MakePlayer(const char *player=0, TSocket *s=0)
Construct a TProofPlayer object.
virtual TSQLResult * Query(const char *sql)=0
static TSQLServer * Connect(const char *db, const char *uid, const char *pw)
virtual void Print(Option_t *option="") const
Print status of PROOF cluster.
virtual const char * GetBuildArch() const
Return the build architecture.
const char * GetObjName() const
TObject * FindObject(const char *name) const
Find object using its name.
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
Option_t * GetOption() const
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
This class represents a WWW compatible URL.
TString & ReplaceAll(const TString &s1, const TString &s2)
const char * GetDataDir() const
void SetWriteV3(Bool_t on=kTRUE)
Set/Reset the 'OldStreamer' bit in this instance and its elements.
static void FilterLocalroot(TString &path, const char *url="root://dum/")
If 'path' is local and 'dsrv' is Xrootd, apply 'path.Localroot' settings, if any. ...
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.
TMacro * GetSelecHdr() const
void SetPlayer(TVirtualProofPlayer *player)
Set a new PROOF player.
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
Int_t GetNargs() const
Number of function arguments.
virtual TList * GetListOfKeys() const
void TerminateWorker(TSlave *wrk)
Ask an active worker 'wrk' to terminate, i.e. to shutdown.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t HandleDataSets(TMessage *mess, TString *slb=0)
Handle here requests about datasets.
virtual void MakePlayer()
Make player instance.
const char * GetProtocol() const
virtual void HandleProcess(TMessage *mess, TString *slb=0)
Handle processing request.
TVirtualProofPlayer * fPlayer
Bool_t UnlinkDataDir(const char *path)
Scan recursively the datadir and unlink it if empty Return kTRUE if it can be unlinked, kFALSE otherwise.
virtual Bool_t RemoveDataSet(const char *uri)
Removes the indicated dataset.
Int_t GetNumOfFiles()
Return the number of files in the dataset.
const char * GetSessionTag() const
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Long64_t GetBytesRead() const
const char *const kPROOF_WorkDir
Int_t LockSession(const char *sessiontag, TProofLockPath **lck)
Try locking query area of session tagged sessiontag.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual EExitStatus GetExitStatus() const =0
TList * GetOutputList()
Get list with all object created during processing (see Process()).
static Long_t GetVirtMemMax()
VirtMemMax getter.
TDataSetManager * fDataSetManager
virtual Int_t GetLocalPort()
Get port # to which server socket is bound. In case of error returns -1.
This class represents an Internet Protocol (IP) address.
const char * GetOptions() const
virtual int MakeDirectory(const char *name)
Make a directory.
virtual void AddSignalHandler(TSignalHandler *sh)
Add a signal handler to list of system signal handlers.
Int_t DisablePackage(const char *package)
Remove a specific package.
virtual const char * HomeDirectory(const char *userName=0)
Return the user's home directory.
virtual TFileCollection * GetDataSet(const char *uri, const char *server=0)
Utility function used in various methods for user dataset upload.
Int_t WaitingQueries()
Return the number of waiting queries.
Int_t UpdateSessionStatus(Int_t xst=-1)
Update the session status in the relevant file.
Int_t BuildPackage(const char *package, EBuildPackageOpt opt=kBuildAll, Int_t chkveropt=kCheckROOT, TList *workers=0)
Build specified package.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
TPluginHandler * FindHandler(const char *base, const char *uri=0)
Returns the handler if there exists a handler for the specified URI.
static const char * filename()
void IncProcTime(Double_t procTime)
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection)...
ClassImp(TProofServ) extern"C"
R__EXTERN Int_t gErrorAbortLevel
virtual void Add(TSocket *sock, Int_t interest=kRead)
Add socket to the monitor's active list.
virtual Int_t HandleLibIncPath(TMessage *mess)
Handle lib, inc search paths modification request.
Class supporting a collection of lines with C++ code.
Int_t LoadPlugin()
Load the plugin library for this handler.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
virtual void SetCurrentQuery(TQueryResult *q)=0
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
virtual TSeqCollection * GetListOfFileHandlers() const
TDataSetManagerFile * fDataSetStgRepo
const char * GetSessionTag() const
Double_t CpuTime()
Stop the stopwatch (if it is running) and return the cputime (in seconds) passed between the start an...
void SetQueryRunning(TProofQueryResult *pq)
Set query in running state.
void ToLower()
Change string to lower-case.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
TQueryResult * CloneInfo()
Return an instance of TQueryResult containing only the local info fields, i.e.
virtual Int_t SendObject(const TObject *obj, Int_t kind=kMESS_OBJECT)
Send an object.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
TReaperTimer * fReaperTimer
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual void RemoveAll()
Remove all sockets from the monitor.
virtual void ShowDataSets(const char *uri="*", const char *opt="")
Prints formatted information about the dataset 'uri'.
const char *const kPROOF_PackageLockFile
Each ROOT method (see TMethod) has a linked list of its arguments.
Int_t GetCompressionLevel() const
Int_t DrawQueries() const
TProofQueryResult * LocateQuery(TString queryref, Int_t &qry, TString &qdir)
Locate query referenced by queryref.
virtual TMap * GetGroupQuotaMap()
virtual FILE * OpenPipe(const char *command, const char *mode)
Open a pipe.
TProofServLogHandlerGuard(const char *cmd, TSocket *s, const char *pfx="", Bool_t on=kTRUE)
Init a guard for executing a command in a pipe.
virtual void DeActivateAll()
De-activate all activated sockets.
TMacro * GetSelecImp() const
static volatile Int_t gProofServDebug
const char * GetGroup() const
Long_t ExecPlugin(int nargs, const T &...params)
TMonitor * fMergingMonitor
void ScanPreviousQueries(const char *dir)
Scan the queries directory for the results of previous queries.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Int_t AddIncludePath(const char *incpath, Bool_t onClient=kFALSE, TList *wrks=0, Bool_t doCollect=kTRUE)
Add 'incpath' to the inc path search.
static void ResolveKeywords(TString &fname, const char *path=0)
Replace , , , , , , , and placeholders in fname...
Long64_t GetBytesRead() const
TString & Insert(Ssiz_t pos, const char *s)
virtual void ClearCache(const char *file=0)
Remove file from all file caches.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
static Float_t GetMemHWM()
MemHWM getter.
virtual int GetProcInfo(ProcInfo_t *info) const
Returns cpu and memory used by this process into the ProcInfo_t structure.
Int_t SendCurrentState(ESlaves list=kActive)
Transfer the current state of the master to the active slave servers.
virtual TFileHandler * RemoveFileHandler(TFileHandler *fh)
Remove a file handler from the list of file handlers.
TProofNodeInfo * GetMaster()
Get the master node.
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
static Long_t fgVirtMemMax
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void HandleCheckFile(TMessage *mess, TString *slb=0)
Handle file checking request.
const char * GetGroup() const
void SendParallel(Bool_t async=kFALSE)
Send number of parallel nodes to master or client.
const char * GetService() const
virtual void HandleSocketInput()
Handle input coming from the client or from the master server.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
static const char * GetMacroPath()
Get macro search path. Static utility function.
static Int_t GetErrno()
Static function returning system error number.
virtual void HandleArchive(TMessage *mess, TString *slb=0)
Handle archive request.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual void UpdateProgressInfo()=0
Int_t RemoveIncludePath(const char *incpath, Bool_t onClient=kFALSE)
Remove 'incpath' from the inc path search.
virtual Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)=0
TTimeStamp GetLastUsage()
virtual TObject * Clone(const char *newname="") const
Make a clone of an collection using the Streamer facility.
const char * Data() const
virtual TObject * ReadObject(const TClass *cl)
Read object from I/O buffer.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
static void SetLastEntry(Long64_t lastentry)
Set the last entry before exception.
static struct mg_connection * fc(struct mg_context *ctx)
Int_t Update(Long64_t avgsize=-1)
Update accumulated information about the elements of the collection (e.g.
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
virtual TList * GetOutputList() const =0
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
void Stop()
Stop the stopwatch.
TList * GetWorkers()
Get the list of worker nodes.
void StopProcess(Bool_t abort, Int_t timeout=-1)
Send STOPPROCESS message to master and workers.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual FILE * TempFileName(TString &base, const char *dir=0)
Create a secure temporary file by appending a unique 6 letter string to base.
virtual void HandleFork(TMessage *mess)
Cloning itself via fork. Not implemented.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
virtual void MergeOutput(Bool_t=kFALSE)=0
This code implements the MD5 message-digest algorithm.
The TNamed class is the base class for all named ROOT classes.
virtual void ShowQuota(const char *opt)
Display quota information.
void SetLogLevel(Int_t level, UInt_t mask=TProofDebug::kAll)
Set server logging level.
virtual void Run(Bool_t retrn=kFALSE)
Main application eventloop. Calls system dependent eventloop via gSystem.
virtual char * ReadString(char *s, Int_t max)
Read string from I/O buffer.
const char *const kPROOF_QueryDir
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
static Long64_t GetFileBytesRead()
Static function returning the total number of bytes read from all files.
virtual Int_t RegisterDataSet(const char *uri, TFileCollection *dataSet, const char *opt)
Register a dataset, perfoming quota checkings, if needed.
virtual void ShowCache(Bool_t all=kFALSE)
List contents of file cache.
Int_t GetQuerySeqNum() const
TDSetElement * GetNextPacket(Long64_t totalEntries=-1)
Get next range of entries to be processed on this server.
virtual void Start(Long_t milliSec=-1, Bool_t singleShot=kFALSE)
Starts the timer with a milliSec timeout.
void Init(const TFunction *func)
Initialize the method invocation environment based on the TFunction object.
TList * GetListOfDeActives() const
Returns a list with all de-active sockets.
void DeleteAll()
Remove all (key,value) pairs from the map AND delete the keys AND values when they are allocated on t...
virtual const char * GetDynamicPath()
Return the dynamic path (used to find shared libraries).
TVirtualProofPlayer * GetPlayer() const
virtual void HandleUrgentData()
Handle Out-Of-Band data sent by the master or client.
TFileHandler * fInputHandler
Int_t CleanupSession(const char *sessiontag)
Cleanup query dir qdir.
virtual const char * Getenv(const char *env)
Get environment variable.
TList * GetListOfElements() const
static Int_t RegisterDataSets(TList *in, TList *out, TDataSetManager *dsm, TString &e)
Register TFileCollections in 'out' as datasets according to the rules in 'in'.
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...
TString & Append(const char *cs)
std::vector< std::vector< double > > Data
virtual void ExitLoop()
Exit from event loop.
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
TProofQueryResult * NextQuery()
Get the next query from the waiting list.
const char * GetUser() const
void FlushLogFile()
Reposition the read pointer in the log file to the very end.
Int_t Atoi() const
Return integer value of string.
virtual ~TProofServ()
Cleanup.
Bool_t IsParallel() const
Int_t UnloadPackages()
Unloads all enabled packages. Returns -1 in case of error, 0 otherwise.
static Long_t GetResMemMax()
ResMemMax getter.
TList * GetListOfInactiveSlaves() const
virtual TSocket * Accept(UChar_t Opt=0)
Accept a connection on a server socket.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Method or function calling interface.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Int_t HandleCache(TMessage *mess, TString *slb=0)
Handle here all cache and package requests.
virtual void HandleQueryList(TMessage *mess)
Handle request for list of queries.
A container class for query results.
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...
Long64_t GetEntries() const
TList * GetListOfSlaveInfos()
Returns list of TSlaveInfo's. In case of error return 0.
const char * GetWorkDir() const
void Error(const char *location, const char *msgfmt,...)
const char *const kPROOF_DataDir
TSocket * Select()
Return pointer to socket for which an event is waiting.
virtual Int_t SendAsynMessage(const char *msg, Bool_t lf=kTRUE)
Send an asychronous message to the master / client .
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.
TObject * GetParameter(const char *par) const
Get specified parameter.
static TVirtualProofPlayer * Create(const char *player, TProof *p, TSocket *s=0)
Create a PROOF player.
TObject * FindObject(const char *keyname) const
Check if a (key,value) pair exists with keyname as name of the key.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
virtual ~TProofServLogHandler()
Handle available message in the open file.
virtual ~TReaperTimer()
Destructor.
virtual Int_t Fork()
Fork a child.
Bool_t Notify()
Check if any of the registered children has changed its state.
TShutdownTimer(TProofServ *p, Int_t delay)
Construtor.
static TProofServ * This()
Static function returning pointer to global object gProofServ.
Bool_t RemoveDataSet(const char *group, const char *user, const char *dsName)
Removes the indicated dataset.
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
Read and parse the resource file for a certain level.
const char *const kPROOF_QueryLockFile
static Float_t GetMemStop()
MemStop getter.
void Sort(Bool_t useindex=kFALSE)
Sort the collection.
void Reset()
Reset the message buffer so we can use (i.e. fill) it again.
Int_t UploadPackage(const char *par, EUploadPackageOpt opt=kUntar, TList *workers=0)
Upload a PROOF archive (PAR file).
const char Int_t const char TProof Int_t const char * workdir
virtual void AddQueryResult(TQueryResult *q)=0
Named parameter, streamable and storable.
Int_t GetPriority()
Get the processing priority for the group the user belongs too.
virtual Bool_t Load() const
Load the macro into the interpreter.
TSocket * GetSocket() const
const TString & GetWorkDir() const
virtual void Close(Option_t *opt="")
Close the socket.
static Int_t fgLogToSysLog
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 void Setenv(const char *name, const char *value)
Set environment variable.
TString GetString() const
const char * GetPrefix() const
Int_t DisablePackages()
Remove all packages.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
R__EXTERN TSystem * gSystem
static Int_t WriteChecksum(const char *file, const TMD5 *md5)
Writes checksum in ASCII format to specified file.
Float_t GetUsedCPU() const
TProofLockPath * fPackageLock
static void GetLocalServer(TString &dsrv)
Extract LOCALDATASERVER info in 'dsrv'.
const char *const kPROOF_DataSetDir
TList * GetListOfSlaves() const
Long64_t GetBytes() const
void SetLearnTime(Double_t learnTime)
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
TList * GetListOfLines() const
virtual TObject * Remove(TObject *obj)
Remove object from the list.
void ShowPackages(Bool_t all=kFALSE, Bool_t redirlog=kFALSE)
List contents of package directory.
Bool_t Gets(FILE *fp, Bool_t chop=kTRUE)
Read one line from the stream, including the , or until EOF.
virtual Bool_t ExistsDataSet(const char *uri)
Checks if the indicated dataset exits.
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.
Bool_t Notify()
Handle expiration of the idle timer. The session will just be terminated.
virtual TEnvRec * Lookup(const char *n)
Loop over all resource records and return the one with name.
virtual void SetDynamicPath(const char *pathname)
Set the dynamic path to a new value.
virtual Int_t ShowCache(const char *uri)
Show cached information matching uri.
void SetActive(Bool_t=kTRUE)
Int_t WriteDataSet(const char *group, const char *user, const char *dsName, TFileCollection *dataset, UInt_t option=0, TMD5 *checksum=0)
Writes indicated dataset.
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
Int_t QueueQuery(TProofQueryResult *pq)
Add a query to the waiting list Returns the number of queries in the list.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
const char * GetConfDir() const
Bool_t TestBit(UInt_t f) const
const char *const kPROOF_CacheLockFile
TIdleTOTimer * fIdleTOTimer
Int_t ScanDataSet(const char *uri, const char *opt)
Scans the dataset indicated by 'uri' following the 'opts' directives.
virtual int Umask(Int_t mask)
Set the process file creation mode mask.
void SetRunning(Int_t startlog, const char *par, Int_t nwrks)
Call when running starts.
Bool_t IsDataReady(Long64_t &totalbytes, Long64_t &bytesready)
See if the data is ready to be analyzed.
This class implements a plugin library manager.
virtual void SetMerging(Bool_t on=kTRUE)=0
void SaveSource(FILE *fp)
Save macro source in file pointer fp.
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...
virtual Int_t ReadFile(const char *filename)
Read lines in filename in this macro.
A TEventList object is a list of selected events (entries) in a TTree.
virtual void HandleSigPipe()
Called when the client is not alive anymore (i.e.
Handles synchronous and a-synchronous timer events.
virtual const char * GetField(Int_t field)=0
Bool_t IsEndMaster() const
virtual const char * GetName() const
Returns name of object.
virtual Bool_t IsValid() const
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...
TServerSocket * fMergingSocket
TSubString Strip(EStripType s=kTrailing, char c= ' ') const
Return a substring of self stripped at beginning and/or end.
Int_t GetProtocol() const
Int_t Ping(ESlaves list)
Ping PROOF slaves. Returns the number of slaves that responded.
const Int_t kPROOF_Protocol
virtual Int_t Exec(const char *shellcmd)
Execute a command.
static Bool_t IsActive()
Static function that returns kTRUE in case we are a PROOF server.
virtual void Abort(int code=0)
Abort the application.
Bool_t FinalizeQuery(TProofQueryResult *pq, TProof *proof, TVirtualProofPlayer *player)
Final steps after Process() to complete the TQueryResult instance.
virtual void ProcessNext(TString *slb=0)
process the next query from the queue of submitted jobs.
Int_t RemoveWorkers(TList *wrks)
Used for shuting down the workres after a query is finished.
virtual const char * GetBuildCompilerVersion() const
Return the build compiler version.
void SetName(const char *name)
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 void EnableSchemaEvolutionForAll(Bool_t enable=kTRUE)
Static function enabling or disabling the automatic schema evolution.
void Warning(const char *location, const char *msgfmt,...)
Long64_t GetEntries() const
TShutdownTimer * fShutdownTimer
const char * GetUser() const
virtual void FreeDirectory(void *dirp)
Free a directory.
Int_t SendResults(TSocket *sock, TList *outlist=0, TQueryResult *pq=0)
Sends all objects from the given list to the specified socket.
const char * GetImage() const
virtual int ClosePipe(FILE *pipe)
Close the pipe.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
virtual void ValidateDSet(TDSet *dset)
Validate a TDSet.
void AddPid(Int_t pid)
Add an entry for 'pid' in the internal list.
virtual void HandleSubmerger(TMessage *mess)
Handle a message of type kPROOF_SUBMERGER.
char * StrDup(const char *str)
Duplicate the string str.
Int_t RemoveDynamicPath(const char *libpath, Bool_t onClient=kFALSE)
Remove 'libpath' from the lib path search.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
virtual void RemoveQueryResult(const char *ref)=0
virtual void HandleRetrieve(TMessage *mess, TString *slb=0)
Handle retrieve request.
Int_t SendCommand(const char *cmd, ESlaves list=kActive)
Send command to be executed on the PROOF master and/or slaves.
virtual Int_t HandleWorkerLists(TMessage *mess)
Handle here all requests to modify worker lists.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=0)
Redirect standard output (stdout, stderr) to the specified file.
Int_t LoadPackage(const char *package, Bool_t notOnClient=kFALSE, TList *loadopts=0, TList *workers=0)
Load specified package.
TString & Remove(Ssiz_t pos)
TObject * Get(const char *namecycle)
Get object with name "name;cycle" (e.g.
virtual int Chmod(const char *file, UInt_t mode)
Set the file permission bits. Returns -1 in case or error, 0 otherwise.
R__EXTERN TProof * gProof
TObject * GetInputObject(const char *classname) const
Return first instance of class 'classname' in the input list.
virtual void SysError(const char *method, const char *msgfmt,...) const
Issue system error message.
Class used by TMap to store (key,value) pairs.
Int_t OldAuthSetup(TString &wconf)
Setup authentication related stuff for old versions.
TList * GetListOfActiveSlaves() const
virtual const char * GetIncludePath()
Get the list of include path.
virtual Int_t GetSize() const
Bool_t Notify()
Handle available message in the open file.
Long64_t GetFirst() const
virtual void SendLogFile(Int_t status=0, Int_t start=-1, Int_t end=-1)
Send log file to master.
TString GetFileName() const
void ResetParam()
Reset parameter list. To be used before the first call the SetParam().
virtual Long64_t GetEventsProcessed() const =0
Int_t GetActive(Long_t timeout=-1) const
Return number of sockets in the active list.
void SetSysInfo(SysInfo_t si)
Setter for fSysInfo.
virtual Func_t DynFindSymbol(const char *module, const char *entry)
Find specific entry point in specified library.
TList * GetListOfMethodArgs()
Return list containing the TMethodArgs of a TFunction.
virtual const char * GetName() const
Returns name of object.
virtual Int_t ReadKeys(Bool_t forceRead=kTRUE)
Read the linked list of keys.
virtual const char * HostName()
Return the system's host name.
virtual int Symlink(const char *from, const char *to)
Create a symbolic link from file1 to file2.
void Reset(const char *dir)
Reset PROOF environment to be ready for execution of next command.
char * DynamicPathName(const char *lib, Bool_t quiet=kFALSE)
Find a dynamic library called lib using the system search paths.
Int_t(* OldProofServAuthSetup_t)(TSocket *, Bool_t, Int_t, TString &, TString &, TString &)
Int_t Lock()
Locks the directory.
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 UseDynamicStartup() const
void Run(Bool_t retrn=kFALSE)
Main server eventloop.
virtual void SetEntryList(TObject *aList)
Set entry (or event) list for this data set.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
const char * GetOrdinal() const
The TTimeStamp encapsulates seconds and ns since EPOCH.
virtual void SetInputList(TList *in, Bool_t adopt=kTRUE)
Set / change the input list.
virtual Int_t GetGid(const char *group=0)
Returns the group's id. If group = 0, returns current user's group.
#define R__LOCKGUARD(mutex)
virtual TQueryResult * GetCurrentQuery() const =0
void SetRunStatus(ERunStatus rst)
void RemoveQuery(TQueryResult *qr, Bool_t soft=kFALSE)
Remove everything about query qr.
virtual TInetAddress GetSockName(int sock)
Get Internet Protocol (IP) address of host and port #.
Int_t Unlock()
Unlock the directory.
virtual void StopProcess(Bool_t abort, Int_t timeout=-1)=0
virtual void Clear(Option_t *option="")
Remove all objects from the list.
virtual Int_t GetUid(const char *user=0)
Returns the user's id. If user = 0, returns current user's id.
void SetIdle(Bool_t st=kTRUE)
Change the idle status.
Int_t AddWorkers(TList *wrks)
Works on the master node only.
void SetArchived(const char *archfile)
Set (or update) query in archived state.
Bool_t Notify()
Handle expiration of the shutdown timer.
static TMap * GetDataSetNodeMap(TFileCollection *fc, TString &emsg)
Get a map {server-name, list-of-files} for collection 'fc' to be used in TPacketizerFile.
void Print(Option_t *option="") const
Print status of slave server.
void SaveQuery(TProofQueryResult *qr, const char *fout=0)
Save current status of query 'qr' to file name fout.
Int_t Match(const TString &s, UInt_t start=0)
Runs a match on s against the regex 'this' was created with.
static TString fgSysLogEntity
Int_t UnloadPackage(const char *package)
Unload specified package.
void Throw(int code)
If an exception context has been set (using the TRY and RETRY macros) jump back to where it was set...
Mother of all ROOT objects.
Float_t GetCpuTime() const
Global functions class (global functions are obtained from CINT).
void Print(Option_t *option="") const
Prints the contents of the TFileCollection.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
THashList * fGlobalPackageDirList
void TruncateLogFile()
Truncate the log file to the 80% of the required max size if this is set.
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
virtual Bool_t Add(const char *file, const char *objname=0, const char *dir=0, Long64_t first=0, Long64_t num=-1, const char *msd=0)
Add file to list of files to be analyzed.
Bool_t ExistsDataSet(const char *group, const char *user, const char *dsName)
Checks if the indicated dataset exits.
virtual void HandleGetTreeHeader(TMessage *mess)=0
virtual void Openlog(const char *name, Int_t options, ELogFacility facility)
Open connection to system log daemon.
void ShowEnabledPackages(Bool_t all=kFALSE)
List which packages are enabled.
Bool_t R_ISDIR(Int_t mode)
virtual Int_t CreateServer()
Finalize the server setup.
Int_t UnloadPackage(const char *package)
Removes link to package in working directory, removes entry from include path, removes entry from ena...
virtual Long64_t GetCacheSize()=0
virtual void Add(TObject *obj)
Wrapper for PCRE library (Perl Compatible Regular Expressions).
Int_t GetSessionStatus()
Return the status of this session: 0 idle 1 running 2 being terminated (currently unused) 3 queued 4 ...
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
void Execute(const char *, const char *, int *=0)
Execute method on this object with the given parameter string, e.g.
virtual void SetOutputFilePath(const char *fp)=0
TFileCollection * GetDataSet(const char *uri, const char *srv=0)
Utility function used in various methods for user dataset upload.
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 Exit(int code, Bool_t mode=kTRUE)
Exit the application.
Int_t CleanupQueriesDir()
Remove all queries results referring to previous sessions.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
R__EXTERN Int_t gProofDebugLevel
void WriteObject(const TObject *obj)
Write object to message buffer.
virtual Int_t Setup()
Print the ProofServ logo on standard output.
TProofServLogHandler(const char *cmd, TSocket *s, const char *pfx="")
Execute 'cmd' in a pipe and handle output messages from the related file.
void AskStatistics()
Ask the for the statistics of the slaves.
const char *const kUNTAR3
void SetParam(Long_t l)
Add a long method parameter.
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...
Bool_t IsTopMaster() const
Int_t SetParallel(Int_t nodes=-1, Bool_t random=kFALSE)
Tell PROOF how many slaves to use in parallel.
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
ClassImp(TSlaveInfo) Int_t TSlaveInfo const TSlaveInfo * si
Used to sort slaveinfos by ordinal.
virtual void DeletePlayer()
Delete player instance.
Int_t AddDynamicPath(const char *libpath, Bool_t onClient=kFALSE, TList *wrks=0, Bool_t doCollect=kTRUE)
Add 'libpath' to the lib path search.
virtual TProofProgressStatus * GetProgressStatus() const =0
void RedirectOutput(const char *dir=0, const char *mode="w")
Redirect stdout to a log file.
virtual void AddIncludePath(const char *includePath)
Add includePath to the already set include path.
virtual Int_t AddOutputObject(TObject *obj)=0
virtual void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
static void ResetErrno()
Static function resetting system error number.
static void SetLastMsg(const char *lastmsg)
Set the message to be sent back in case of exceptions.
Class describing a generic file including meta information.
static void SetDefaultPrefix(const char *pfx)
Static method to set the default prefix.
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
void RestartComputeTime()
Reset the compute time.
const AParamType & GetVal() const
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual void Terminate(Int_t status)
Terminate the proof server.
TClass * GetClass() const
virtual ~TProofServLogHandlerGuard()
Close a guard for executing a command in a pipe.
const Bool_t kIterBackward
virtual Int_t SavePartialResults(Bool_t queryend=kFALSE, Bool_t force=kFALSE)=0
Bool_t IsParallel() const
True if in parallel mode.
void SendStatistics()
Send statistics of slave server to master or client.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) 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 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...
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
static void ErrorHandler(Int_t level, Bool_t abort, const char *location, const char *msg)
The PROOF error handler function.
static TMD5 * ReadChecksum(const char *file)
Returns checksum stored in ASCII in specified file.
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
Int_t ClearPackage(const char *package)
Remove a specific package.
void SetString(const char *s)
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
TList * PreviousQueries() const
Int_t CleanupWaitingQueries(Bool_t del=kTRUE, TList *qls=0)
Cleanup the waiting queries list.
virtual void TurnOn()
Add the timer to the system timer list.
A List of entry numbers in a TTree or TChain.
const char * GetName() const
Returns name of object.
Int_t DeactivateWorker(const char *ord, Bool_t save=kTRUE)
Remove the worker identified by the ordinal number 'ord' from the the active list.
virtual TMap * GetDataSets(const char *uri, UInt_t=TDataSetManager::kExport)
Returns all datasets for the and specified by .
static TString fgSysLogService
Int_t GetParallel() const
Returns number of slaves active in parallel mode.
TProofServ(Int_t *argc, char **argv, FILE *flog=0)
Main constructor.
TProofServLogHandler * fExecHandler
TProofLockPath * fCacheLock
const char * GetFile() const
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...
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
virtual void SetIncludePath(const char *includePath)
IncludePath should contain the list of compiler flags to indicate where to find user defined header f...
Bool_t IsEndMaster() const
TQueryResultManager * fQMgr
virtual TObjString * GetLineWith(const char *text) const
Search the first line containing text.
virtual Long_t ProcessFile(const char *file, Int_t *error=0, Bool_t keep=kFALSE)
Process a file containing a C++ macro.
virtual void Close(Option_t *option="")
Close a file.
TProofLockPath * fQueryLock
static Long64_t fgLastEntry
const char *const kPROOF_CacheDir
virtual TSQLRow * Next()=0
const char *const kPROOF_PackDir
static Int_t AssertDataSet(TDSet *dset, TList *input, TDataSetManager *mgr, TString &emsg)
Make sure that dataset is in the form to be processed.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.