22#include "RConfigure.h"
46#if (defined(__FreeBSD__) && (__FreeBSD__ < 4)) || \
47 (defined(__APPLE__) && (!defined(MAC_OS_X_VERSION_10_3) || \
48 (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3)))
50#define lockf(fd, op, sz) flock((fd), (op))
52#define F_LOCK (LOCK_EX | LOCK_NB)
55#define F_ULOCK LOCK_UN
87#include "compiledata.h"
126static const char *__crashreporter_info__ = 0;
127asm(
".desc ___crashreporter_info__, 0x10");
165 Printf(
"Received SIGTERM: terminating");
166 fServ->HandleTermination();
186 fServ->HandleUrgentData();
209 fServ->HandleSigPipe();
230 fServ->HandleSocketInput();
257 Error(
"TProofServLogHandler",
"executing command in pipe");
261 Error(
"TProofServLogHandler",
262 "undefined command (%p) or socket (%p)", (
int *)cmd, s);
280 Error(
"TProofServLogHandler",
"undefined file (%p) or socket (%p)",
f, s);
293 fgCmdRtn = WIFEXITED(rc) ? WEXITSTATUS(rc) : -1;
311 if ((plf = strchr(
line,
'\n')))
315 if (
fPfx.Length() > 0) {
317 log.Form(
"%s: %s",
fPfx.Data(),
line);
318 }
else if (
fgPfx.Length() > 0) {
361 Error(
"TProofServLogHandlerGuard",
"invalid handler");
365 Error(
"TProofServLogHandlerGuard",
"undefined command");
381 Error(
"TProofServLogHandlerGuard",
"invalid handler");
385 Error(
"TProofServLogHandlerGuard",
"undefined file");
407 fTimeout =
gEnv->GetValue(
"ProofServ.ShutdownTimeout", 20);
419 printf(
"TShutdownTimer::Notify: checking activity on the input socket\n");
429 printf(
"TShutdownTimer::Notify: input socket: %p: did not show any activity"
430 " during the last %d mins: aborting\n", xs,
fTimeout);
436 printf(
"TShutdownTimer::Notify: input socket: %p: show activity"
437 " %ld secs ago\n", xs, dt / 60000);
467 spid.
Form(
"%d", pid);
487 pid = waitpid(p->
GetVal(), &status, WNOHANG);
488 }
while (pid < 0 && errno == EINTR);
491 pid = _cwait(&status, (intptr_t)p->
GetVal(), 0);
493 if (pid > 0 && pid == p->
GetVal()) {
517 Info (
"Notify",
"session idle for more then %lld secs: terminating",
Long64_t(
fTime)/1000);
522 if ((uss_rc =
fProofServ->UpdateSessionStatus(4)) != 0)
523 Warning(
"Notify",
"problems updating session status (errno: %d)", -uss_rc);
527 msg.
Form(
"\n//\n// PROOF session at %s (%s) terminated because idle for more than %lld secs\n"
528 "// Please IGNORE any error message possibly displayed below\n//",
531 msg.
Form(
"\n//\n// PROOF session at %s (%s) terminated because idle for more than %lld secs\n//",
539 Warning(
"Notify",
"fProofServ undefined!");
566 Printf(
"proofserv: command line testing: OK");
579 Long_t mmx = strtol(
gSystem->Getenv(
"PROOF_VIRTMEMMAX"), 0, 10);
580 if (mmx < kMaxLong && mmx > 0)
585 Long_t mmx = strtol(
gSystem->Getenv(
"ROOTPROOFASHARD"), 0, 10);
586 if (mmx < kMaxLong && mmx > 0)
592 Long_t mmx = strtol(
gSystem->Getenv(
"PROOF_RESMEMMAX"), 0, 10);
593 if (mmx < kMaxLong && mmx > 0)
601 Warning(
"TProofServ",
"requested memory fraction threshold to stop processing"
602 " (MemStop) out of range [0,1] - ignoring");
606 Warning(
"TProofServ",
"requested memory fraction threshold for warning and finer monitoring"
607 " (MemHWM) out of range [0,MemStop] - ignoring");
614 if ((
gEnv->GetValue(
"Proof.GdbHook",0) == 3 && !test) ||
615 (
gEnv->GetValue(
"Proof.GdbHook",0) == 4 && test)) {
616 while (gProofServDebug)
621 if (argc && *argc >= 4)
622 if (!strcmp(argv[3],
"test"))
626 if (argc && *argc < 2) {
627 Error(
"TProofServ",
"Must have at least 1 arguments (see proofd).");
714 TString logmx =
gEnv->GetValue(
"ProofServ.LogFileMaxSize",
"");
734 logmx =
gEnv->GetValue(
"ProofServ.LogFileMaxSize",
"");
735 Warning(
"TProofServ",
"bad formatted log file size limit ignored: '%s'", logmx.
Data());
750 TString slog =
gEnv->GetValue(
"ProofServ.LogToSysLog",
"");
755 char c = (slog[0] ==
'M' || slog[0] ==
'm') ?
'm' :
'a';
756 c = (slog[0] ==
'W' || slog[0] ==
'w') ?
'w' :
c;
763 Warning(
"TProofServ",
"request for syslog logging ineffective!");
777 Bool_t enableSchemaEvolution =
gEnv->GetValue(
"Proof.SchemaEvolution",1);
778 if (enableSchemaEvolution) {
781 Info(
"TProofServ",
"automatic schema evolution in TMessage explicitly disabled");
794 if (opensock.
Length() <= 0)
795 opensock =
gEnv->GetValue(
"ProofServ.OpenSock",
"-1");
798 Fatal(
"CreateServer",
"Invalid socket descriptor number (%d)", sock);
809 if (
gEnv->GetValue(
"Proof.GdbHook",0) == 1) {
815 if (
gEnv->GetValue(
"Proof.GdbHook",0) == 2) {
822 Info(
"CreateServer",
"Service %s ConfDir %s IsMaster %d\n",
880 logon =
gEnv->GetValue(
"Proof.Load", (
char *)0);
889 logon =
gEnv->GetValue(
"Proof.Logon", (
char *)0);
909 TString master =
"proof://__master__";
913 master +=
a.GetPort();
919 Error(
"CreateServer",
"no plugin manager found");
928 Error(
"CreateServer",
"no plugin found for TProof with a"
929 " config file of '%s'",
fConfFile.Data());
936 if (
h->LoadPlugin() == -1) {
937 Error(
"CreateServer",
"plugin for TProof could not be loaded");
949 Error(
"CreateServer",
"plugin for TProof could not be executed");
972 msg.
Form(
"Warning: client version is too old: automatic schema evolution is ineffective.\n"
973 " This may generate compatibility problems between streamed objects.\n"
974 " The advise is to move to ROOT >= 5.21/02 .");
981 Int_t idle_to =
gEnv->GetValue(
"ProofServ.IdleTimeout", -1);
986 Info(
"CreateServer",
" idle timer started (%d secs)", idle_to);
988 Info(
"CreateServer",
" idle timer not started (no idle timeout requested)");
1029 if (
gSystem->Getenv(
"PROOFNOPROOF")) {
1030 motdname =
gSystem->Getenv(
"PROOFNOPROOF");
1032 motdname +=
"/etc/proof/noproof";
1034 if ((motd = fopen(motdname,
"r"))) {
1037 while ((
c = getc(motd)) != EOF)
1047 gSystem->ExpandPathName(lastname);
1049 Long_t id, flags, modtime, lasttime = 0;
1050 if (
gSystem->GetPathInfo(lastname.
Data(), &
id, &
size, &flags, &lasttime) == 1)
1054 if (time(0) - lasttime > (time_t)86400)
1059 if (
gSystem->Getenv(
"PROOFMOTD")) {
1060 motdname =
gSystem->Getenv(
"PROOFMOTD");
1063 motdname +=
"/etc/proof/motd";
1065 if (
gSystem->GetPathInfo(motdname, &
id, &
size, &flags, &modtime) == 0) {
1066 if (modtime > lasttime || show) {
1067 if ((motd = fopen(motdname,
"r"))) {
1070 while ((
c = getc(motd)) != EOF)
1080 Int_t fd = creat(lastname.
Data(), 0600);
1081 if (fd >= 0) close(fd);
1094 Error(
"Get",
"problems sending request");
1112 Error(
"Get",
"command %d cannot be executed while processing",
what);
1113 }
else if (xrc == -2) {
1114 Error(
"Get",
"unknown command %d ! Protocol error?",
what);
1132 Info(
"RestartComputeTime",
"compute time restarted after %f secs (%d entries)",
1158 fPlayer->UpdateProgressInfo();
1159 status =
fPlayer->GetProgressStatus();
1161 Error(
"GetNextPacket",
"no progress status object");
1178 req << cacheSize << learnent;
1183 req << totalEntries;
1190 Info(
"GetNextPacket",
"cacheSize: %lld, learnent: %d", cacheSize, learnent);
1197 req <<
fLatency.RealTime() << realtime << cputime
1198 << bytesRead << totalEntries;
1200 req <<
fPlayer->GetEventsProcessed();
1206 Error(
"GetNextPacket",
"Send() failed, returned %d", rc);
1214 Warning(
"GetNextPacket",
"problems saving partial results");
1223 if ((rc =
fSocket->Recv(mess)) <= 0) {
1225 Error(
"GetNextPacket",
"Recv() failed, returned %d", rc);
1241 PDB(kLoop, 2)
Info(
"GetNextPacket",
"'%s' '%s' '%s' %lld %lld",
1242 e->GetFileName(),
e->GetDirectory(),
1243 e->GetObjName(),
e->GetFirst(),
e->GetNum());
1245 PDB(kLoop, 2)
Info(
"GetNextPacket",
"Done");
1255 PDB(kLoop, 2)
Info(
"GetNextPacket:kPROOF_STOPPROCESS",
"received");
1261 Error(
"GetNextPacket",
"command %d cannot be executed while processing",
what);
1262 }
else if (xrc == -2) {
1263 Error(
"GetNextPacket",
"unknown command %d ! Protocol error?",
what);
1282 Bool_t xtest = (argc && *argc > 3 && !strcmp(argv[3],
"test")) ?
kTRUE :
kFALSE;
1285 if (xtest && !(isatty(0) == 0 || isatty(1) == 0)) {
1286 Printf(
"proofserv: command line testing: OK");
1290 if (!argc || (argc && *argc <= 1)) {
1291 Fatal(
"GetOptions",
"Must be started from proofd with arguments");
1295 if (!strcmp(argv[1],
"proofserv")) {
1298 }
else if (!strcmp(argv[1],
"proofslave")) {
1302 Fatal(
"GetOptions",
"Must be started as 'proofserv' or 'proofslave'");
1309 if (!(
gSystem->Getenv(
"ROOTCONFDIR"))) {
1310 Fatal(
"GetOptions",
"ROOTCONFDIR shell variable not set");
1338 if (
fSocket->Recv(mess) <= 0 || !mess) {
1341 Error(
"HandleSocketInput",
"retrieving message from input socket");
1347 Info(
"HandleSocketInput",
"got type %d from '%s'",
what,
fSocket->GetTitle());
1362 emsg.
Form(
"HandleSocketInput: command %d cannot be executed while processing",
what);
1363 }
else if (rc == -3) {
1364 emsg.
Form(
"HandleSocketInput: message %d undefined! Protocol error?",
what);
1366 emsg.
Form(
"HandleSocketInput: unknown command %d! Protocol error?",
what);
1369 }
else if (rc == 2) {
1373 Info(
"HandleSocketInput",
"message of type %d enqueued; sz: %d",
1383 Info(
"HandleSocketInput",
"processing enqueued message of type %d; left: %d",
1393 }
catch (std::bad_alloc &) {
1395 exmsg.
Form(
"caught exception 'bad_alloc' (memory leak?) %s %lld",
1397 }
catch (std::exception &exc) {
1399 exmsg.
Form(
"caught standard exception '%s' %s %lld",
1403 exmsg.
Form(
"caught exception throwing %d %s %lld",
1405 }
catch (
const char *str) {
1407 exmsg.
Form(
"caught exception throwing '%s' %s %lld",
1411 exmsg.
Form(
"caught exception <unknown> %s %lld",
1418 Error(
"HandleSocketInput",
"%s", exmsg.
Data());
1429 exmsg.
Form(
"high-memory footprint detected during Process(...) - terminating");
1430 Error(
"HandleSocketInput",
"%s", exmsg.
Data());
1444 Int_t ngwrks =
fProof->GetListOfActiveSlaves()->GetSize() +
fProof->GetListOfInactiveSlaves()->GetSize();
1445 if (rc == 0 && ngwrks == 0 && !masterOnly && !dynamicStartup) {
1446 SendAsynMessage(
" *** No workers left: cannot continue! Terminating ... *** ");
1473 if (!mess)
return -3;
1477 Info(
"HandleSocketInput",
"processing message type %d from '%s'",
1482 Int_t rc = 0, lirc = 0;
1497 fProof->SendCommand(str);
1500 Info(
"HandleSocketInput:kMESS_CINT",
"processing: %s...", str);
1504 ocwd =
gSystem->WorkingDirectory();
1509 gSystem->ChangeDirectory(ocwd);
1519 if (pslb) slb = str;
1556 Info(
"HandleSocketInput:kPROOF_LOGLEVEL",
"debug level set to %d (mask: 0x%x)",
1587 Warning(
"HandleSocketInput:kPROOF_STATUS",
1588 "kPROOF_STATUS message is obsolete");
1590 Warning(
"HandleSocketInput:kPROOF_STATUS",
"problem sending of request");
1607 Info(
"HandleSocketInput:kPROOF_STOP",
"request for worker %s", ord.
Data());
1611 Info(
"HandleSocketInput:kPROOF_STOP",
"got request to terminate");
1624 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_STOPPROCESS",
"enter");
1631 Info(
"HandleSocketInput:kPROOF_STOPPROCESS",
1632 "recursive mode: enter %d, %ld", aborted, timeout);
1635 fProof->StopProcess(aborted, timeout);
1639 fPlayer->StopProcess(aborted, timeout);
1646 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_PROCESS",
"enter");
1656 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_SENDOUTPUT",
1657 "worker was asked to send output to master");
1660 Error(
"HandleSocketInput:kPROOF_SENDOUTPUT",
"problems sending output list");
1705 Info(
"HandleSocketInput:kPROOF_MAXQUERIES",
"Enter");
1717 Info(
"HandleSocketInput:kPROOF_CLEANUPSESSION",
"Enter");
1720 if (
fQMgr &&
fQMgr->CleanupSession(stag) == 0) {
1721 Printf(
"Session %s cleaned up", stag.
Data());
1723 Printf(
"Could not cleanup session %s", stag.
Data());
1733 {
PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
"Enter");
1741 (*mess) >> isTree >>
filename >> dir >> objname;
1742 PDB(kGlobal, 2)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
1743 "Report size of object %s (%s) in dir %s in file %s",
1744 objname.Data(), isTree ?
"T" :
"O",
1747 PDB(kGlobal, 2)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
1748 "Found %lld %s", entries, isTree ?
"entries" :
"objects");
1753 answ << entries << objname;
1756 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETENTRIES",
"Done");
1781 sscanf(str,
"%1023s %d %ld %d",
name, &bin, &
size, &fw);
1783 sscanf(str,
"%1023s %d %ld",
name, &bin, &
size);
1810 Info(
"HandleSocketInput",
"forwarding file: %s", fnam.
Data());
1811 if (
fProof->SendFile(fnam, opt, (copytocache ?
"cache" :
"")) < 0) {
1812 Error(
"HandleSocketInput",
"forwarding file: %s", fnam.
Data());
1826 (*mess) >> start >> end;
1828 Info(
"HandleSocketInput:kPROOF_LOGFILE",
1829 "Logfile request - byte range: %d - %d", start, end);
1860 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_CACHE",
"enter");
1873 Warning(
"HandleSocketInput:kPROOF_WORKERLISTS",
1874 "Action meaning-less on worker nodes: protocol error?");
1885 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
"Enter");
1890 if (
fProof->UseDynamicStartup()) {
1899 Error(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
1900 "adding a list of worker nodes returned: %d", ret);
1903 Error(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
1904 "getting list of worker nodes returned: %d", retVal);
1924 answ << (
TList *)info;
1930 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETSLAVEINFO",
"Done");
1941 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETTREEHEADER",
"Enter");
1948 Error(
"HandleSocketInput:kPROOF_GETTREEHEADER",
"could not create TProofPlayer instance!");
1951 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETTREEHEADER",
"Done");
1961 {
PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETOUTPUTLIST",
"Enter");
1962 TList* outputList = 0;
1964 outputList =
fProof->GetOutputList();
1966 outputList =
new TList();
1968 outputList =
new TList();
1969 if (
fProof->GetPlayer()) {
1970 TList *olist =
fProof->GetPlayer()->GetOutputList();
1973 while ( (o = next()) ) {
1983 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_GETOUTPUTLIST",
"Done");
1990 Info(
"HandleSocketInput:kPROOF_VALIDATE_DSET",
"Enter");
2003 Info(
"HandleSocketInput:kPROOF_VALIDATE_DSET",
"Done");
2013 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_DATA_READY",
"Enter");
2016 Long64_t totalbytes = 0, bytesready = 0;
2017 Bool_t dataready =
fProof->IsDataReady(totalbytes, bytesready);
2018 answ << dataready << totalbytes << bytesready;
2020 Error(
"HandleSocketInput:kPROOF_DATA_READY",
2021 "This message should not be sent to slaves");
2025 PDB(kGlobal, 1)
Info(
"HandleSocketInput:kPROOF_DATA_READY",
"Done");
2041 Error(
"HandleSocketInput",
"old client: no or incompatible dataset support");
2066 Info(
"HandleSocketInput:kPROOF_REALTIMELOG",
2067 "setting real-time logging %s", (
on ?
"ON" :
"OFF"));
2090 Error(
"HandleSocketInput",
"no queries enqueued");
2102 if (workerList && (ret =
fProof->AddWorkers(workerList)) < 0) {
2103 Error(
"HandleSocketInput",
"adding a list of worker nodes returned: %d", ret);
2116 Error(
"HandleSocketInput",
"error getting list of worker nodes");
2118 Warning(
"HandleSocketInput",
"query was re-queued!");
2120 Error(
"HandleSocketInput",
"unexpected answer: %d", retVal);
2141 " idle or undefined player - ignoring");
2167 smsg.
Form(
"Echo response from %s:%s: %s",
2177 if (!tf || (
gSystem->RedirectOutput(tmpfn.
Data()) == -1)) {
2178 Error(
"HandleSocketInput",
"Can't redirect output");
2193 smsg.
Form(
"*** Echo response from %s:%s ***\n",
2216 Error(
"HandleSocketInput",
"unknown command %d",
what);
2241 Int_t mergedWorkers = 0;
2243 PDB(kSubmerger, 1)
Info(
"AcceptResults",
"enter");
2251 Int_t numworkers = 0;
2252 while (
fMergingMonitor->GetActive() > 0 && mergedWorkers < connections) {
2256 Info(
"AcceptResults",
"interrupt!");
2264 if (sw && sw != (
TSocket *)(-1)) {
2268 Info(
"AcceptResults",
"connection from a worker accepted on merger %s ",
2271 if (++numworkers >= connections)
2275 Info(
"AcceptResults",
"spurious signal found of merging socket");
2278 if (s->
Recv(mess) < 0) {
2279 Error(
"AcceptResults",
"problems receiving message");
2283 Info(
"AcceptResults",
"message received: %d ", (mess ? mess->
What() : 0));
2285 Error(
"AcceptResults",
"message received: %p ", mess);
2294 PDB(kSubmerger, 2)
Info(
"AcceptResults",
" type %d ",
type);
2298 Info(
"AcceptResults",
2299 "a new worker has been mergerd. Total merged workers: %d",
2305 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"removing %p (has been merged)", o);
2308 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"%p not merged yet", o);
2318 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"closing socket");
2326 PDB(kSubmerger, 2)
Info(
"AcceptResults",
"exit: %d",
result);
2336 Int_t n, nch, wasted = 0;
2338 const Int_t kBufSize = 1024;
2339 char waste[kBufSize];
2345 Info(
"HandleUrgentData",
"handling oob...");
2348 while ((
n =
fSocket->RecvRaw(&oob_byte, 1,
kOob)) < 0) {
2366 if (nch > kBufSize) nch = kBufSize;
2369 Error(
"HandleUrgentData",
"error receiving waste");
2374 Error(
"HandleUrgentData",
"error receiving OOB");
2380 Info(
"HandleUrgentData",
"got OOB byte: %d\n", oob_byte);
2387 Info(
"HandleUrgentData",
"*** Hard Interrupt");
2404 Error(
"HandleUrgentData",
"error sending OOB");
2415 if (nch > kBufSize) nch = kBufSize;
2418 Error(
"HandleUrgentData",
"error receiving waste (2)");
2428 Info(
"HandleUrgentData",
"Soft Interrupt");
2435 Error(
"HandleUrgentData",
"soft interrupt flushed stream");
2446 Info(
"HandleUrgentData",
"Shutdown Interrupt");
2457 Error(
"HandleUrgentData",
"unexpected OOB byte");
2477 Info(
"HandleSigPipe",
"keepAlive probe failed");
2486 Info(
"HandleSigPipe",
"keepAlive probe failed");
2497 return fProof->IsParallel() ||
fProof->UseDynamicStartup() ;
2529 if ((freopen(logfile,
mode, stdout)) == 0)
2530 SysError(
"RedirectOutput",
"could not freopen stdout (%s)", logfile);
2532 if ((dup2(fileno(stdout), fileno(stderr))) < 0)
2533 SysError(
"RedirectOutput",
"could not redirect stderr");
2535 if ((
fLogFile = fopen(logfile,
"r")) == 0)
2536 SysError(
"RedirectOutput",
"could not open logfile '%s'", logfile);
2540 Warning(
"RedirectOutput",
"no way to tell master (or client) where"
2541 " to upload packages");
2556 dd.
Replace(0, ic,
"proofserv");
2580 if (
size <= 0)
return 0;
2583 Int_t fd = open(file, O_CREAT | O_TRUNC | O_WRONLY, 0600);
2585 SysError(
"ReceiveFile",
"error opening file %s", file);
2589 const Int_t kMAXBUF = 16384;
2590 char buf[kMAXBUF], cpy[kMAXBUF];
2595 while (filesize <
size) {
2608 Int_t k = 0,
i = 0, j = 0;
2615 cpy[j++] = buf[
i++];
2619 w = write(fd,
q,
r);
2621 w = write(fd, p,
r);
2625 SysError(
"ReceiveFile",
"error writing to file %s", file);
2633 Error(
"ReceiveFile",
"error during receiving file %s", file);
2641 if (chmod(file, 0644) != 0)
2642 Warning(
"ReceiveFile",
"error setting mode 0644 on file %s", file);
2681 off_t ltot=0, lnow=0;
2686 ltot = lseek(fileno(stdout), (off_t) 0, SEEK_END);
2689 if (ltot >= 0 && lnow >= 0) {
2692 if (end <= start || end > ltot)
2694 left = (
Int_t)(end - start);
2699 left = (
Int_t)(ltot - lnow);
2706 SysError(
"SendLogFile",
"error sending kPROOF_LOGFILE");
2710 const Int_t kMAXBUF = 32768;
2712 Int_t wanted = (left > kMAXBUF) ? kMAXBUF : left;
2720 SysError(
"SendLogFile",
"error reading log file");
2724 if (end == ltot &&
len == wanted)
2728 SysError(
"SendLogFile",
"error sending log file");
2734 wanted = (left > kMAXBUF) ? kMAXBUF : left;
2736 }
while (
len > 0 && left > 0);
2740 if (adhoc && lnow >=0 )
2745 mess << status << (
fProof ?
fProof->GetParallel() : 0);
2747 mess << status << (
Int_t) 1;
2749 if (
fSocket->Send(mess) < 0) {
2750 SysError(
"SendLogFile",
"error sending kPROOF_LOGDONE");
2754 PDB(kGlobal, 1)
Info(
"SendLogFile",
"kPROOF_LOGDONE sent");
2765 bytesread =
fProof->GetBytesRead();
2766 cputime =
fProof->GetCpuTime();
2771 mess << bytesread << realtime << cputime << workdir;
2782 Int_t nparallel = 0;
2785 Info(
"SendParallel",
"Will invoke AskParallel()");
2788 Info(
"SendParallel",
"Will invoke GetParallel()");
2789 nparallel =
fProof->GetParallel();
2795 mess << nparallel << async;
2808 snprintf(str, 512,
"**** Welcome to the PROOF server @ %s ****",
gSystem->HostName());
2810 snprintf(str, 512,
"**** PROOF slave server @ %s started ****",
gSystem->HostName());
2813 if (
fSocket->Send(str) != 1+
static_cast<Int_t>(strlen(str))) {
2814 Error(
"Setup",
"failed to send proof server startup message");
2822 Error(
"Setup",
"failed to receive remote proof protocol");
2826 Error(
"Setup",
"failed to send local proof protocol");
2834 Error(
"Setup",
"OldAuthSetup: failed to setup authentication");
2852 if ((
fSocket->Recv(mess) <= 0) || !mess) {
2853 Error(
"Setup",
"failed to receive ordinal and config info");
2882 if (tmpWorkDir !=
"")
2886 Info(
"Setup",
"invalid config file %s (missing or unreadable",
2910 Info(
"Setup",
"working directory set to %s",
fWorkDir.Data());
2932 Error(
"Setup",
"common setup failed");
2964 TString paths =
gEnv->GetValue(
"ProofServ.BinPaths",
"");
2965 if (paths.
Length() > 0) {
2969 else if (paths.
Contains(
"<compiler>"))
2976 compiler =
gSystem->GetDirName(compiler);
2978 if (!bindir.
IsNull()) bindir +=
":";
2980 }
else if (icomp == -1) {
2981 if (!path.
IsNull()) path +=
":";
2989 else if (paths.
Contains(
"<sysbin>"))
2993 if (!bindir.
IsNull()) bindir +=
":";
2994 bindir +=
"/bin:/usr/bin:/usr/local/bin";
2995 }
else if (isysb == -1) {
2996 if (!path.
IsNull()) path +=
":";
2997 path +=
"/bin:/usr/bin:/usr/local/bin";
3002 if (!bindir.
IsNull()) bindir +=
":";
3004 gSystem->Setenv(
"PATH", path);
3010 Error(
"SetupCommon",
"can not change to PROOF directory %s",
3019 Error(
"SetupCommon",
"can not change to PROOF directory %s",
3027 fGroup =
gEnv->GetValue(
"ProofServ.ProofGroup",
"default");
3036 Info(
"SetupCommon",
"cache directory set to %s",
fCacheDir.Data());
3045 TString packdir =
gEnv->GetValue(
"ProofServ.PackageDir",
3048 if (
gSystem->AccessPathName(packdir))
3054 const char *k = (
IsMaster()) ?
"Mst" :
"Wrk";
3058 Info(
"SetupCommon",
"package directory set to %s", packdir.
Data());
3073 Warning(
"SetupCommon",
"problems creating path '%s' (errno: %d)",
3077 Info(
"SetupCommon",
"data directory set to %s",
fDataDir.Data());
3080 TString dataDirOpts =
gEnv->GetValue(
"ProofServ.DataDirOpts",
"");
3081 if (!dataDirOpts.
IsNull()) {
3089 if (dataDirOpts.
Contains(
"g"))
m = 0775;
3092 Info(
"SetupCommon",
"requested mode for data directories is '%o'",
m);
3097 if (
fDataDir.BeginsWith(
"/")) p =
"/";
3098 while (
fDataDir.Tokenize(subp, from,
"/")) {
3099 if (subp.
IsNull())
continue;
3101 if (
gSystem->GetPathInfo(p, st) == 0) {
3104 Warning(
"SetupCommon",
"problems setting mode '%o' on path '%s' (errno: %d)",
3111 Warning(
"SetupCommon",
"problems stat-ing path '%s' (errno: %d; datadir: %s)",
3120 TString globpack =
gEnv->GetValue(
"Proof.GlobalPackageDirs",
"");
3124 Info(
"SetupCommon",
" %d global package directories registered", nglb);
3133 Error(
"SetupCommon",
"can not change to working directory '%s'",
3170 fImage =
gEnv->GetValue(
"ProofServ.Image",
"");
3182 TString dsms =
gEnv->GetValue(
"Proof.DataSetManager",
"");
3186 while (dsms.
Tokenize(dsm, from,
",")) {
3188 Warning(
"SetupCommon",
"a valid dataset manager already initialized");
3189 Warning(
"SetupCommon",
"support for multiple managers not yet available");
3193 if (
gROOT->GetPluginManager()) {
3195 h =
gROOT->GetPluginManager()->FindHandler(
"TDataSetManager", dsm);
3196 if (
h &&
h->LoadPlugin() != -1) {
3206 Warning(
"SetupCommon",
"dataset manager plug-in initialization failed");
3207 SendAsynMessage(
"TXProofServ::SetupCommon: dataset manager plug-in initialization failed");
3213 TString dsetdir =
gEnv->GetValue(
"ProofServ.DataSetDir",
"");
3223 h =
gROOT->GetPluginManager()->FindHandler(
"TDataSetManager",
"file");
3224 if (
h &&
h->LoadPlugin() == -1)
h = 0;
3233 Warning(
"SetupCommon",
"default dataset manager plug-in initialization failed");
3238 TString dsReqCfg =
gEnv->GetValue(
"Proof.DataSetStagingRequests",
"");
3239 if (!dsReqCfg.
IsNull()) {
3240 TPMERegexp reReqDir(
"(^| )(dir:)?([^ ]+)( |$)");
3242 if (reReqDir.
Match(dsReqCfg) == 5) {
3244 dsDirFmt.
Form(
"dir:%s perms:open", reReqDir[3].Data());
3250 "failed init of dataset staging requests repository");
3255 "specify, with [dir:]<path>, a valid path for staging requests");
3258 Warning(
"SetupCommon",
"no repository for staging requests available");
3267 quotas =
gEnv->GetValue(
"ProofServ.UserQuotas",
"");
3272 while (quotas.
Tokenize(tok, from,
" ")) {
3280 "parsing 'maxquerykept' :ignoring token %s : not a digit", tok.
Data());
3283 const char *ksz[2] = {
"hwmsz=",
"maxsz="};
3284 for (
Int_t j = 0; j < 2; j++) {
3291 const char *s[3] = {
"k",
"m",
"g"};
3307 TString ssz(ksz[j], strlen(ksz[j])-1);
3308 Info(
"SetupCommon",
"parsing '%s' : ignoring token %s", ssz.
Data(), tok.
Data());
3318 Warning(
"SetupCommon",
"problems applying fMaxQueries");
3324 TString rtag =
gEnv->GetValue(
"ProofServ.RootVersionTag",
"");
3338 if (!
name.IsNull()) {
3348 }
else if (!(
fUser.IsNull()) &&
fGroup.IsNull()) {
3350 }
else if (
fUser.IsNull() && !(
fGroup.IsNull())) {
3360 Info(
"SetupCommon",
"successfully completed");
3379 if (!
gSystem->GetProcInfo(&pi)){
3380 Info(
"Terminate",
"process memory footprint: %ld/%ld kB virtual, %ld/%ld kB resident ",
3387 gSystem->ChangeDirectory(
"/");
3397 gSystem->ChangeDirectory(
"/");
3414 Info(
"Terminate",
"data directory '%s' has been removed",
fDataDir.Data());
3421 while ((fh = next())) {
3424 gSystem->RemoveFileHandler(ih);
3439 if (!path || strlen(path) <= 0)
return kFALSE;
3442 void *dirp =
gSystem->OpenDirectory(path);
3445 const char *ent = 0;
3446 while (dorm && (ent =
gSystem->GetDirEntry(dirp))) {
3447 if (!strcmp(ent,
".") || !strcmp(ent,
".."))
continue;
3448 fpath.
Form(
"%s/%s", path, ent);
3464 if (dorm &&
gSystem->Unlink(path) != 0)
3465 Warning(
"UnlinkDataDir",
"data directory '%s' is empty but could not be removed", path);
3496 if (!oldAuthSetupHook) {
3498 TString authlib =
"libRootAuth";
3503 if (
gSystem->Load(authlib) == -1) {
3504 Error(
"OldAuthSetup",
"can't load %s",authlib.
Data());
3508 Error(
"OldAuthSetup",
"can't locate %s",authlib.
Data());
3513 Func_t f =
gSystem->DynFindSymbol(authlib,
"OldProofServAuthSetup");
3517 Error(
"OldAuthSetup",
"can't find OldProofServAuthSetup");
3533 TDSet *dset,
const char *selec,
3539 fQMgr->IncrementSeqNum();
3540 seqnum =
fQMgr->SeqNum();
3550 fst, dset, selec, elist);
3568 Int_t startlog = lseek(fileno(stdout), (off_t) 0, SEEK_END);
3572 Info(
"SetQueryRunning",
"starting query: %d", pq->
GetSeqNum());
3576 fPackMgr->GetEnabledPackages(parlist);
3600 Info(
"HandleArchive",
"Enter");
3604 (*mess) >> queryref >> path;
3606 if (slb) slb->
Form(
"%s %s", queryref.
Data(), path.
Data());
3609 if (queryref ==
"Default") {
3611 Info(
"HandleArchive",
3621 if (path.
Length() <= 0) {
3623 Info(
"HandleArchive",
3624 "archive paths are not defined - do nothing");
3628 path.
Form(
"%s/session-%s-%d.root",
3639 if (!pqr || qry < 0) {
3641 fout +=
"/query-result.root";
3647 TIter nxk(
f->GetListOfKeys());
3649 while ((k = (
TKey *)nxk())) {
3659 Info(
"HandleArchive",
3660 "file cannot be open (%s)",fout.
Data());
3667 PDB(kGlobal, 1)
Info(
"HandleArchive",
3668 "archive path for query #%d: %s",
3671 if (
gSystem->AccessPathName(path))
3675 if (!farc || !(farc->
IsOpen())) {
3676 Info(
"HandleArchive",
3677 "archive file cannot be open (%s)",path.
Data());
3691 if (qry > -1 &&
fQMgr)
3692 fQMgr->SaveQuery(pqr);
3695 Info(
"HandleArchive",
3696 "results of query %s archived to file %s",
3716 emsg.
Form(
"file collection undefined!");
3759 Info(
"HandleProcess",
"Enter");
3784 if ((!hasNoData) && elist)
3795 Error(
"HandleProcess",
"AssertDataSet: %s", emsg.
Data());
3800 }
else if (hasNoData) {
3802 TNamed *ftp =
dynamic_cast<TNamed *
>(
input->FindObject(
"PROOF_FilesToProcess"));
3810 emsg.
Form(
"dataset manager not initialized!");
3815 emsg.
Form(
"requested dataset '%s' does not exists", dsn.
Data());
3822 fcmap->
SetName(
"PROOF_FilesToProcess");
3830 Error(
"HandleProcess",
"%s", emsg.
Data());
3846 if (dset)
input->Add(dset);
3847 if (elist)
input->Add(elist);
3851 input->Clear(
"nodelete");
3856 Warning(
"HandleProcess",
"could not save input data: %s", emsg.
Data());
3861 if (
fQMgr->Queries())
fQMgr->Queries()->Add(pq);
3863 fQMgr->SaveQuery(pq);
3877 if (
fProof->UseDynamicStartup()) {
3882 Error(
"HandleProcess",
"error getting list of worker nodes");
3889 Info(
"HandleProcess",
"query %d enqueued", pq->
GetSeqNum());
3893 Error(
"HandleProcess",
"Adding a list of worker nodes returned: %d",
3903 Error(
"HandleProcess",
"error getting list of worker nodes");
3910 Info(
"HandleProcess",
"query %d enqueued", pq->
GetSeqNum());
3912 Error(
"HandleProcess",
"unknown return value: %d", retVal);
3923 if (!sync || enqueued) {
3931 Info(
"HandleProcess",
3946 if (
fProof->UseDynamicStartup())
3998 Warning(
"HandleProcess",
"could not get input data: %s", emsg.
Data());
4002 Warning(
"HandleProcess",
"could not get query sequential number!");
4006 while ((nord =
input->FindObject(
"PROOF_Ordinal")))
4007 input->Remove(nord);
4013 while ((o = next())) {
4014 PDB(kGlobal, 2)
Info(
"HandleProcess",
"adding: %s", o->
GetName());
4022 while ((obj = nxt())){
4026 Info(
"HandleProcess",
"selector obj for '%s' found", selector_obj->
ClassName());
4039 PDB(kGlobal, 1)
Info(
"HandleProcess",
"calling %s::Process()",
fPlayer->IsA()->GetName());
4042 Info(
"HandleProcess",
"calling fPlayer->Process() with selector object: %s", selector_obj->
ClassName());
4046 Info(
"HandleProcess",
"calling fPlayer->Process() with selector name: %s",
filename.Data());
4058 m << status << abort;
4060 slb->
Form(
"%d %lld %lld",
fPlayer->GetExitStatus(),
4064 m <<
fPlayer->GetEventsProcessed() << abort;
4071 Info(
"TProofServ::Handleprocess",
4072 "worker %s has finished processing with %d objects in output list",
4092 if (!isSubMerging) {
4093 cso =
gEnv->GetValue(
"Proof.ControlSendOutput", 1);
4095 cso =
gEnv->GetValue(
"Proof.ControlSendOutput", 1);
4112 Info(
"HandleProcess",
"controlled mode: worker %s has finished,"
4113 " sizes sent to master",
fOrdinal.Data());
4119 Info(
"HandleProcess",
"submerging disabled because of high-memory case");
4122 PDB(kGlobal, 2)
Info(
"HandleProcess",
"merging mode check: %d", isSubMerging);
4135 msg_osize <<
fPlayer->GetOutputList()->GetEntries();
4138 Int_t merge_port = 0;
4141 Info(
"HandleProcess",
"possible port for merging connections: %d",
4145 msg_osize << merge_port;
4154 PDB(kSubmerger, 2)
Info(
"HandleProcess",
"worker %s has finished",
fOrdinal.Data());
4159 PDB(kGlobal, 2)
Info(
"HandleProcess",
"sending result directly to master");
4161 Warning(
"HandleProcess",
"problems sending output list");
4183 Warning(
"HandleProcess",
"the output list is empty!");
4185 Warning(
"HandleProcess",
"problems sending output list");
4202 while ((obj = nex())) {
4207 fPlayer->GetInputList()->SetOwner(0);
4210 TList *added =
dynamic_cast<TList *
>(
input->FindObject(
"PROOF_InputObjsFromFile"));
4218 while ((o = nxo())) {
input->Remove(o); }
4219 input->Remove(added);
4235 PDB(kGlobal, 1)
Info(
"HandleProcess",
"done");
4246 PDB(kOutput, 2)
Info(
"SendResults",
"enter");
4257 msg.
Form(
"%s: merging output objects ... done ",
4261 msg.
Form(
"%s: objects merged; sending output: %d objs",
fPrefix.Data(), olsz);
4266 if (sock->
Send(mbuf) < 0)
return -1;
4272 Int_t totsz = 0, objsz = 0;
4274 while ((o = nxo())) {
4278 "message has %d bytes: limit of %lld bytes reached - sending ...",
4291 msg.
Form(
"%s: objects merged; sending obj %d/%d (%d bytes) ",
4292 fPrefix.Data(), ns, olsz, objsz);
4295 if (sock->
Send(mbuf) < 0)
return -1;
4302 mbuf << (
Int_t) ((ns >= olsz) ? 2 : 1);
4317 msg.
Form(
"%s: objects merged; sending obj %d/%d (%d bytes) ",
4318 fPrefix.Data(), ns, olsz, objsz);
4321 if (sock->
Send(mbuf) < 0)
return -1;
4325 msg.
Form(
"%s: grand total: sent %d objects, size: %d bytes ",
4337 msg.
Form(
"%s: merging output objects ... done ",
4341 msg.
Form(
"%s: objects merged; sending output: %d objs",
fPrefix.Data(), olsz);
4346 if (sock->
Send(mbuf) < 0)
return -1;
4350 Int_t totsz = 0, objsz = 0;
4353 while ((o = nxo())) {
4370 msg.
Form(
"%s: objects merged; sending obj %d/%d (%d bytes) ",
4371 fPrefix.Data(), ns, olsz, objsz);
4374 if (sock->
Send(mbuf) < 0)
return -1;
4379 msg.
Form(
"%s: grand total: sent %d objects, size: %d bytes ",
4393 msg.
Form(
"%s: sending output: %d objs, %d bytes",
fPrefix.Data(), olsz, blen);
4395 if (sock->
Send(mbuf) < 0)
return -1;
4399 PDB(kGlobal, 2)
Info(
"SendResults",
"sending output list");
4401 PDB(kGlobal, 2)
Info(
"SendResults",
"notifying failure or abort");
4406 PDB(kOutput,2)
Info(
"SendResults",
"done");
4458 Error(
"ProcessNext",
"no TDset object: cannot continue");
4480 while ((obj = nxt())){
4484 Info(
"ProcessNext",
"found object for selector '%s'", obj->
ClassName());
4491 Error(
"ProcessNext",
"empty waiting queries list!");
4501 fQMgr->SaveQuery(pq);
4503 fQMgr->IncrementDrawQueries();
4537 if (
gEnv->Lookup(
"Proof.UseMergers") && !
input->FindObject(
"PROOF_UseMergers")) {
4538 Int_t smg =
gEnv->GetValue(
"Proof.UseMergers",-1);
4541 PDB(kSubmerger, 2)
Info(
"ProcessNext",
"PROOF_UseMergers set to %d", smg);
4542 if (
gEnv->Lookup(
"Proof.MergersByHost")) {
4543 Int_t mbh =
gEnv->GetValue(
"Proof.MergersByHost", 0);
4547 if ((o =
input->FindObject(
"PROOF_MergersByHost"))) {
input->Remove(o);
delete o; }
4549 PDB(kSubmerger, 2)
Info(
"ProcessNext",
"submergers setup by host/node");
4558 while ((o = next())) {
4564 if ((o =
input->FindObject(
"MissingFiles")))
input->Remove(o);
4567 PDB(kGlobal, 1)
Info(
"ProcessNext",
"calling %s::Process()",
fPlayer->IsA()->GetName());
4569 Info(
"ProcessNext",
"calling fPlayer->Process() with selector object: %s", selector_obj->
ClassName());
4573 Info(
"ProcessNext",
"calling fPlayer->Process() with selector name: %s",
filename.Data());
4588 m << status << abort;
4591 m <<
fPlayer->GetEventsProcessed() << abort;
4593 m <<
fPlayer->GetEventsProcessed();
4600 TNamed *psr = (
TNamed *)
fPlayer->GetOutputList()->FindObject(
"PROOFSERV_RegisterDataSet");
4604 Warning(
"ProcessNext",
"problems registering produced datasets: %s", emsg.
Data());
4606 fPlayer->GetOutputList()->Remove(psr);
4608 }
while ((psr = (
TNamed *)
fPlayer->GetOutputList()->FindObject(
"PROOFSERV_RegisterDataSet")));
4614 if (!abort)
fProof->AskStatistics();
4625 while ((xo = nxo())) {
4647 Info(
"ProcessNext",
"adding info about dataset '%s' in the light query result", dset->
GetName());
4654 Info(
"ProcessNext",
"sending results");
4657 Warning(
"ProcessNext",
"problems sending output list");
4662 Warning(
"ProcessNext",
"the output list is empty!");
4664 Warning(
"ProcessNext",
"problems sending output list");
4674 if (!(pq->
IsDraw()) && pqr) {
4676 fQMgr->Queries()->Add(pqr);
4678 fQMgr->Queries()->Remove(pq);
4691 fProof->RemoveWorkers(0);
4701 ::
Info(
"TProofServ::RegisterDataSets",
4702 "enter: %d objs in the output list", (out ? out->GetSize() : -1));
4704 if (!in || !out || !dsm) {
4705 ::Error(
"TProofServ::RegisterDataSets",
"invalid inputs: %p, %p, %p", in, out, dsm);
4713 while ((o = nxo())) {
4722 if (!(fcn = (
TNamed *) out->FindObject(tag)))
continue;
4731 if (regopt.
Contains(
":sortidx:")) {
4740 const char *vfmsg = regopt.
Contains(
"V") ?
" and verifying" :
"";
4741 msg.
Form(
"Registering%s dataset '%s' ... ", vfmsg, ds->
GetName());
4750 ::Warning(
"TProofServ::RegisterDataSets",
4751 "failure registering or verifying dataset '%s'", ds->
GetName());
4752 msg.
Form(
"Registering%s dataset '%s' ... failed! See log for more details", vfmsg, ds->
GetName());
4754 ::Info(
"TProofServ::RegisterDataSets",
"dataset '%s' successfully registered%s",
4755 ds->
GetName(), (strlen(vfmsg) > 0) ?
" and verified" :
"");
4756 msg.
Form(
"Registering%s dataset '%s' ... OK", vfmsg, ds->
GetName());
4763 ::Info(
"TProofServ::RegisterDataSets",
"printing collection");
4767 ::Warning(
"TProofServ::RegisterDataSets",
"collection '%s' is empty", o->
GetName());
4770 ::Info(
"TProofServ::RegisterDataSets",
"dataset registration not allowed");
4777 while ((o = nxrm())) out->Remove(o);
4781 while((o = nxtg())) {
4783 while ((oo = out->FindObject(o->
GetName()))) { out->Remove(oo); }
4787 PDB(kDataset, 1) ::
Info(
"TProofServ::RegisterDataSets",
"exit");
4798 Info(
"HandleQueryList",
"Enter");
4804 Int_t ntot = 0, npre = 0, ndraw= 0;
4812 fQMgr->ScanPreviousQueries(qdir);
4814 if (
fQMgr->PreviousQueries()) {
4826 if (
fQMgr->Queries()) {
4837 Warning(
"HandleQueryList",
"unable to clone TProofQueryResult '%s:%s'",
4843 ndraw =
fQMgr->DrawQueries();
4847 m << npre << ndraw << ql;
4861 Info(
"HandleRemove",
"Enter");
4864 (*mess) >> queryref;
4866 if (slb) *slb = queryref;
4868 if (queryref ==
"cleanupqueue") {
4872 Info(
"HandleRemove",
"%d queries removed from the waiting list", pend);
4877 if (queryref ==
"cleanupdir") {
4883 Info(
"HandleRemove",
"%d directories removed", nd);
4891 if (
fQMgr->LockSession(queryref, &lck) == 0) {
4895 fQMgr->RemoveQuery(queryref, &qtorm);
4908 Warning(
"HandleRemove",
"query result manager undefined!");
4912 Info(
"HandleRemove",
4913 "query %s could not be removed (unable to lock session)", queryref.
Data());
4925 Info(
"HandleRetrieve",
"Enter");
4928 (*mess) >> queryref;
4930 if (slb) *slb = queryref;
4935 if (
fQMgr)
fQMgr->LocateQuery(queryref, qry, qdir);
4938 fout +=
"/query-result.root";
4944 TIter nxk(
f->GetListOfKeys());
4946 while ((k = (
TKey *)nxk())) {
4955 if ((
d =
dynamic_cast<TDSet *
>(o)))
4964 static const char *clb[4] = {
"bytes",
"KB",
"MB",
"GB" };
4965 while (qsz > 1000. && ilb < 3) {
4974 Info(
"HandleRetrieve",
4975 "query not found in file %s",fout.
Data());
4985 Info(
"HandleRetrieve",
4986 "file cannot be open (%s)",fout.
Data());
5005 (*mess) >>
type >> add >> path;
5009 if ((
type !=
"lib") && (
type !=
"inc")) {
5010 Error(
"HandleLibIncPath",
"unknown action type: %s",
type.Data());
5019 if (path.
Length() > 0 && path !=
"-") {
5021 Error(
"HandleLibIncPath",
"decomposing path %s", path.
Data());
5028 if (
type ==
"lib") {
5036 gSystem->ExpandPathName(xlib);
5046 gSystem->SetDynamicPath(newlibpath);
5049 Info(
"HandleLibIncPath",
5050 "libpath %s does not exist or cannot be read - not added", xlib.
Data());
5056 fProof->AddDynamicPath(path);
5066 gSystem->ExpandPathName(xinc);
5073 Info(
"HandleLibIncPath",
5074 "incpath %s does not exist or cannot be read - not added", xinc.
Data());
5079 fProof->AddIncludePath(path);
5085 if (
type ==
"lib") {
5093 gSystem->ExpandPathName(xlib);
5097 gSystem->SetDynamicPath(newlibpath);
5102 fProof->RemoveDynamicPath(path);
5114 gSystem->SetIncludePath(newincpath);
5119 fProof->RemoveIncludePath(path);
5138 (*mess) >> filenam >> md5;
5142 if (slb) *slb = filenam;
5154 if (md5local && md5 == (*md5local)) {
5156 if ((st =
fPackMgr->Clean(packnam)))
5157 Error(
"HandleCheckFile",
"failure cleaning %s", packnam.
Data());
5160 st =
fPackMgr->Unpack(packnam, md5local);
5165 Info(
"HandleCheckFile",
5166 "package %s installed on node", filenam.
Data());
5169 Error(
"HandleCheckFile",
"gunzip not found");
5171 Error(
"HandleCheckFile",
"package %s did not unpack into %s",
5183 Error(
"HandleCheckFile",
5184 "package %s not yet on node", filenam.
Data());
5199 fPackMgr->GetParPath(filenam, parpath);
5200 if (
fProof->UploadPackage(parpath,
5202 Info(
"HandleCheckFile",
5203 "problems uploading package %s", parpath.
Data());
5215 parname =
gSystem->BaseName(filenam);
5216 if (
fPackMgr->Install(filenam) < 0) {
5218 "problems installing package %s", filenam.
Data());
5226 if (md5local && md5 == (*md5local)) {
5230 Info(
"HandleCheckFile",
5231 "package %s already on node", parname.
Data());
5236 xrc =
fPackMgr->GetParPath(filenam, par);
5239 if (
fProof->UploadPackage(par) != 0)
5241 "problems uploading package %s", par.
Data());
5249 Info(
"HandleCheckFile",
5250 "package %s not yet on node", filenam.
Data());
5261 if (md5local && md5 == (*md5local)) {
5264 Info(
"HandleCheckFile",
"file %s already on node", filenam.Data());
5269 Info(
"HandleCheckFile",
"file %s not yet on node", filenam.Data());
5283 Info(
"HandleCache",
"Enter");
5295 const char *k = (
IsMaster()) ?
"Mst" :
"Wrk";
5299 TString packagedir, package, pdir, ocwd, file;
5304 printf(
"*** File cache %s:%s ***\n",
gSystem->HostName(),
5315 if (slb) slb->
Form(
"%d %d",
type, all);
5321 if (file.IsNull() || file ==
"*") {
5328 fProof->ClearCache(file);
5329 if (slb) slb->
Form(
"%d %s",
type, file.Data());
5335 fProof->ShowPackages(all);
5337 if (slb) slb->
Form(
"%d %d",
type, all);
5340 if ((status =
fPackMgr->Unload(0)) == 0) {
5343 status =
fProof->ClearPackages();
5345 if (slb) slb->
Form(
"%d %d",
type, status);
5349 if ((status =
fPackMgr->Unload(package)) == 0) {
5352 status =
fProof->ClearPackage(package);
5354 if (slb) slb->
Form(
"%d %s %d",
type, package.Data(), status);
5363 noth.
Data(), package.Data()));
5374 if (xrc != 0 ||
fProof->UploadPackage(par) != 0) {
5376 "kBuildPackage: problems forwarding package %s to workers", package.Data());
5378 noth.
Data(), package.Data()));
5386 "kBuildPackage: package %s exists and has PROOF-INF directory", package.Data());
5393 status = packmgr->
Build(package.Data(), chkveropt);
5404 Info(
"HandleCache",
"package %s successfully built", package.Data());
5406 if (slb) slb->
Form(
"%d %s %d %d",
type, package.Data(), status, chkveropt);
5415 if ((status =
fPackMgr->Load(package.Data(), optls)) < 0) {
5419 noth.
Data(), package.Data(), optls,
5420 (optls && optls->GetSize() > 0) ? optls->GetSize() : 0));
5425 if (optls && optls->GetSize() > 0) {
5430 status =
fProof->LoadPackage(package);
5435 Info(
"HandleCache",
"package %s successfully loaded", package.Data());
5438 if (slb) slb->
Form(
"%d %s %d",
type, package.Data(), status);
5443 {
TString title(
"*** Enabled packages ***");
5445 title.
Form(
"*** Enabled packages on %s %s on %s",
5446 (
IsMaster()) ?
"master" :
"worker",
5452 fProof->ShowEnabledPackages(all);
5454 if (slb) slb->
Form(
"%d %d",
type, all);
5461 if (slb) slb->
Form(
"%d %d",
type, all);
5467 fProof->ClearCache(file);
5468 if (slb) slb->
Form(
"%d %s",
type, file.Data());
5473 fProof->ShowPackages(all);
5475 if (slb) slb->
Form(
"%d %d",
type, all);
5479 fProof->DisablePackages();
5485 fProof->DisablePackage(package);
5486 if (slb) slb->
Form(
"%d %s",
type, package.Data());
5493 if (slb) slb->
Form(
"%d %s %d",
type, package.Data(), chkveropt);
5497 status =
fPackMgr->Unload(package);
5499 status =
fProof->UnloadPackage(package);
5500 if (slb) slb->
Form(
"%d %s %d",
type, package.Data(), status);
5506 fProof->DisablePackage(package);
5507 if (slb) slb->
Form(
"%d %s",
type, package.Data());
5512 status =
fProof->UnloadPackages();
5513 if (slb) slb->
Form(
"%d %s %d",
type, package.Data(), status);
5518 fProof->DisablePackages();
5519 if (slb) slb->
Form(
"%d %s",
type, package.Data());
5535 msg <<
type << pack;
5561 Info(
"HandleCache",
"loading macro %s ...", pack.
Data());
5576 if (slb) slb->
Form(
"%d %s",
type, package.Data());
5580 Error(
"HandleCache",
"unknown type %d",
type);
5594 Info(
"HandleWorkerLists",
"Enter");
5604 if (ord !=
"*" && !ord.BeginsWith(
GetOrdinal()) && ord !=
"restore")
break;
5606 Int_t nact =
fProof->GetListOfActiveSlaves()->GetSize();
5607 Int_t nactmax =
fProof->GetListOfSlaves()->GetSize() -
5608 fProof->GetListOfBadSlaves()->GetSize();
5611 Int_t nactnew =
fProof->GetListOfActiveSlaves()->GetSize();
5613 if (nactnew == nactmax) {
5614 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers (re-)activated");
5617 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"%d workers could not be (re-)activated", nactmax - nactnew);
5619 }
else if (ord ==
"restore") {
5621 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"active worker(s) restored");
5623 Error(
"HandleWorkerList",
"some active worker(s) could not be restored; check logs");
5626 if (nactnew == (nact + nwc)) {
5628 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"worker(s) %s (re-)activated", ord.Data());
5631 Error(
"HandleWorkerList",
"some worker(s) could not be (re-)activated;"
5632 " # of actives: %d --> %d (nwc: %d)",
5633 nact, nactnew, nwc);
5635 rc = (nwc < 0) ? nwc : -1;
5639 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers are already active");
5642 Warning(
"HandleWorkerList",
"undefined PROOF session: protocol error?");
5647 if (ord !=
"*" && !ord.BeginsWith(
GetOrdinal()) && ord !=
"restore")
break;
5649 Int_t nact =
fProof->GetListOfActiveSlaves()->GetSize();
5652 Int_t nactnew =
fProof->GetListOfActiveSlaves()->GetSize();
5655 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers deactivated");
5658 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"%d workers could not be deactivated", nactnew);
5661 if (nactnew == (nact - nwc)) {
5663 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"worker(s) %s deactivated", ord.Data());
5666 Error(
"HandleWorkerList",
"some worker(s) could not be deactivated:"
5667 " # of actives: %d --> %d (nwc: %d)",
5668 nact, nactnew, nwc);
5670 rc = (nwc < 0) ? nwc : -1;
5674 PDB(kGlobal, 1)
Info(
"HandleWorkerList",
"all workers are already inactive");
5677 Warning(
"HandleWorkerList",
"undefined PROOF session: protocol error?");
5681 Warning(
"HandleWorkerList",
"unknown action type (%d)",
type);
5701 Info(
"GetWorkers",
"using PROOF config file: %s",
fConfFile.Data());
5708 "no appropriate master line found in %s",
fConfFile.Data());
5761 TString lvl =
gEnv->GetValue(
"Root.ErrorIgnoreLevel",
"Print");
5788 const char *
type = 0;
5791 Int_t ipos = (location) ? strlen(location) : 0;
5797 if (level >=
kInfo) {
5799 char *ps = location ? (
char *) strrchr(location,
'|') : (
char *)0;
5801 ipos = (
int)(ps - (
char *)location);
5817 type =
"*** Break ***";
5835 if (!location || ipos == 0 ||
5848 type, ipos, location, msg);
5855 gSystem->Syslog(loglevel, buf);
5858 if (__crashreporter_info__)
5859 delete [] __crashreporter_info__;
5860 __crashreporter_info__ =
StrDup(buf);
5892 p =
fProof->MakePlayer();
5912 Printf(
" +++ Latest processing times: %f s (CPU: %f s)",
5941 TString sqlserv =
gEnv->GetValue(
"ProofServ.QueryLogDB",
"");
5942 TString sqluser =
gEnv->GetValue(
"ProofServ.QueryLogUser",
"");
5943 TString sqlpass =
gEnv->GetValue(
"ProofServ.QueryLogPasswd",
"");
5945 Int_t priority = 100;
5951 sql.
Form(
"SELECT priority WHERE group='%s' FROM proofpriority",
fGroup.Data());
5957 Error(
"GetPriority",
"failed to connect to SQL server %s as %s %s",
5959 printf(
"%s\n", sql.
Data());
5964 Error(
"GetPriority",
"query into proofpriority failed");
5972 Error(
"GetPriority",
"first row is header is NULL");
5996 Info(
"SendAsynMessage",
"%s", (msg ? msg :
"(null)"));
6002 Warning(
"SendAsynMessage",
"could not send message '%s'", msg);
6015 off_t lend = lseek(fileno(stdout), (off_t)0, SEEK_END);
6016 if (lend >= 0) lseek(
fLogFileDes, lend, SEEK_SET);
6033 if (truncsz < 100) {
6034 emsg.
Form(
"+++ WARNING +++: %s: requested truncate size too small"
6040 while (ftruncate(fileno(stdout), truncsz) != 0 &&
6045 Error(
"TruncateLogFile",
"truncating to %lld bytes; file size is %lld bytes (errno: %d)",
6047 emsg.
Form(
"+++ WARNING +++: %s: problems truncating log file to %lld bytes; file size is %lld bytes"
6051 Info(
"TruncateLogFile",
"file truncated to %lld bytes (80%% of %lld); file size was %lld bytes ",
6053 emsg.
Form(
"+++ WARNING +++: %s: log file truncated to %lld bytes (80%% of %lld)",
6059 emsg.
Form(
"+++ WARNING +++: %s: could not stat log file descriptor"
6072 Error(
"HandleException",
"caugth exception triggered by signal '%d' %s %lld",
6076 emsg.
Form(
"%s: caught exception triggered by signal '%d' %s %lld",
6090 Info(
"HandleDataSets",
"enter");
6094 Warning(
"HandleDataSets",
"no data manager is available to fullfil the request");
6099 TString dsUser, dsGroup, dsName, dsTree, uri, opt;
6115 if (slb) slb->
Form(
"%d %s",
type, uri.Data());
6127 if (slb) slb->
Form(
"%d %s %s",
type, uri.Data(), opt.Data());
6131 if (!dataSet || dataSet->GetList()->GetSize() == 0) {
6132 Error(
"HandleDataSets",
"can not save an empty list.");
6140 Info(
"HandleDataSets",
"dataset registration not allowed");
6141 if (slb) slb->
Form(
"%d notallowed",
type);
6152 Error(
"HandleDataSets",
6153 "no dataset staging request repository available");
6159 while (reInvalid.
Substitute(validUri,
"_")) {}
6164 Warning(
"HandleDataSets",
"staging of %s already requested",
6172 Error(
"HandleDataSets",
"empty dataset or no dataset returned");
6194 Error(
"HandleDataSets",
6195 "can't register staging request for %s", uri.Data());
6200 Info(
"HandleDataSets",
6201 "Staging request registered for %s", uri.Data());
6211 Error(
"HandleDataSets",
6212 "no dataset staging request repository available");
6230 Info(
"HandleDataSets",
"no pending staging request for %s",
6240 Error(
"HandleDataSets",
6241 "no dataset staging request repository available");
6259 (*mess) >> uri >> opt;
6260 if (slb) slb->
Form(
"%d %s %s",
type, uri.
Data(), opt.Data());
6268 (*mess) >> uri >> opt;
6269 if (slb) slb->
Form(
"%d %s %s",
type, uri.
Data(), opt.Data());
6273 if (kLite !=
kNPOS) {
6275 opt.Remove(kLite, strlen(
":lite:"));
6279 if (returnMap && !opt.IsNull()) {
6284 TIter nxd(returnMap);
6295 Info(
"HandleDataSets",
"no dataset found on server '%s'", opt.Data());
6312 (*mess) >> uri >> opt;
6313 if (slb) slb->
Form(
"%d %s %s",
type, uri.
Data(), opt.Data());
6329 if (slb) slb->
Form(
"%d %s",
type, uri.Data());
6335 Info(
"HandleDataSets",
"dataset creation / removal not allowed");
6336 if (slb) slb->
Form(
"%d notallowed",
type);
6344 (*mess) >> uri >> opt;
6345 if (slb) slb->
Form(
"%d %s %s",
type, uri.
Data(), opt.Data());
6355 Info(
"HandleDataSets",
"dataset verification not allowed");
6365 if (groupQuotaMap) {
6372 Info(
"HandleDataSets",
"quota control disabled");
6373 if (slb) slb->
Form(
"%d disabled",
type);
6386 Info(
"HandleDataSets",
"quota control disabled");
6387 if (slb) slb->
Form(
"%d disabled",
type);
6395 if (slb) slb->
Form(
"%d %s",
type, uri.Data());
6398 Info(
"HandleDataSets",
"kSetDefaultTreeName: modification of dataset info not allowed");
6399 if (slb) slb->
Form(
"%d notallowed",
type);
6406 (*mess) >> uri >> opt;
6407 if (slb) slb->
Form(
"%d %s %s",
type, uri.
Data(), opt.Data());
6408 if (opt ==
"show") {
6411 }
else if (opt ==
"clear") {
6415 Error(
"HandleDataSets",
"kCache: unknown action: %s", opt.Data());
6421 Error(
"HandleDataSets",
"unknown type %d",
type);
6448 Info(
"HandleSubmerger",
"kSendOutput: interrupting ...");
6459 Int_t merger_id = -1;
6460 (*mess) >> merger_id >>
name >> port;
6462 Info(
"HandleSubmerger",
"worker %s redirected to merger #%d %s:%d",
fOrdinal.Data(), merger_id,
name.Data(), port);
6467 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6468 "kSendOutput: worker asked for sending output to merger #%d %s:%d",
6469 merger_id,
name.Data(), port);
6472 msg.
Form(
"worker %s cannot send results to merger #%d at %s:%d",
GetPrefix(), merger_id,
name.Data(), port);
6473 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6474 "kSendOutput: %s - inform the master", msg.
Data());
6488 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kSendOutput: worker sent its output");
6495 if (
name ==
"master") {
6496 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6497 "kSendOutput: worker was asked for sending output to master");
6499 Warning(
"HandleSubmerger",
"problems sending output list");
6505 }
else if (!t || !(t->
IsValid())) {
6506 msg.
Form(
"worker %s could not open a valid socket to merger #%d at %s:%d",
6508 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6509 "kSendOutput: %s - inform the master", msg.
Data());
6524 Error(
"HandleSubmerger",
"kSendOutput: received not on worker");
6535 Int_t merger_id = -1;
6537 Int_t connections = 0;
6538 (*mess) >> merger_id >> connections;
6540 Info(
"HandleSubmerger",
"worker %s established as merger",
fOrdinal.Data());
6543 Info(
"HandleSubmerger",
6544 "kBeMerger: worker asked for being merger #%d for %d connections",
6545 merger_id, connections);
6550 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
6551 "kBeMerger: mergerPlayer created (%p) ", mergerPlayer);
6559 Info(
"HandleSubmerger",
"kBeMerger: all outputs from workers accepted");
6562 Info(
"",
"adding own output to the list on %s",
fOrdinal.Data());
6571 while ((o = nxo())) {
6575 if (
fPlayer->GetOutputList()) {
6577 Info(
"HandleSocketInput",
"removing merged object (%p)", o);
6578 fPlayer->GetOutputList()->Remove(o);
6582 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kBeMerger: own outputs added");
6583 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"starting delayed merging on %s",
fOrdinal.Data());
6590 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"delayed merging on %s finished ",
fOrdinal.Data());
6591 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"%s sending results to master ",
fOrdinal.Data());
6594 Warning(
"HandleSubmerger",
"kBeMerger: problems sending output list");
6598 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kBeMerger: results sent to master");
6615 Warning(
"HandleSubmerger",
"kBeMerger: problems craeting the merger player!");
6624 Error(
"HandleSubmerger",
"kSendOutput: received not on worker");
6638 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kStopMerging");
6640 Info(
"HandleSubmerger",
"kStopMerging: interrupting ...");
6656 Info(
"HandleFork",
"fork cloning not implemented");
6670 if ((pid = fork()) < 0) {
6671 Error(
"Fork",
"failed to fork");
6676 if (!pid)
return pid;
6690 Warning(
"Fork",
"Functionality not provided under windows");
6743 ::Warning(
"TProofServ::ResolveKeywords",
"session tag undefined: ignoring");
6751 ::Warning(
"TProofServ::ResolveKeywords",
"ordinal number undefined: ignoring");
6758 ::Warning(
"TProofServ::ResolveKeywords",
"query seqeuntial number undefined: ignoring");
6761 if (fname.
Contains(
"<file>") && path && strlen(path) > 0) {
6772 gSystem->GetBuildCompilerVersion());
6788 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6804 fprintf(
fs,
"%d", st);
6807 Info(
"UpdateSessionStatus",
"status (=%d) update in path: %s", st,
fAdminPath.Data());
6820 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6829 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6838 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6848 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6858 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6869 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6882 std::lock_guard<std::recursive_mutex> lock(
fQMtx);
6887 while ((o = nxq())) {
6952 if (
gSystem->Getenv(
"LOCALDATASERVER")) {
6953 dsrv =
gSystem->Getenv(
"LOCALDATASERVER");
6954 if (!dsrv.
EndsWith(
"/")) dsrv +=
"/";
6971 TString pfx =
gEnv->GetValue(
"Path.Localroot",
"");
6974 if (srvp ==
"root" || srvp ==
"xrd") path.
Remove(0, pfx.
Length());
6988 const char *pname =
GetName();
6990 if (
gSystem->AccessPathName(pname))
6991 fLockId = open(pname, O_CREAT|O_RDWR, 0644);
6993 fLockId = open(pname, O_RDWR);
6996 SysError(
"Lock",
"cannot open lock file %s", pname);
7001 Info(
"Lock",
"%d: locking file %s ...",
gSystem->GetPid(), pname);
7003#if !defined(R__WIN32) && !defined(R__WINGCC)
7004 if (lockf(
fLockId, F_LOCK, (off_t) 1) == -1) {
7005 SysError(
"Lock",
"error locking %s", pname);
7013 Info(
"Lock",
"%d: file %s locked",
gSystem->GetPid(), pname);
7031#if !defined(R__WIN32) && !defined(R__WINGCC)
7032 if (lockf(
fLockId, F_ULOCK, (off_t)1) == -1) {
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
if(isa< VarDecl >(D)||isa< FieldDecl >(D)||isa< EnumConstantDecl >(D))
const Bool_t kIterBackward
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
externInt_t gErrorAbortLevel
constexpr Int_t kSysError
externInt_t gErrorIgnoreLevel
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.
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 w
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 "....
TApplication(const TApplication &)=delete
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 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 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.
TClass * IsA() const override
void SetWriteV3(Bool_t on=kTRUE)
Set/Reset the 'OldStreamer' bit in this instance and its elements.
TList * GetListOfElements() const
const char * GetObjName() const
virtual Int_t RegisterDataSet(const char *uri, TFileCollection *dataSet, const char *opt)
Register a dataset, perfoming quota checkings, if needed.
Bool_t cd() override
Change current directory to "this" directory.
A List of entry numbers in a TTree or TChain.
<div class="legacybox"><h2>Legacy Code</h2> TEventList is a legacy interface: there will be no bug fi...
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 file, usually with extension .root, that stores data and code in the form of serialized objects in ...
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() override
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.
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 * 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
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.
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.
TObject()
TObject constructor.
@ 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.
const char * GetTitle() const override
Returns title of object.
Int_t Build(const char *pack, Int_t opt=TPackMgr::kCheckROOT)
Method to build a package.
Int_t GetParPath(const char *pack, TString &path)
Method to get the path of the PAR file for package 'pack'.
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 ...
static TPackMgr * GetPackMgr(const char *pack, TPackMgr *packmgr=nullptr)
Get the package manager having 'pack'; priority is given to packmgr, if defined.
Class used by TMap to store (key,value) pairs.
Named parameter, streamable and storable.
const AParamType & GetVal() const
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.
Long64_t GetEntries() const
void Print(Option_t *option="") const override
Dump the content.
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.
TProofNodeInfo * GetMaster() override
Get the master node.
TString GetFileName() const
TList * GetWorkers() override
Get the list of worker nodes.
TList * GetSubmasters() override
Get the list of submaster nodes.
virtual Bool_t IsValid() const
Bool_t Notify() override
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.
TProofServLogHandler(const char *cmd, TSocket *s, const char *pfx="")
Execute 'cmd' in a pipe and handle output messages from the related file.
Bool_t Notify() override
Handle available message in the open file.
~TProofServLogHandler() override
Handle available message in the open 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.
Bool_t Notify() override
Handle this signal.
TProofServSigPipeHandler(TProofServ *s)
Bool_t Notify() override
Handle this interrupt.
TProofServTerminationHandler(TProofServ *s)
Class providing the PROOF server.
const char * GetOrdinal() const
void SetIdle(Bool_t st=kTRUE)
Change the idle status.
void Print(Option_t *option="") const override
Print status of slave server.
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.
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.
Bool_t IsWaiting()
Return kTRUE if the session is waiting for the OK to start processing.
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
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'.
void GetOptions(Int_t *argc, char **argv) override
Get and handle command line options.
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.
void Terminate(Int_t status) override
Terminate the proof server.
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.
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 void HandleQueryList(TMessage *mess)
Handle request for list of queries.
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
void HandleException(Int_t sig) override
Exception handler: we do not try to recover here, just exit.
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
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,...
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.
Int_t OldAuthSetup(TString &wconf)
Setup authentication related stuff for old versions.
static TString fgSysLogEntity
Int_t WaitingQueries()
Return the number of waiting queries.
const char * GetWorkDir() const
const char * GetPrefix() const
static TString fgSysLogService
~TProofServ() override
Cleanup.
void LogToMaster(Bool_t on=kTRUE)
TReaperTimer * fReaperTimer
static Long64_t fgLastEntry
void Run(Bool_t retrn=kFALSE) override
Main server eventloop.
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.
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.
static Int_t GetInputData(TList *input, const char *cachedir, TString &emsg)
Get the input data from the file defined in the input list.
TObject * GetParameter(const char *par) const
Get specified parameter.
static void AssertMacroPath(const char *macro)
Make sure that the directory path contained by macro is in the macro path.
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.
static Int_t AssertDataSet(TDSet *dset, TList *input, TDataSetManager *mgr, TString &emsg)
Make sure that dataset is in the form to be processed.
Class managing the query-result area.
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.
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
virtual void SetInputList(TList *in, bool adopt=true)
Set / change the input list.
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() override
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.
~TReaperTimer() override
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...
This class implements server sockets.
TShutdownTimer(TProofServ *p, Int_t delay)
Construtor.
Bool_t Notify() override
Handle expiration of the shutdown timer.
ESignals GetSignal() const
void SetSysInfo(SysInfo_t si)
Setter for fSysInfo.
This class implements client sockets.
TTimeStamp GetLastUsage()
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
virtual Int_t SendObject(const TObject *obj, Int_t kind=kMESS_OBJECT)
Send an object.
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 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
static void ResetErrno()
Static function resetting system error number.
static Int_t GetErrno()
Static function returning system error number.
The TTimeStamp encapsulates seconds and ns since EPOCH.
const char * AsString(const Option_t *option="") const
Return the date & time as a string.
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.
TTimer(const TTimer &)=delete
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 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 void HandleGetTreeHeader(TMessage *mess)=0
virtual TList * GetOutputList() const =0