43 # include <sys/stat.h>
44 # include <sys/types.h>
45 # include "snprintf.h"
51 #include "RConfigure.h"
109 TList *TProof::fgProofEnvList = 0;
120 if (!fProof->IsTty() || fProof->GetRemoteProtocol() < 22) {
123 fProof->StopProcess(
kTRUE);
128 if (fProof->GetRemoteProtocol() < 22) {
129 a = Getline(
"\nSwitch to asynchronous mode not supported remotely:"
130 "\nEnter S/s to stop, Q/q to quit, any other key to continue: ");
132 a = Getline(
"\nEnter A/a to switch asynchronous, S/s to stop, Q/q to quit,"
133 " any other key to continue: ");
135 if (a[0] ==
'Q' || a[0] ==
'S' || a[0] ==
'q' || a[0] ==
's') {
137 Info(
"Notify",
"Processing interrupt signal ... %c", a[0]);
141 fProof->StopProcess(abort);
143 }
else if ((a[0] ==
'A' || a[0] ==
'a') && fProof->GetRemoteProtocol() >= 22) {
145 fProof->GoAsynchronous();
158 fSocket(s), fProof(p)
185 if (!si)
return fOrdinal.CompareTo(obj->GetName());
187 const char *myord = GetOrdinal();
189 while (myord && otherord) {
190 Int_t myval = atoi(myord);
191 Int_t otherval = atoi(otherord);
192 if (myval < otherval)
return 1;
193 if (myval > otherval)
return -1;
194 myord = strchr(myord,
'.');
196 otherord = strchr(otherord,
'.');
197 if (otherord) otherord++;
199 if (myord)
return -1;
200 if (otherord)
return 1;
283 TMergerInfo::~TMergerInfo()
287 fWorkers->SetOwner(
kFALSE);
297 Error(
"SetMergedWorker",
"all workers have been already merged before!");
310 Error(
"AddWorker",
"all workers have been already assigned to this merger");
364 if( 0 == _cluster->
Length() ) {
365 Error(
"PoDCheckUrl",
"PoD server is not running");
405 if (!masterurl || strlen(masterurl) <= 0) {
408 }
else if (!(strstr(masterurl,
"://"))) {
445 }
else if (
fMaster ==
"prooflite") {
454 Init(masterurl, conffile, confdir, loglevel, alias);
459 if (
Exec(
"gProofServ->GetUser()",
"0",
kTRUE) == 0) {
466 emsg =
"could not find 'const char *' string in macro log";
469 emsg =
"could not retrieve user info";
478 Warning(
"TProof",
"%s: using local default %s", emsg.
Data(), usr.
Data());
488 gROOT->GetListOfSockets()->Remove(mgr);
489 gROOT->GetListOfSockets()->Add(mgr);
494 if (!
gROOT->GetListOfProofs()->FindObject(
this))
495 gROOT->GetListOfProofs()->Add(
this);
514 if (!
gROOT->GetListOfProofs()->FindObject(
this))
515 gROOT->GetListOfProofs()->Add(
this);
624 while (envs.Tokenize(env, from,
",")) {
627 Warning(
"Init",
"request for sending over undefined environemnt variable '%s' - ignoring", env.Data());
629 if (!envsfound.IsNull()) envsfound +=
",";
636 if (envsfound.IsNull()) {
637 Warning(
"Init",
"none of the requested env variables were found: '%s'", envs.Data());
639 Info(
"Init",
"the following environment variables have been added to the list to be sent to the nodes: '%s'", envsfound.Data());
664 while (
TObjString *package = dynamic_cast<TObjString*>(nextpackage())) {
720 gROOT->GetListOfProofs()->Remove(
this);
725 if (gProof && gProof ==
this) {
728 while ((gProof = (
TProof *)pvp())) {
736 Emit(
"CloseWindow()");
748 const char *confdir,
Int_t loglevel,
const char *alias)
772 if (!conffile || !conffile[0])
774 if (!confdir || !confdir[0])
833 Error(
"Init",
"could not create temporary logfile");
835 Error(
"Init",
"could not open temp logfile for reading");
899 if (enableSchemaEvolution) {
902 Info(
"TProof",
"automatic schema evolution in TMessage explicitly disabled");
912 Error(
"Init",
"failure asserting sandbox directory %s", sandbox.
Data());
929 if (globpack.
Length() > 0) {
933 while (globpack.
Tokenize(ldir, from,
":")) {
936 Warning(
"Init",
"directory for global packages %s does not"
937 " exist or is not readable", ldir.
Data());
957 fEnabledPackagesOnClient->SetOwner();
979 GetRC(
"Proof.DynamicStartup", dyn);
996 if (s.IsDigit()) nwrk = s.
Atoi();
1019 gROOT->GetListOfSockets()->Add(
this);
1044 }
else if (sb ==
"..") {
1067 const char *cq = (
IsLite()) ?
"\"" :
"";
1068 while (sconf.Tokenize(opt, from,
",")) {
1069 if (opt.
IsNull())
continue;
1091 if (all !=
"" && mst ==
"") mst =
all;
1092 if (all !=
"" && top ==
"") top =
all;
1093 if (all !=
"" && sub ==
"") sub =
all;
1094 if (all !=
"" && wrk ==
"") wrk =
all;
1095 if (all !=
"" && all.
BeginsWith(
"valgrind_opts:")) {
1097 Info(
"ParseConfigField",
"valgrind run: resetting 'PROOF_WRAPPERCMD':"
1098 " must be set again for next run , if any");
1102 cmd.
Form(
"%svalgrind -v --suppressions=<rootsys>/etc/valgrind-root.supp", cq);
1103 TString mstlab(
"NO"), wrklab(
"NO");
1104 Bool_t doMaster = (opt ==
"valgrind" || (opt.
Contains(
"master") &&
1110 if (mst ==
"" || mst.
BeginsWith(
"valgrind_opts:")) {
1112 var.
Form(
"%s --log-file=<logfilemst>.valgrind.log %s", cmd.
Data(), mst.
Data());
1115 }
else if (mst !=
"") {
1121 "master valgrinding does not make sense for PROOF-Lite: ignoring");
1123 if (!opt.
Contains(
"workers"))
return;
1125 if (opt ==
"valgrind" || opt ==
"valgrind=") opt =
"valgrind=workers";
1130 if (top ==
"" || top.
BeginsWith(
"valgrind_opts:")) {
1132 var.
Form(
"%s --log-file=<logfilemst>.valgrind.log %s", cmd.
Data(), top.
Data());
1135 }
else if (top !=
"") {
1141 if (sub ==
"" || sub.
BeginsWith(
"valgrind_opts:")) {
1143 var.
Form(
"%s --log-file=<logfilemst>.valgrind.log %s", cmd.
Data(), sub.
Data());
1146 }
else if (sub !=
"") {
1152 if (wrk ==
"" || wrk.
BeginsWith(
"valgrind_opts:")) {
1154 var.
Form(
"%s --log-file=<logfilewrk>.__valgrind__.log %s%s", cmd.
Data(), wrk.
Data(), cq);
1159 nwrks = opt(inw+1, opt.
Length());
1160 if (!nwrks.
IsDigit()) nwrks =
"2";
1172 }
else if (wrk !=
"") {
1186 Printf(
" ---> Starting a debug run with valgrind (master:%s, workers:%s)", mstlab.Data(), wrklab.
Data());
1188 Printf(
" ---> Starting a debug run with valgrind (workers:%s)", wrklab.
Data());
1190 Printf(
" ---> Please be patient: startup may be VERY slow ...");
1191 Printf(
" ---> Logs will be available as special tags in the log window (from the progress dialog or TProof::LogViewer()) ");
1192 Printf(
" ---> (Reminder: this debug run makes sense only if you are running a debug version of ROOT)");
1201 Printf(
"*** Requested IgProf performance profiling ***");
1202 TString addLogExt =
"__igprof.pp__.log";
1203 TString addLogFmt =
"igprof -pk -pp -t proofserv.exe -o %s.%s";
1211 tmp.
Form(addLogFmt.
Data(),
"<logfilemst>", addLogExt.
Data());
1214 tmp.
Form(addLogFmt.
Data(),
"<logfilewrk>", addLogExt.
Data());
1240 if ((c !=
'+') && ((c < '0') || (c >
'9')))
1259 if (
IsLite() && cpuPin) {
1260 Printf(
"*** Requested CPU pinning ***");
1262 const char *pinCmd =
"taskset -c <cpupin>";
1265 if (ev && (p = dynamic_cast<TNamed *>(ev->
FindObject(
"PROOF_SLAVE_WRAPPERCMD")))) {
1271 val.
Form(
"\"%s\"", pinCmd);
1284 if (!inpath || strlen(inpath) <= 0) {
1285 Error(
"AssertPath",
"undefined input path");
1294 Error(
"AssertPath",
"could not create path %s", path.
Data());
1301 Error(
"AssertPath",
"could not make path %s writable", path.
Data());
1320 gROOT->GetListOfSockets()->Remove(mgr);
1321 gROOT->GetListOfSockets()->Add(mgr);
1336 Error(
"AddWorkers",
"AddWorkers can only be called on the master!");
1340 if (!workerList || !(workerList->
GetSize())) {
1341 Error(
"AddWorkers",
"empty list of workers!");
1362 if (!addedWorkers) {
1364 Error(
"AddWorkers",
"cannot create new list for the workers to be added");
1372 while ((to =
next())) {
1399 if (wn ==
"localhost" || wn.BeginsWith(
"localhost.")) wn =
gSystem->
HostName();
1421 addedWorkers->
Add(slave);
1429 Info(
"AddWorkers",
"worker on host %s created"
1435 m <<
TString(
"Opening connections to workers") << nSlaves
1436 << nSlavesDone << slaveOk;
1450 TIter nxsl(addedWorkers);
1452 while ((sl = (
TSlave *) nxsl())) {
1463 Info(
"AddWorkers",
"worker on host %s finalized"
1473 m <<
TString(
"Setting up worker servers") << nSlaves
1474 << nSlavesDone << slaveOk;
1487 if (s.IsDigit()) nwrk = s.
Atoi();
1493 Info(
"AddWorkers",
"will invoke GoMoreParallel()");
1496 Info(
"AddWorkers",
"GoMoreParallel()=%d", nw);
1502 Info(
"AddWorkers",
"will invoke GoParallel()");
1511 Info(
"AddWorkers",
"will invoke SaveWorkerInfo()");
1517 Info(
"AddWorkers",
"will invoke SendParallel()");
1520 if (goMoreParallel &&
fPlayer) {
1525 Info(
"AddWorkers",
"will send the PROCESS message to selected workers");
1533 delete addedWorkers;
1548 while ((pck = (
TPair *) nxp())) {
1554 Info(
"SetupWorkersEnv",
"will invoke UploadPackage() and EnablePackage() on added workers");
1559 Info(
"SetupWorkersEnv",
"will invoke UploadPackage() and EnablePackage() on all workers");
1572 Info(
"SetupWorkersEnv",
"will invoke Load() on selected workers");
1584 Info(
"SetupWorkersEnv",
"will invoke AddDynamicPath() on selected workers");
1592 Info(
"SetupWorkersEnv",
"will invoke AddIncludePath() on selected workers");
1607 Error(
"RemoveWorkers",
"RemoveWorkers can only be called on the master!");
1617 while ((sl = (
TSlave *) nxsl())) {
1623 if (!(workerList->
GetSize())) {
1624 Error(
"RemoveWorkers",
"The list of workers should not be empty!");
1632 while ((to =
next())) {
1634 if (!strcmp(to->
ClassName(),
"TProofNodeInfo")) {
1638 while ((sl = (
TSlave *) nxsl())) {
1646 Warning(
"RemoveWorkers",
"unknown object type: %s - it should be"
1647 " TProofNodeInfo or inheriting from TSlave", to->
ClassName());
1677 TString emsg(
"no resource currently available for this session: please retry later");
1689 Printf(
"Starting master: opening connection ...");
1695 fprintf(stderr,
"Starting master:"
1696 " connection open: setting up server ... \r");
1710 Printf(
"Starting master: OK ");
1716 Error(
"StartSlaves",
1717 "client and remote protocols not compatible (%d and %d)",
1736 if (slStatus == -99 || slStatus == -98 || rc == 0) {
1739 if (slStatus == -99)
1740 Error(
"StartSlaves",
"no resources available or problems setting up workers (check logs)");
1741 else if (slStatus == -98)
1742 Error(
"StartSlaves",
"could not setup output redirection on master");
1744 Error(
"StartSlaves",
"setting up master");
1755 Error(
"StartSlaves",
1756 "failed to setup connection with PROOF master server");
1762 gROOT->GetPluginManager()->FindHandler(
"TProofProgressDialog")))
1768 Printf(
"Starting master: failure");
1773 Printf(
"Starting master: OK ");
1778 gROOT->GetPluginManager()->FindHandler(
"TProofProgressDialog")))
1791 Error(
"StartSlaves",
"failed to create (or connect to) the PROOF master server");
1807 { std::lock_guard<std::recursive_mutex> lock(
fCloseMutex);
1816 while ((sl = (
TSlave *)nxs()))
1830 gROOT->GetListOfSockets()->Remove(
this);
1842 gROOT->GetListOfProofs()->Remove(
this);
1843 if (gProof && gProof ==
this) {
1846 while ((gProof = (
TProof *)pvp())) {
1929 while (
TSlave *sl = dynamic_cast<TSlave*>(
next())) {
1930 if (
fImage == sl->fImage) {
1940 TSlave *replace_slave = 0;
1942 while (
TSlave *sl2 = dynamic_cast<TSlave*>(next2())) {
1943 if (sl->fImage == sl2->fImage) {
1948 replace_slave = sl2;
1955 Error(
"FindUniqueSlaves",
"TSlave is neither Master nor Slave");
1968 if (replace_slave) {
2060 if (s.Contains(
"Total MB's processed:")) {
2063 }
else if (s.Contains(
"Total real time used (s):")) {
2064 s.ReplaceAll(
"Total real time used (s):",
"");
2066 }
else if (s.Contains(
"Total CPU time used (s):")) {
2067 s.ReplaceAll(
"Total CPU time used (s):",
"");
2068 if (s.IsFloat())
fCpuTime = s.Atof();
2076 Printf(
" Real/CPU time (s): %.3f / %.3f; workers: %d; processed: %.2f MBs",
2180 Printf(
"+++ Options: \"A\" show all queries known to server");
2181 Printf(
"+++ \"L\" show retrieved queries");
2182 Printf(
"+++ \"F\" full listing of query info");
2183 Printf(
"+++ \"H\" print this menu");
2185 Printf(
"+++ (case insensitive)");
2187 Printf(
"+++ Use Retrieve(<#>) to retrieve the full"
2188 " query results from the master");
2189 Printf(
"+++ e.g. Retrieve(8)");
2219 Printf(
"+++ Queries processed during this session: selector: %d, draw: %d",
2221 while ((pq = nxq()))
2228 Printf(
"+++ Queries processed during this session: selector: %d, draw: %d",
2235 Printf(
"+++ Queries available locally: %d", listlocal->
GetSize());
2236 TIter nxlq(listlocal);
2237 while ((pq = nxlq()))
2253 while (
TSlave *sl = dynamic_cast<TSlave*>(nextSlave())) {
2263 if (submasters.
GetSize() > 0) {
2271 EmitVA(
"IsDataReady(Long64_t,Long64_t)", 2, totalbytes, bytesready);
2274 Info(
"IsDataReady",
"%lld / %lld (%s)",
2275 bytesready, totalbytes,
fDataReady?
"READY":
"NOT READY");
2293 if (slaves->
GetSize() == 0)
return;
2317 Int_t nparallel = 0;
2318 while (
TSlave* sl = dynamic_cast<TSlave*>(nextSlave()))
2319 if (sl->GetParallel() >= 0)
2320 nparallel += sl->GetParallel();
2353 while ((activeslave = (
TSlave *) nextactive())) {
2362 while ((badslave = (
TSlave *) nextbad())) {
2371 MarkBad(slave,
"could not send kPROOF_GETSLAVEINFO message");
2379 MarkBad(slave,
"could not send kPROOF_GETSLAVEINFO message");
2384 Error(
"GetSlaveInfo",
"TSlave is neither Master nor Slave");
2435 if (workers->
GetSize() == 0)
return 0;
2444 MarkBad(wrk,
"could not send group priority");
2486 if (!slaves || slaves->
GetSize() == 0)
return 0;
2495 MarkBad(sl,
"could not broadcast request");
2578 if (slaves->
GetSize() == 0)
return 0;
2587 MarkBad(sl,
"could not send broadcast-raw request");
2621 if (wrks->
GetSize() == 0)
return 0;
2629 if (
SendFile(file, opt, rfile, wrk) < 0)
2630 Error(
"BroadcastFile",
2631 "problems sending file to worker %s (%s)",
2691 rc =
Collect(mon, timeout, endtype, deactonfail);
2722 rc =
Collect(mon, timeout, endtype, deactonfail);
2749 rc =
Collect(mon, timeout, endtype, deactonfail);
2768 Info(
"Collect",
">>>>>> Entering collect responses #%04d", collectId);
2798 int cnt = 0, rc = 0;
2803 Info(
"Collect",
"#%04d: active: %d", collectId, mon->
GetActive());
2815 while ((nact = mon->
GetActive(sto)) && (nto < 0 || nto > 0)) {
2821 if (al && al->
GetSize() > 0) {
2822 Info(
"Collect",
" %d node(s) still active:", al->
GetSize());
2825 while ((xs = (
TSocket *)nxs())) {
2843 fLastPollWorkers_s = time(0);
2846 Info(
"Collect",
"#%04d: now active: %d", collectId, mon->
GetActive());
2851 Info(
"Collect",
"Will invoke Select() #%04d", collectId);
2854 if (s && s != (
TSocket *)(-1)) {
2857 if (rc == 1 || (rc == 2 && !savedMonitor)) {
2861 Info(
"Collect",
"#%04d: deactivating %p (active: %d, %p)", collectId,
2864 }
else if (rc == 2) {
2870 Info(
"Collect",
"save monitor: deactivating %p (active: %d, %p)",
2887 if (s == (
TSocket *)(-1) && nto > 0)
2899 while (mxws && (wrk = (
TSlave *) nxwr())) {
2904 Info(
"Collect",
"worker %s was asked to send its output to master",
2929 if (al && al->
GetSize() > 0) {
2931 Info(
"Collect",
" %d node(s) went in timeout:", al->
GetSize());
2934 while ((xs = (
TSocket *)nxs())) {
2962 Info(
"Collect",
"<<<<<< Exiting collect responses #%04d", collectId);
2979 Error(
"PollForNewWorkers",
"Can't invoke: not on a master -- should not happen!");
2983 Error(
"PollForNewWorkers",
"No ProofServ available -- should not happen!");
2996 while (( ni = dynamic_cast<TProofNodeInfo *>(
next()) )) {
3004 while (( sl = dynamic_cast<TSlave *>(nextInner()) )) {
3011 if (found)
delete ni;
3013 newWorkers->
Add(ni);
3015 Info(
"PollForNewWorkers",
"New worker found: %s:%s",
3025 if (nNewWorkers > 0) {
3027 Info(
"PollForNewWorkers",
"Requesting to add %d new worker(s)", newWorkers->
GetEntries());
3030 Error(
"PollForNewWorkers",
"Call to AddWorkers() failed (got %d < 0)", rv);
3037 Info(
"PollForNewWorkers",
"No new worker found");
3066 if ((recvrc = s->
Recv(mess)) < 0) {
3068 Info(
"CollectInputFrom",
"%p: got %d from Recv()", s, recvrc);
3079 MarkBad(s,
"problems receiving a message in TProof::CollectInputFrom(...)");
3085 MarkBad(s,
"undefined message in TProof::CollectInputFrom(...)");
3093 if (rc == 1 && (endtype >= 0) && (what != endtype))
3113 Warning(
"HandleInputMessage",
"given an empty message or undefined worker");
3119 Warning(
"HandleInputMessage",
"worker socket is undefined");
3127 Info(
"HandleInputMessage",
"got type %d from '%s'", what, sl->
GetOrdinal());
3146 MarkBad(s,
"received kPROOF_FATAL");
3159 Info(
"HandleInputMessage",
"received kPROOF_STOP from %s: disabling any further collection this worker",
3191 Info(
"HandleInputMessage",
"%s: kPROOF_GETPACKET", sl->
GetOrdinal());
3233 Info(
"HandleInputMessage",
"%s: kPROOF_LOGFILE: size: %d", sl->
GetOrdinal(), size);
3241 Info(
"HandleInputMessage",
"%s: kPROOF_LOGDONE: status %d parallel %d",
3275 Info(
"HandleInputMessage",
3291 rc = (async) ? 0 : 1;
3316 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_PACKAGE_LIST: enter");
3326 Error(
"HandleInputMessage",
3327 "kPROOF_PACKAGE_LIST: kListEnabledPackages: TList not found in message!");
3336 Error(
"HandleInputMessage",
3337 "kPROOF_PACKAGE_LIST: kListPackages: TList not found in message!");
3341 Error(
"HandleInputMessage",
"kPROOF_PACKAGE_LIST: unknown type: %d", type);
3354 Info(
"HandleInputMessage",
"kPROOF_SENDOUTPUT: enter (%s)", sl->
GetOrdinal());
3370 Info(
"HandleInputMessage",
"kPROOF_OUTPUTOBJECT: enter");
3374 Info(
"HandleInputMessage",
"finalization on %s started ...", prefix);
3400 Warning(
"HandleInputMessage",
"kPROOF_OUTPUTOBJECT: query result missing");
3402 }
else if (type > 0) {
3412 }
else if (
IsTty() || changed) {
3413 fprintf(stderr,
"%s\r", msg.
Data());
3433 while ((xo = nxin()))
3445 Warning(
"HandleInputMessage",
"kPROOF_OUTPUTOBJECT: player undefined!");
3457 Info(
"HandleInputMessage",
"%s: kPROOF_OUTPUTLIST: enter", sl->
GetOrdinal());
3473 out = (
TList *) out->Clone();
3478 Info(
"HandleInputMessage",
3479 "%s: kPROOF_OUTPUTLIST: query result missing", sl->
GetOrdinal());
3488 Info(
"HandleInputMessage",
3489 "%s: kPROOF_OUTPUTLIST: outputlist is empty", sl->
GetOrdinal());
3493 "%s: kPROOF_OUTPUTLIST: player undefined!", sl->
GetOrdinal());
3503 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_QUERYLIST: enter");
3516 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_RETRIEVE: enter");
3525 Info(
"HandleInputMessage",
3526 "kPROOF_RETRIEVE: query result missing or player undefined");
3533 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_MAXQUERIES: enter");
3537 Printf(
"Number of queries fully kept remotely: %d", max);
3543 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_SERVERSTARTED: enter");
3545 UInt_t tot = 0, done = 0;
3549 (*mess) >> action >> tot >> done >> st;
3556 char msg[512] = {0};
3558 snprintf(msg, 512,
"%s: OK (%d %s) \n",
3561 snprintf(msg, 512,
"%s: %d out of %d (%d %%)\r",
3562 action.
Data(), done, tot, frac);
3565 fprintf(stderr,
"%s", msg);
3575 m << action << tot << done << st;
3583 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_DATASET_STATUS: enter");
3585 UInt_t tot = 0, done = 0;
3589 (*mess) >> action >> tot >> done >> st;
3595 char msg[512] = {0};
3597 snprintf(msg, 512,
"%s: OK (%d %s) \n",
3600 snprintf(msg, 512,
"%s: %d out of %d (%d %%)\r",
3601 action.
Data(), done, tot, frac);
3604 fprintf(stderr,
"%s", msg);
3614 m << action << tot << done << st;
3622 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_STARTPROCESS: enter");
3642 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"Preparation time: %f s",
fPrepTime);
3647 (*mess) >> selec >> dsz >> first >> nent;
3649 if (!
gROOT->IsBatch()) {
3668 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_ENDINIT: enter");
3687 Info(
"HandleInputMessage",
"%s: got kPROOF_SETIDLE", sl->
GetOrdinal());
3690 "%s: got kPROOF_SETIDLE but no running workers ! protocol error?",
3704 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_QUERYSUBMITTED: enter");
3729 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_SESSIONTAG: enter");
3752 Info(
"HandleInputMessage",
"kPROOF_FEEDBACK: enter");
3765 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_AUTOBIN: enter");
3770 (*mess) >> name >> xmin >> xmax >> ymin >> ymax >> zmin >> zmax;
3776 answ << name << xmin << xmax << ymin << ymax << zmin << zmax;
3784 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_PROGRESS: enter");
3793 Float_t initTime, procTime, evtrti, mbrti;
3794 (*mess) >> total >> processed >> bytesread
3795 >> initTime >> procTime
3799 initTime, procTime, evtrti, mbrti);
3804 (*mess) >> total >> processed;
3818 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_STOPPROCESS: enter");
3825 (*mess) >> status >> abort;
3827 (*mess) >> events >> abort;
3833 TList *listOfMissingFiles = 0;
3834 if (!(listOfMissingFiles = (
TList *)
GetOutput(
"MissingFiles"))) {
3835 listOfMissingFiles =
new TList();
3836 listOfMissingFiles->
SetName(
"MissingFiles");
3855 Emit(
"StopProcess(Bool_t)", abort);
3861 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_SUBMERGER: enter");
3868 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_GETSLAVEINFO: enter");
3875 Error(
"HandleInputMessage",
"kPROOF_GETSLAVEINFO: no list received!");
3877 tmpinfo->SetOwner(
kFALSE);
3919 Info(
"HandleInputMessage",
"kPROOF_VALIDATE_DSET: enter");
3923 Error(
"HandleInputMessage",
"kPROOF_VALIDATE_DSET: fDSet not set");
3932 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_DATA_READY: enter");
3935 (*mess) >> dataready >> totalbytes >> bytesready;
3948 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_MESSAGE: enter");
3961 fprintf(stderr,
"%s%c", msg.Data(), (lfeed ?
'\n' :
'\r'));
3969 fprintf(stderr,
"%s%c", msg.Data(), (lfeed ?
'\n' :
'\r'));
3985 PDB(kGlobal,2)
Info(
"HandleInputMessage",
"kPROOF_VERSARCHCOMP: %s", vac.Data());
3988 if (vac.Tokenize(vers, from,
"|"))
3998 Error(
"HandleInputMessage",
"unknown command received from '%s' (what = %d)",
4026 Int_t merger_id = -1;
4027 (*mess) >> merger_id;
4030 Info(
"HandleSubmerger",
"kOutputSent: Worker %s:%d:%s had sent its output to merger #%d",
4034 Error(
"HandleSubmerger",
"kOutputSize: #%d not in list ", merger_id);
4037 TMergerInfo * mi = (TMergerInfo *)
fMergers->
At(merger_id);
4047 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"all mergers removed ... ");
4051 PDB(kSubmerger, 2)
Error(
"HandleSubmerger",
"kOutputSent: received not on endmaster!");
4058 Int_t merger_id = -1;
4059 (*mess) >> merger_id;
4061 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kMergerDown: #%d ", merger_id);
4064 Error(
"HandleSubmerger",
"kMergerDown: #%d not in list ", merger_id);
4068 TMergerInfo * mi = (TMergerInfo *)
fMergers->
At(merger_id);
4087 while ((o = nxo())) {
4090 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
"kMergerDown:%d: exit", merger_id);
4098 Info(
"HandleSubmerger",
"worker %s reported as finished ", sl->
GetOrdinal());
4102 Info(
"HandleSubmerger",
"finalization on %s started ...", prefix);
4106 Int_t output_size = 0;
4107 Int_t merging_port = 0;
4108 (*mess) >> output_size >> merging_port;
4110 PDB(kSubmerger, 2)
Info(
"HandleSubmerger",
4111 "kOutputSize: Worker %s:%d:%s reports %d output objects (+ available port %d)",
4127 msg.Form(
"%s: Invalid request: cannot start %d mergers for %d workers",
4137 if (activeWorkers > 1) {
4143 msg.Form(
"%s: Number of mergers set dynamically to %d (for %d workers)",
4146 msg.Form(
"%s: No mergers will be used for %d workers",
4147 prefix, activeWorkers);
4156 if (activeWorkers > 1) {
4161 while ((wrk = nxwk())) {
4169 msg.Form(
"%s: Number of mergers set to %d (for %d workers), one for each slave host",
4172 msg.Form(
"%s: No mergers will be used for %d workers",
4173 prefix, activeWorkers);
4181 msg.Form(
"%s: Number of mergers set by user to %d (for %d workers)",
4227 TMergerInfo *mgi = 0;
4228 while ((mgi = (TMergerInfo *) nxmg())) {
4249 Error(
"HandleSubMerger",
"kOutputSize received not on endmaster!");
4261 Int_t merger_id = -1;
4265 TMergerInfo *mgi = (TMergerInfo *)
fMergers->
At(i);
4275 if (merger_id == -1) {
4282 Info(
"RedirectWorker",
"redirecting worker %s to merger %d", sl->
GetOrdinal(), merger_id);
4284 PDB(kSubmerger, 2)
Info(
"RedirectWorker",
"redirecting output to merger #%d", merger_id);
4286 Error(
"RedirectWorker",
"#%d not in list ", merger_id);
4289 TMergerInfo * mi = (TMergerInfo *)
fMergers->
At(merger_id);
4292 sendoutput << merger_id;
4293 sendoutput << hname;
4295 s->
Send(sendoutput);
4307 while (fLastAssignedMerger < fMergers->GetSize() &&
4319 while (fLastAssignedMerger < fMergers->GetSize() &&
4340 PDB(kSubmerger, 2)
Info(
"AskForOutput",
4341 "worker %s was asked to send its output to master",
4345 sendoutput <<
TString(
"master");
4361 Info(
"UpdateDialog",
4362 "processing was aborted - %lld events processed",
4377 Info(
"UpdateDialog",
4378 "processing was stopped - %lld events processed",
4395 EmitVA(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)",
4400 EmitVA(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)",
4441 Int_t active_mergers = 0;
4444 TMergerInfo *mi = 0;
4445 while ((mi = (TMergerInfo *)mergers())) {
4446 if (mi->
IsActive()) active_mergers++;
4449 return active_mergers;
4458 Info(
"CreateMerger",
"worker %s will be merger ", sl->
GetOrdinal());
4460 PDB(kSubmerger, 2)
Info(
"CreateMerger",
"Begin");
4464 Info(
"CreateMerger",
"cannot create merger on port %d - exit", port);
4481 Int_t workersOnHost = 0;
4485 workers = workersOnHost - 1;
4489 msg.
Form(
"worker %s on host %s will be merger for %d additional workers", sl->
GetOrdinal(), sl->
GetName(), workers);
4496 TMergerInfo * merger =
new TMergerInfo(sl, port, workers);
4501 bemerger << workers;
4504 PDB(kSubmerger,2)
Info(
"CreateMerger",
4505 "merger #%d (port: %d) for %d workers started",
4513 PDB(kSubmerger, 2)
Info(
"CreateMerger",
"exit");
4524 std::lock_guard<std::recursive_mutex> lock(
fCloseMutex);
4530 Error(
"MarkBad",
"worker instance undefined: protocol error? ");
4551 msg.
Form(
"\n +++ Message from %s : marking %s:%d (%s) as bad\n +++ Reason: %s",
4553 (reason && strlen(reason)) ? reason :
"unknown");
4554 Info(
"MarkBad",
"%s", msg.Data());
4558 msg +=
TString::Format(
"\n\n +++ Most likely your code crashed on worker %s at %s:%d.\n",
4563 msg +=
TString::Format(
" +++ Please check the session logs for error messages either using\n");
4567 msg +=
TString::Format(
" +++ root [] TProof::Mgr(\"%s\")->GetSessionLogs()->"
4571 msg +=
TString::Format(
" +++ root [] TProof::Mgr(\"%s\")->GetSessionLogs()->"
4572 "Display(\"*\")\n\n", thisurl.
Data());
4573 Printf(
"%s", msg.Data());
4575 }
else if (reason) {
4577 Info(
"MarkBad",
"worker %s at %s:%d asked to terminate",
4585 TList *listOfMissingFiles = 0;
4586 if (!(listOfMissingFiles = (
TList *)
GetOutput(
"MissingFiles"))) {
4587 listOfMissingFiles =
new TList();
4588 listOfMissingFiles->
SetName(
"MissingFiles");
4597 packetizer->
MarkBad(wrk, 0, &listOfMissingFiles);
4604 if (
id !=
kNPOS)
ord.Remove(0,
id+1);
4653 Int_t mergersCount = -1;
4655 if (mc) mergersCount = mc->
GetVal();
4657 if (mergersCount == 0) {
4659 if (activeWorkers > 1) {
4685 std::lock_guard<std::recursive_mutex> lock(
fCloseMutex);
4700 Warning(
"TerminateWorker",
"worker instance undefined: protocol error? ");
4710 Info(
"TerminateWorker",
"connection to worker is already down: cannot"
4711 " send termination message");
4723 if (ord && strlen(ord) > 0) {
4728 while ((wrk = (
TSlave *)nxw())) {
4761 if (slaves->
GetSize() == 0)
return 0;
4769 if (sl->
Ping() == -1) {
4770 MarkBad(sl,
"ping unsuccessful");
4787 if (slaves->
GetSize() == 0)
return;
4810 IsValid() ?
"valid" :
"invalid");
4813 Printf(
"ROOT version|rev: %s|%s",
gROOT->GetVersion(),
gROOT->GetGitCommit());
4819 if (sl->GetSocket()->GetSecContext())
4820 Printf(
"Security context: %s",
4821 sl->GetSocket()->GetSecContext()->AsString(sc));
4822 Printf(
"Proofd protocol version: %d", sl->GetSocket()->GetRemoteProtocol());
4824 Printf(
"Security context: Error - No connection");
4825 Printf(
"Proofd protocol version: Error - No connection");
4837 Printf(
"*** Master server %s (parallel mode, %d workers):",
4840 Printf(
"*** Master server %s (sequential mode):",
4854 Printf(
"ROOT version|rev|tag: %s", ver.
Data());
4872 Printf(
"List of workers:");
4875 while (
TSlave* sl = dynamic_cast<TSlave*>(nextslave())) {
4876 if (!sl->IsValid())
continue;
4883 if (sl->GetSocket()->Send(mess) == -1)
4884 const_cast<TProof*>(
this)->MarkBad(sl,
"could not send kPROOF_PRINT request");
4888 Error(
"Print",
"TSlave is neither Master nor Worker");
4944 while (opt.
Tokenize(oo, from,
"[; ]")) {
4947 iof = opt.
Index(tagf);
4950 iof = opt.
Index(tagf);
4953 iod = opt.
Index(tagd);
4956 iod = opt.
Index(tagd);
4959 ios = opt.
Index(tags);
4961 tags =
"savetofile";
4962 ios = opt.
Index(tags);
4967 Error(
"HandleOutputOptions",
"options 'of'/'outfile' and 'ds'/'dataset' are incompatible!");
4973 from = iof + tagf.
Length();
4975 Error(
"HandleOutputOptions",
"could not extract output file settings string! (%s)", opt.
Data());
4983 from = iod + tagd.
Length();
4984 if (!opt.
Tokenize(dsname, from,
"[; ]"))
4985 if (
gDebug > 0)
Info(
"HandleOutputOptions",
"no dataset name found: use default");
4994 if (dsname.
IsNull()) dsname =
"dataset_<qtag>";
4998 from = ios + tags.
Length();
4999 if (!opt.
Tokenize(stfopt, from,
"[; ]"))
5000 if (
gDebug > 0)
Info(
"HandleOutputOptions",
"save-to-file not found: use default");
5008 Error(
"HandleOutputOptions",
"save-to-file option must be a digit! (%s)", stfopt.
Data());
5032 Warning(
"HandleOutputOptions",
5033 "directory '%s' for the output file does not exists or is not writable:"
5054 if (
Exec(
"gProofServ->GetDataDir()",
"0",
kTRUE) == 0) {
5059 ddir = os->
GetString()(fst+1, lst-fst-1);
5061 emsg =
"could not find 'const char *' string in macro log! cannot continue";
5064 emsg =
"could not retrieve master data directory info! cannot continue";
5067 Error(
"HandleOutputOptions",
"%s", emsg.
Data());
5071 if (!ddir.
IsNull()) ddir +=
"/";
5073 outfile.
Form(
"%s<file>", ddir.
Data());
5094 Warning(
"HandleOutputOptions",
"Dataset required bu Save-To-File disabled: enabling!");
5095 stfopt.
Form(
"%d", ostf+1);
5110 if (target ==
"ds|V") {
5115 while ((o = nxo())) {
5127 Warning(
"HandleOutputOptions",
"could not retrieve TFileCollection for dataset '%s'", dsname.
Data());
5130 Warning(
"HandleOutputOptions",
"dataset not found!");
5142 Printf(
" Output successfully copied to %s", target.
Data());
5143 targetcopied =
kTRUE;
5145 Warning(
"HandleOutputOptions",
"problems copying output to %s", target.
Data());
5153 while ((o = nxo())) {
5157 if (pof == pf && targetcopied)
continue;
5162 Printf(
" Output successfully copied to %s", target.
Data());
5165 Warning(
"HandleOutputOptions",
"problems copying output to %s", target.
Data());
5175 Warning(
"HandleOutputOptions",
5182 if (!target.
IsNull() && !swapcopied) {
5185 if (!fout || (fout && fout->
IsZombie())) {
5187 Warning(
"HandleOutputOptions",
"problems opening output file %s", target.
Data());
5192 while ((o = nxo())) {
5205 Printf(
" Output saved to %s", target.
Data());
5236 if (action == 0 || (action == 1 && optfb.
IsNull())) {
5241 ifb = opt.
Index(tag);
5243 if (ifb ==
kNPOS)
return;
5244 from = ifb + tag.
Length();
5247 Warning(
"SetFeedback",
"could not extract feedback string! Ignoring ...");
5256 TString nm, startdraw, stopdraw;
5258 while (optfb.
Tokenize(nm, from,
",")) {
5260 if (nm ==
"stats") {
5262 startdraw.
Form(
"gDirectory->Add(new TStatsFeedback((TProof *)%p))",
this);
5269 stopdraw.
Form(
"TObject *o = gDirectory->FindObject(\"%s\"); "
5270 " if (o && strcmp(o->ClassName(), \"TStatsFeedback\")) "
5282 startdraw.
Form(
"gDirectory->Add(new TDrawFeedback((TProof *)%p))",
this);
5287 stopdraw.
Form(
"TObject *o = gDirectory->FindObject(\"%s\"); "
5288 " if (o && strcmp(o->ClassName(), \"TDrawFeedback\")) "
5314 if (opt.Contains(
"fb=") || opt.Contains(
"feedback="))
SetFeedback(opt, optfb, 0);
5323 Info(
"Process",
"session is in waiting or processing status: switch to asynchronous mode");
5325 opt.ReplaceAll(
"SYNC",
"");
5356 if (selector && strlen(selector)) {
5361 Error(
"Process",
"neither a selecrot file nor a selector object have"
5362 " been specified: cannot process!");
5384 if (sst) rv = sst->
GetVal();
5416 Info(
"Process",
"server version < 5.18/00:"
5417 " processing of TFileCollection not supported");
5428 if (selector && strlen(selector)) {
5429 retval =
Process(dset, selector, option, nentries, first);
5433 Error(
"Process",
"neither a selecrot file nor a selector object have"
5434 " been specified: cannot process!");
5506 Info(
"Process",
"processing 'by name' not supported by the server");
5510 TString dsname, fname(dsetname);
5523 const Int_t blen = 8192;
5527 Long64_t len = (rest > blen - 1) ? blen - 1 : rest;
5529 Error(
"Process",
"problems reading from file '%s'", fname.
Data());
5540 if (rest > 0)
return -1;
5542 Error(
"Process",
"could not open file '%s'", fname.
Data());
5554 Info(
"Process",
"processing multi-dataset read from file '%s':", fname.
Data());
5555 Info(
"Process",
" '%s'", dsname.
Data());
5562 Info(
"Process",
"multi-dataset processing not supported by the server");
5569 while (names.Tokenize(name, from,
"[, |]")) {
5575 if (ienl ==
kNPOS) {
5576 ienl = name.
Index(
"<<");
5577 if (ienl !=
kNPOS) {
5579 ienl += strlen(
"<<");
5583 ienl += strlen(
"?enl=");
5589 if (idxc !=
kNPOS) {
5591 if (idxs !=
kNPOS) {
5592 obj = newname(idxs+1, newname.
Length());
5593 dir = newname(idxc+1, newname.
Length());
5594 dir.
Remove(dir.Index(
"/") + 1);
5597 obj = newname(idxc+1, newname.
Length());
5602 Error(
"Process",
"bad name syntax (%s): please use"
5603 " a '#' after the dataset name", name.
Data());
5611 }
else if (obj != dsobj || dir != dsdir) {
5613 Warning(
"Process",
"'obj' or 'dir' specification not consistent w/ the first given: ignore");
5616 if (ienl !=
kNPOS) {
5626 if ((el = dynamic_cast<TEntryList *>(oel))) {
5640 while ((k = (
TKey *) nxk())) {
5641 if (!strcmp(k->GetClassName(),
"TEntryList")) {
5643 if ((el = dynamic_cast<TEntryList *>(f->
Get(k->GetName())))) {
5655 }
else if (strcmp(el->GetName(), k->GetName())) {
5656 Warning(
"Process",
"multiple entry lists found in file '%s': the first one is taken;\n"
5657 "if this is not what you want, load first the content in memory"
5658 "and select it by name ", enl.
Data());
5663 Warning(
"Process",
"file '%s' cannot be open or is empty - ignoring", enl.
Data());
5672 newname += el->GetName();
5685 TDSet *dset =
new TDSet(dsname, dsobj, dsdir);
5694 if (selector && strlen(selector)) {
5695 retval =
Process(dset, selector, option, nentries, first);
5699 Error(
"Process",
"neither a selector file nor a selector object have"
5700 " been specified: cannot process!");
5724 Info(
"Process",
"server version < 5.17/04: generic processing not supported");
5733 if (selector && strlen(selector)) {
5734 retval =
Process(dset, selector, option, n);
5738 Error(
"Process",
"neither a selector file nor a selector object have"
5739 " been specified: cannot process!");
5763 Error(
"Process",
"server version < 5.33/02:"
5764 "processing by object not supported");
5768 Error(
"Process",
"selector object undefined!");
5789 Error(
"Process",
"server version < 5.33/02:"
5790 "processing by object not supported");
5794 Error(
"Process",
"selector object undefined!");
5812 Error(
"Process",
"server version < 5.33/02:"
5813 "processing by object not supported");
5817 Error(
"Process",
"selector object undefined!");
5821 Long64_t rc =
Process(dsetname, (
const char*)0, option, nentries, first, elist);
5836 Error(
"Process",
"server version < 5.33/02:"
5837 "processing by object not supported");
5841 Error(
"Process",
"selector object undefined!");
5889 Info(
"Finalize",
"query #%d not found", qry);
5923 Info(
"Finalize",
"query already finalized:"
5924 " use Finalize(<qry>,kTRUE) to force new retrieval");
5953 Info(
"Retrieve",
"query #%d not found", qry);
5955 Info(
"Retrieve",
"positive argument required - do nothing");
5982 if (!farc || (farc && !(farc->
IsOpen()))) {
5983 Info(
"Retrieve",
"archive file cannot be open (%s)", path);
5998 Info(
"Retrieve",
"query not found after retrieve");
6018 Info(
"Remove",
"query #%d not found", qry);
6020 Info(
"Remove",
"positive argument required - do nothing");
6062 Info(
"Archive",
"query #%d not found", qry);
6064 Info(
"Archive",
"positive argument required - do nothing");
6121 if (mode && (strlen(mode) > 0)) {
6132 Info(
"GetQueryMode",
"query mode is set to: %s", qmode ==
kSync ?
6145 const char *selection,
Option_t *option,
6152 Info(
"DrawSelect",
"not idle, asynchronous Draw not supported");
6181 const char *selection,
Option_t *option,
6185 Info(
"Process",
"processing 'by name' not supported by the server");
6193 if (idxc !=
kNPOS) {
6195 if (idxs !=
kNPOS) {
6198 dir.Remove(dir.Index(
"/") + 1);
6206 Error(
"DrawSelect",
"bad name syntax (%s): please use"
6207 " a '#' after the dataset name", dsetname);
6225 Info(
"StopProcess",
"enter %d", abort);
6259 Emit(
"DisableGoAsyn()");
6270 Info(
"GoAsynchronous",
"functionality not supported by the server - ignoring");
6278 Info(
"GoAsynchronous",
"either idle or already in asynchronous mode - ignoring");
6287 const Int_t kMAXBUF = 16384;
6301 Warning(
"RecvLogFile",
"file descriptor for outputs undefined (%d):"
6302 " will not log msgs", fdout);
6305 lseek(fdout, (off_t) 0, SEEK_END);
6311 while (filesize < size) {
6312 left =
Int_t(size - filesize);
6313 if (left >= kMAXBUF)
6316 filesize = (rec > 0) ? (filesize + rec) : filesize;
6325 w =
write(fdout, p, r);
6328 SysError(
"RecvLogFile",
"error writing to unit: %d", fdout);
6334 }
else if (rec < 0) {
6335 Error(
"RecvLogFile",
"error during receiving log file");
6341 EmitVA(
"LogMessage(const char*,Bool_t)", 2, buf,
kFALSE);
6360 if (!msg || (len = strlen(msg)) <= 0)
6364 Int_t lsfx = (sfx) ? strlen(sfx) : 0;
6371 Warning(
"NotifyLogMsg",
"file descriptor for outputs undefined (%d):"
6372 " will not notify msgs", fdout);
6375 lseek(fdout, (off_t) 0, SEEK_END);
6381 char *p = (
char *)msg;
6386 SysError(
"NotifyLogMsg",
"error writing to unit: %d", fdout);
6394 if (
write(fdout, sfx, lsfx) != lsfx)
6395 SysError(
"NotifyLogMsg",
"error writing to unit: %d", fdout);
6401 EmitVA(
"LogMessage(const char*,Bool_t)", 2, msg,
kFALSE);
6415 Info(
"LogMessage",
"Enter ... %s, 'all: %s", msg ? msg :
"",
6416 all ?
"true" :
"false");
6418 if (
gROOT->IsBatch()) {
6419 PDB(kGlobal,1)
Info(
"LogMessage",
"GUI not started - use TProof::ShowLog()");
6424 EmitVA(
"LogMessage(const char*,Bool_t)", 2, msg, all);
6430 lseek(fileno(
fLogFileR), (off_t) 0, SEEK_SET);
6432 const Int_t kMAXBUF = 32768;
6436 while ((len =
read(fileno(
fLogFileR), buf, kMAXBUF-1)) < 0 &&
6441 Error(
"LogMessage",
"error reading log file");
6447 EmitVA(
"LogMessage(const char*,Bool_t)", 2, buf,
kFALSE);
6472 snprintf(str, 32,
"%d %d",
cnt, size);
6474 MarkBad(sl,
"could not send kPROOF_GROUPVIEW message");
6538 if (!s.
Length())
return 0;
6547 Error(
"Exec",
"file %s could not be transfered", fn);
6558 Error(
"Exec",
"macro %s not found", filename.
Data());
6566 gROOT->ProcessLine(cmd);
6594 if (!s.
Length())
return 0;
6598 gROOT->ProcessLine(cmd);
6606 if (strcmp(ord,
"master") && strcmp(ord,
"0"))
ActivateWorker(ord);
6666 TString cmd =
TString::Format(
"if (gEnv->Lookup(\"%s\")) { gEnv->GetValue(\"%s\",\"\"); }", rcenv, rcenv);
6680 Printf(
"%s: %d", rcenv, env);
6692 TString cmd =
TString::Format(
"if (gEnv->Lookup(\"%s\")) { gEnv->GetValue(\"%s\",\"\"); }", rcenv, rcenv);
6706 Printf(
"%s: %f", rcenv, env);
6718 TString cmd =
TString::Format(
"if (gEnv->Lookup(\"%s\")) { gEnv->GetValue(\"%s\",\"\"); }", rcenv, rcenv);
6727 env = os->
GetString()(fst+1, lst-fst-1);
6809 FileMap_t::const_iterator it;
6816 if ((*md5) != md.
fMD5) {
6839 Error(
"CheckFile",
"could not calculate local MD5 check sum - dont send");
6853 Error(
"CheckFile",
"could not calculate local MD5 check sum - dont send");
6900 slaves =
new TList();
6904 if (slaves->
GetSize() == 0)
return 0;
6912 SysError(
"SendFile",
"cannot open file %s", file);
6920 Error(
"SendFile",
"cannot stat file %s", file);
6925 Error(
"SendFile",
"empty file %s", file);
6937 if ((opt &
kCp)) cpopt |= kCp;
6938 if ((opt &
kCpBin)) cpopt |= (kCp | kCpBin);
6940 const Int_t kMAXBUF = 32768;
6947 if (fnam ==
"cache") {
6949 }
else if (fnam.
IsNull()) {
6964 Info(
"SendFile",
"%s sending file %s to: %s:%s (%d)", snd,
6972 snprintf(buf, kMAXBUF,
"%s %d %lld %d", fnam.
Data(), bin, siz, fw);
6974 MarkBad(sl,
"could not send kPROOF_SENDFILE request");
6980 lseek(fd, 0, SEEK_SET);
6988 SysError(
"SendFile",
"error reading from file %s", file);
6995 SysError(
"SendFile",
"error writing to slave %s:%s (now offline)",
6997 MarkBad(sl,
"sendraw failure");
7018 return (
fStatus != 0) ? -1 : nsl;
7028 if (!
IsValid() || !obj)
return -1;
7054 if (!
IsValid() || !obj)
return -1;
7083 snprintf(str, 32,
"%d %u", level, mask);
7101 Warning(
"SetRealTimeLog",
"session is invalid - do nothing");
7119 PDB(kGlobal,1)
Info(
"SetParallelSilent",
"request all nodes");
7121 PDB(kGlobal,1)
Info(
"SetParallelSilent",
"request %d node%s", nodes,
7122 nodes == 1 ?
"" :
"s");
7129 PDB(kGlobal,1)
Info(
"SetParallelSilent",
"got %d node%s", n, n == 1 ?
"" :
"s");
7148 Printf(
"PROOF set to sequential mode");
7150 TString subfix = (n == 1) ?
"" :
"s";
7152 subfix +=
", randomly selected";
7153 Printf(
"PROOF set to parallel mode (%d worker%s)", n, subfix.
Data());
7171 Error(
"GoMoreParallel",
"can't invoke here -- should not happen!");
7175 Error(
"GoMoreParallel",
"no ProofServ available nor Lite -- should not happen!");
7181 Int_t nAddedWorkers = 0;
7183 while (((nAddedWorkers < nWorkersToAdd) || (nWorkersToAdd == -1)) &&
7184 (( sl = dynamic_cast<TSlave *>(
next() ) ))) {
7189 Error(
"GoMoreParallel",
"TSlave is neither a Master nor a Slave: %s:%s",
7196 (strcmp(
"IGNORE", sl->
GetImage()) == 0)) {
7198 Info(
"GoMoreParallel",
"Worker %s:%s won't be considered",
7205 Info(
"GoMoreParallel",
"Worker %s:%s is already active: skipping",
7221 Info(
"GoMoreParallel",
"Worker %s:%s marked as active!",
7226 Error(
"GoMoreParallel",
"Dynamic addition of master is not supported");
7234 Info(
"GoMoreParallel",
"Will invoke AskStatistics() -- implies a Collect()");
7239 Info(
"GoMoreParallel",
"Will invoke FindUniqueSlaves()");
7244 Info(
"GoMoreParallel",
"Will invoke SendGroupView()");
7248 Info(
"GoMoreParallel",
"Will invoke GetParallel()");
7254 s.
Form(
"PROOF just went more parallel (%d additional worker%s, %d worker%s total)",
7255 nAddedWorkers, (nAddedWorkers == 1) ?
"" :
"s",
7256 nTotalWorkers, (nTotalWorkers == 1) ?
"" :
"s");
7258 Info(
"GoMoreParallel",
"%s", s.
Data());
7260 return nTotalWorkers;
7284 while ((sl = (
TSlave *)nxt())) {
7286 if (strcmp(
"IGNORE", sl->
GetImage()) == 0)
continue;
7289 Error(
"GoParallel",
"TSlave is neither Master nor Slave");
7302 while (cnt < nwrks) {
7312 Error(
"GoParallel",
"attaching to candidate!");
7318 Int_t slavenodes = 0;
7329 Int_t nn = (nodes < 0) ? -1 : nodes-cnt;
7337 MarkBad(sl,
"could not send kPROOF_PARALLEL or kPROOF_LOGFILE request");
7353 MarkBad(sl,
"collect failed after kPROOF_PARALLEL or kPROOF_LOGFILE request");
7380 printf(
"PROOF set to sequential mode\n");
7382 printf(
"PROOF set to parallel mode (%d worker%s)\n",
7383 n, n == 1 ?
"" :
"s");
7386 PDB(kGlobal,1)
Info(
"GoParallel",
"got %d node%s", n, n == 1 ?
"" :
"s");
7422 if (doask && !
Prompt(
"Do you really want to remove all data files"))
return;
7423 if (
fManager->
Rm(
"~/data/*",
"-rf",
"all") < 0)
7424 Warning(
"ClearData",
"problems purging data directory");
7428 if (!dsname || strlen(dsname) <= 0) {
7429 Error(
"ClearData",
"dataset name mandatory when removing a full dataset");
7434 Error(
"ClearData",
"dataset '%s' does not exists", dsname);
7440 Error(
"ClearData",
"could not retrieve info about dataset '%s'", dsname);
7445 " of dataset '%s'", dsname);
7457 if (!(fi->GetFirstUrl())) {
7458 Error(
"ClearData",
"GetFirstUrl() returns NULL for '%s' - skipping",
7462 TUrl uf(*(fi->GetFirstUrl()));
7466 Int_t nurl = fi->GetNUrls();
7469 while (nurl-- && fi->NextUrl()) {
7470 up = fi->GetCurrentUrl();
7473 if (opt.BeginsWith(
"node=")) {
7483 Error(
"ClearData",
"problems removing '%s'", file.
Data());
7490 fprintf(stderr,
"\n");
7498 TString outtmp(
"ProofClearData_");
7501 Error(
"ClearData",
"cannot create temp file for logs");
7511 in.open(outtmp.
Data());
7512 if (!in.is_open()) {
7513 Error(
"ClearData",
"could not open temp file for logs: %s", outtmp.
Data());
7524 if (line.
IsNull())
continue;
7528 if (!line.
Tokenize(host, from,
"| "))
continue;
7530 if (!line.
Tokenize(file, from,
"| "))
continue;
7541 Info(
"ClearData",
"added info for: h:%s, f:%s", host.
Data(), file.
Data());
7543 Warning(
"ClearData",
"found incomplete line: '%s'", line.
Data());
7553 if (!fcmap || (fcmap && fcmap->
GetSize() <= 0)) {
7555 Warning(
"ClearData",
"no dataset beloning to '%s'", sel.
Data());
7574 while (nurl-- && fi->
NextUrl()) {
7583 Info(
"ClearData",
"found: host: %s, file: %s", host.
Data(), file.
Data());
7594 "registered file '%s' not found in the full list!",
7610 Info(
"ClearData",
"%d unregistered files to be removed:", nfiles);
7614 " unregistered data files", nfiles);
7628 Error(
"ClearData",
"problems removing '%s' on host '%s'",
7636 fprintf(stderr,
"\n");
7651 if (!pp.
Contains(
"[y/N]")) pp +=
" [y/N]";
7653 if (a !=
"\n" && a[0] !=
'y' && a[0] !=
'Y' && a[0] !=
'n' && a[0] !=
'N') {
7654 Printf(
"Please answer y, Y, n or N");
7657 }
else if (a ==
"\n" || a[0] ==
'n' || a[0] ==
'N') {
7670 fprintf(stderr,
"[TProof::ClearData] Total %5d files\t|", t);
7672 if (r > 0 && t > 0) {
7674 fprintf(stderr,
"=");
7675 else if (
l == 20*r/t)
7676 fprintf(stderr,
">");
7677 else if (
l > 20*r/t)
7678 fprintf(stderr,
".");
7680 fprintf(stderr,
"=");
7682 fprintf(stderr,
"| %.02f %% \r", 100.0*(t ? (r/t) : 1));
7744 while (fgets(line, 2048, fin)) {
7747 if (
write(fdout, line, r) < 0) {
7749 "errno %d writing to file descriptor %d",
7778 Warning(
"ShowPackages",
"file descriptor for outputs undefined (%p):"
7779 " will not log msgs", fout);
7782 lseek(fileno(fout), (off_t) 0, SEEK_END);
7789 while ((nm = (
TNamed *)nxd())) {
7790 fprintf(fout,
"*** Global Package cache %s client:%s ***\n",
7794 fprintf(fout,
"\n");
7798 fprintf(fout,
"*** Package cache client:%s ***\n",
fPackageDir.
Data());
7801 fprintf(fout,
"\n");
7840 printf(
"%s\n", str->GetName());
7877 if (!package || !package[0]) {
7878 Error(
"ClearPackage",
"need to specify a package name");
7905 if (!package || !package[0]) {
7906 Error(
"DisablePackage",
"need to specify a package name");
7927 path.
Form(
"~/packages/%s", package);
7928 if (
fManager->
Rm(path,
"-rf",
"all") != -1) {
7974 Warning(
"DisablePackageOnClient",
7975 "unable to remove cached package PAR file for %s (%s)", pack, s.
Data());
7978 Warning(
"DisablePackageOnClient",
7979 "unable to remove package PAR file for %s (%s)", pack, s.
Data());
7982 Warning(
"DisablePackageOnClient",
7983 "unable to remove package directory for %s (%s)", pack, s.
Data());
8011 if (
fManager->
Rm(
"~/packages/*",
"-rf",
"all") != -1) {
8049 if (!package || !package[0]) {
8050 Error(
"BuildPackage",
"need to specify a package name");
8068 if (buildOnClient) {
8096 if (buildOnClient) {
8103 if (!
IsLite() || !buildOnClient) {
8139 if (opt != 0 && !path) {
8140 Error(
"BuildPackageOnClient",
"for opt=%d != 0 'patyh' must be defined", opt);
8148 if (opt == 0 || opt == 1) {
8159 while ((nm = (
TNamed *)nxd())) {
8174 if (!tpar.
EndsWith(
".par")) tpar +=
".par";
8203 if (!dlpar.
EndsWith(
".par")) dlpar +=
".par";
8206 wasDownloaded =
kTRUE;
8208 if (pdir.
IsNull() || wasDownloaded) {
8211 Error(
"BuildPackageOnClient",
8212 "PAR file '%s.par' not found and could not be downloaded", pack);
8217 Error(
"BuildPackageOnClient",
8218 "PAR file '%s.par' not found and could not be unpacked locally", pack);
8226 }
else if (pdir.
IsNull()) {
8227 Error(
"BuildPackageOnClient",
"PAR file '%s.par' not found", pack);
8231 Info(
"BuildPackageOnClient",
"package %s exists and has PROOF-INF directory", pack);
8239 if (opt == 0 || opt == 2) {
8240 if (opt == 2) pdir = path->
Data();
8253 FILE *
f = fopen(
"PROOF-INF/proofvers.txt",
"r");
8264 if (!f || !goodver) {
8266 Info(
"BuildPackageOnClient",
8267 "%s: version change (current: %s:%s, build: %s:%s): cleaning ... ",
8281 Error(
"BuildPackageOnClient",
"failure executing: %s", cmd.Data());
8288 Error(
"BuildPackageOnClient",
"%s not found",
kGUNZIP);
8293 if (
gSystem->
Exec(
"export ROOTPROOFCLIENT=\"1\" ; PROOF-INF/BUILD.sh")) {
8294 Error(
"BuildPackageOnClient",
"building package %s on the client failed", pack);
8298 if (savever && !status) {
8299 f = fopen(
"PROOF-INF/proofvers.txt",
"w");
8301 fputs(
gROOT->GetVersion(),
f);
8308 Info(
"BuildPackageOnClient",
8309 "package %s exists but has no PROOF-INF/BUILD.sh script", pack);
8334 if (!package || !package[0]) {
8335 Error(
"LoadPackage",
"need to specify a package name");
8351 if (loadopts) mess << loadopts;
8360 Info(
"LoadPackage",
"Sending load message to selected workers only");
8362 if (doCollect)
Collect(workers, -1, -1, deactivateOnFailure);
8388 Info(
"LoadPackageOnClient",
"package %s already loaded", pack);
8401 while ((nm = (
TNamed *)nxd())) {
8409 if (pdir.
Length() <= 0) {
8411 Error(
"LoadPackageOnClient",
"failure locating %s ...", pack);
8427 TMacro setupmc(
"PROOF-INF/SETUP.C");
8435 Warning(
"LoadPackageOnClient",
"macro '%s/PROOF-INF/SETUP.C' does not contain a SETUP()"
8439 if (!setupmc.
Load()) {
8441 Error(
"LoadPackageOnClient",
"macro '%s/PROOF-INF/SETUP.C' could not be loaded:"
8442 " cannot continue", pack);
8449 Error(
"LoadPackageOnClient",
"function SETUP() not found in macro '%s/PROOF-INF/SETUP.C':"
8450 " cannot continue", pack);
8460 Warning(
"LoadPackageOnClient",
"loaded SETUP() does not take any argument:"
8461 " the specified TList object will be ignored");
8468 if (argsig.BeginsWith(
"TList")) {
8471 }
else if (argsig.BeginsWith(
"const char")) {
8477 if (loadopts && loadopts->
First()) {
8478 Warning(
"LoadPackageOnClient",
"found object argument of type %s:"
8479 " SETUP expects 'const char *': ignoring",
8486 Error(
"LoadPackageOnClient",
"unsupported SETUP signature: SETUP(%s)"
8487 " cannot continue", arg->
GetTitle());
8492 Error(
"LoadPackageOnClient",
"cannot get information about the SETUP() argument:"
8493 " cannot continue");
8498 Error(
"LoadPackageOnClient",
"function SETUP() can have at most a 'TList *' argument:"
8499 " cannot continue");
8503 Long_t setuprc = (status == 0) ? 0 : -1;
8506 if (setuprc < 0) status = -1;
8512 Info(
"LoadPackageOnClient",
8513 "package %s exists but has no PROOF-INF/SETUP.C script", pack);
8528 Info(
"LoadPackageOnClient",
"package %s successfully loaded", pack);
8530 Error(
"LoadPackageOnClient",
"loading package %s on client failed", pack);
8545 if (!package || !package[0]) {
8546 Error(
"UnloadPackage",
"need to specify a package name");
8599 Warning(
"UnloadPackageOnClient",
"unable to remove symlink to %s", package);
8618 while (
TObjString *objstr = dynamic_cast<TObjString*>(nextpackage()))
8669 if (loadopts && strlen(loadopts)) {
8689 Warning(
"EnablePackage",
"'checkversion' option unknown from argument: '%s' - ignored", ocv.
Data());
8692 Info(
"EnablePackage",
"setting check version option from argument: %d", cvopt);
8696 if (lcv !=
kNPOS && fcv == 0) ocv += os->
String()[lcv];
8702 if (!optls) optls =
new TList;
8708 Warning(
"EnablePackage",
"remote server does not support options: ignoring the option string");
8733 if (!package || !package[0]) {
8734 Error(
"EnablePackage",
"need to specify a package name");
8752 if (ocv ==
"off" || ocv ==
"0")
8754 else if (ocv ==
"on" || ocv ==
"1")
8756 else if (ocv ==
"svn" || ocv ==
"2")
8759 Warning(
"EnablePackage",
"'checkversion' option unknown from rootrc: '%s' - ignored", ocv.
Data());
8764 chkveropt = pcv->
GetVal();
8770 Info(
"EnablePackage",
"using check version option: %d", chkveropt);
8775 TList *optls = (loadopts && loadopts->
GetSize() > 0) ? loadopts : 0;
8777 Warning(
"EnablePackage",
"remote server does not support options: ignoring the option list");
8781 if (
LoadPackage(pac, notOnClient, optls, workers) == -1)
8805 Error(
"DownloadPackage",
"the manager is undefined!");
8811 if (!parname.EndsWith(
".par")) parname +=
".par";
8812 src.
Form(
"packages/%s", parname.Data());
8813 if (!dstdir || strlen(dstdir) <= 0) {
8814 dst.Form(
"./%s", parname.Data());
8821 Error(
"DownloadPackage",
8822 "could not create the destination directory '%s' (errno: %d)",
8827 Error(
"DownloadPackage",
8828 "destination path '%s' exist but is not a directory!", dstdir);
8831 dst.Form(
"%s/%s", dstdir, parname.Data());
8841 Warning(
"DownloadPackage",
"problems restoring output");
8854 if (s.Contains(
"*** Global Package cache")) {
8856 s.
Remove(0, s.Last(
':') + 1);
8860 }
else if (s.Contains(
"*** Package cache")) {
8865 if (isGlobal && s.Contains(parname)) {
8866 src.
Form(
"%s/%s", globaldir.
Data(), parname.Data());
8877 Error(
"DownloadPackage",
"problems downloading '%s' (src:%s, dst:%s)",
8878 pack, src.Data(), dst.Data());
8881 Info(
"DownloadPackage",
"'%s' cross-checked against master repository (local path: %s)",
8915 if (
par.EndsWith(
".par")) {
8917 name = base(0, base.
Length() - strlen(
".par"));
8937 while ((nm = (
TNamed *)nxd())) {
8948 Info(
"UploadPackage",
"global package found (%s): no upload needed",
8953 Error(
"UploadPackage",
"PAR file '%s' not found; paths tried: %s, %s",
8974 if (md5)
delete md5;
8989 mess << smsg << (*md5);
8992 mess2 << smsg << (*md5);
8995 mess3 << smsg << (*md5);
9026 Error(
"UploadPackage",
"%s: problems uploading file %s",
9033 if (!ftp.IsZombie()) {
9035 ftp.cd(smsg.
Data());
9045 Error(
"UploadPackage",
"%s: unpacking of package %s failed",
9055 while ((ma = (
TSlave *) nextmaster())) {
9065 Error(
"UploadPackage",
"package %s did not exist on submaster %s",
9096 ssize_t sz = readlink(par.
Data(), ctmp, 4096);
9097 if (sz >= 4096) sz = 4095;
9102 Warning(
"UploadPackageOnClient",
9103 "could not resolve the symbolik link '%s'", par.
Data());
9120 Warning(
"UploadPackageOnClient",
9121 "problems removing downloaded version of '%s' (%s):\n"
9122 "may imply inconsistencies in subsequent updates",
9136 Error(
"UploadPackageOnClient",
"cannot create symlink %s on client, "
9137 "another item with same name already exists",
9155 if (!md5local || (*md5) != (*md5local)) {
9161 Error(
"UploadPackageOnClient",
"failure executing: %s", cmd.
Data());
9170 Error(
"Uploadpackage",
"failure executing: %s", cmd.
Data());
9173 Error(
"UploadPackageOnClient",
"%s not found",
kGUNZIP);
9178 Error(
"UploadPackageOnClient",
9214 if (!macro || !macro[0]) {
9215 Error(
"Load",
"need to specify a macro name");
9222 TString addsname, implname = macro;
9224 if (icom !=
kNPOS) {
9225 addsname = implname(icom + 1, implname.
Length());
9229 TString bmsg(basemacro), acmode, args, io;
9235 Info(
"Load",
"macro '%s' does not contain a '.': do nothing", macro);
9251 Info(
"Load",
"no associated header file found: tried: %s %s",
9259 if (!addsname.
IsNull()) {
9262 while (addsname.
Tokenize(fn, from,
",")) {
9264 Error(
"Load",
"additional file '%s' not found", fn.
Data());
9271 addincs.
Form(
"-I%s", dirn.Data());
9272 }
else if (!addincs.
Contains(dirn)) {
9284 Error(
"Load",
"problems sending implementation file %s", implname.
Data());
9289 Error(
"Load",
"problems sending header file %s", headname.
Data());
9294 TIter nxfn(&addfiles);
9299 Error(
"Load",
"problems sending additional file %s", os->
GetName());
9351 PDB(kGlobal, 1)
Info(
"Load",
"adding loaded macro: %s", macro);
9368 if (uniqueWorkers) {
9384 while ((wrk = (
TSlave *)nxw())) {
9401 PDB(kGlobal, 1)
Info(
"Load",
"adding loaded macro: %s", macro);
9424 if ((!libpath || !libpath[0])) {
9426 Info(
"AddDynamicPath",
"list is empty - nothing to do");
9438 if (libpath && strlen(libpath)) {
9445 m << (
Int_t)doCollect;
9469 if ((!incpath || !incpath[0])) {
9471 Info(
"AddIncludePath",
"list is empty - nothing to do");
9483 if (incpath && strlen(incpath)) {
9490 m << (
Int_t)doCollect;
9513 if ((!libpath || !libpath[0])) {
9515 Info(
"RemoveDynamicPath",
"list is empty - nothing to do");
9527 if (libpath && strlen(libpath))
9547 if ((!incpath || !incpath[0])) {
9549 Info(
"RemoveIncludePath",
"list is empty - nothing to do");
9561 if (incpath && strlen(incpath))
9582 if ((type !=
"lib") && (type !=
"inc")) {
9583 Error(
"HandleLibIncPath",
"unknown action type: %s - protocol error?", type.
Data());
9592 if (path.
Length() > 0 && path !=
"-") {
9594 Warning(
"HandleLibIncPath",
"decomposing path %s", path.
Data());
9601 if (type ==
"lib") {
9623 Info(
"HandleLibIncPath",
9624 "libpath %s does not exist or cannot be read - not added", xlib.
Data());
9644 Info(
"HandleLibIncPath",
9645 "incpath %s does not exist or cannot be read - not added", xinc.
Data());
9652 if (type ==
"lib") {
9725 (*fPrintProgress)(
total, processed, procTime, bytesread);
9730 fprintf(stderr,
"[TProof::Progress] Total %lld events\t|", total);
9732 for (
int l = 0;
l < 20;
l++) {
9734 if (
l < 20*processed/total)
9735 fprintf(stderr,
"=");
9736 else if (
l == 20*processed/total)
9737 fprintf(stderr,
">");
9738 else if (
l > 20*processed/total)
9739 fprintf(stderr,
".");
9741 fprintf(stderr,
"=");
9743 Float_t evtrti = (procTime > 0. && processed > 0) ? processed / procTime : -1.;
9744 Float_t mbsrti = (procTime > 0. && bytesread > 0) ? bytesread / procTime : -1.;
9747 Float_t remainingTime = (total >= processed) ? (total - processed) / evtrti : -1;
9749 const Float_t toK = 1024., toM = 1048576., toG = 1073741824.;
9750 if (mbsrti >= toG) {
9753 }
else if (mbsrti >= toM) {
9756 }
else if (mbsrti >= toK) {
9760 fprintf(stderr,
"| %.02f %% [%.1f evts/s, %.1f %s, time left: %.1f s]\r",
9761 (total ? ((100.0*processed)/total) : 100.0), evtrti, mbsrti, sunit.
Data(), remainingTime);
9763 fprintf(stderr,
"| %.02f %% [%.1f evts/s, time left: %.1f s]\r",
9764 (total ? ((100.0*processed)/total) : 100.0), evtrti, remainingTime);
9767 fprintf(stderr,
"| %.02f %%\r",
9768 (total ? ((100.0*processed)/total) : 100.0));
9770 if (processed >= total) {
9771 fprintf(stderr,
"\n Query processing time: %.1f s\n", procTime);
9787 Info(
"Progress",
"%2f (%lld/%lld)", 100.*processed/total, processed, total);
9789 if (
gROOT->IsBatch()) {
9794 EmitVA(
"Progress(Long64_t,Long64_t)", 2, total, processed);
9807 Info(
"Progress",
"%lld %lld %lld %f %f %f %f", total, processed, bytesread,
9808 initTime, procTime, evtrti, mbrti);
9810 if (
gROOT->IsBatch()) {
9815 EmitVA(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)",
9816 7, total, processed, bytesread, initTime, procTime, evtrti, mbrti);
9829 Info(
"Progress",
"%lld %lld %lld %f %f %f %f %d %f", total, processed, bytesread,
9830 initTime, procTime, evtrti, mbrti, actw, eses);
9832 if (
gROOT->IsBatch()) {
9837 EmitVA(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)",
9838 10, total, processed, bytesread, initTime, procTime, evtrti, mbrti, actw, tses, eses);
9855 Emit(
"Feedback(TList *objs)", (
Long_t) objs);
9864 Info(
"CloseProgressDialog",
9871 Emit(
"CloseProgressDialog()");
9881 Info(
"ResetProgressDialog",
"(%s,%d,%lld,%lld)", sel, sz, fst, ent);
9883 EmitVA(
"ResetProgressDialog(const char*,Int_t,Long64_t,Long64_t)",
9884 4, sel, sz, fst, ent);
9893 Info(
"StartupMessage",
"(%s,%d,%d,%d)", msg, st, done, total);
9895 EmitVA(
"StartupMessage(const char*,Bool_t,Int_t,Int_t)",
9896 4, msg, st, done, total);
9905 Info(
"DataSetStatus",
"(%s,%d,%d,%d)", msg, st, done, total);
9907 EmitVA(
"DataSetStatus(const char*,Bool_t,Int_t,Int_t)",
9908 4, msg, st, done, total);
9921 char msg[512] = {0};
9923 snprintf(msg, 512,
"%s: OK (%d %s) \n",
9924 action,tot, type.
Data());
9926 snprintf(msg, 512,
"%s: %d out of %d (%d %%)\r",
9927 action, done, tot, frac);
9930 fprintf(stderr,
"%s", msg);
9939 mess <<
TString(action) << tot << done << st;
9950 Info(
"QueryResultReady",
"ref: %s", ref);
9952 Emit(
"QueryResultReady(const char*)",ref);
9972 while (
TSlave *sl = dynamic_cast<TSlave*>(nextSlave())) {
9977 sllist->
SetName(sl->GetName());
9978 slholder.
Add(sllist);
9981 elemholder.
Add(elemlist);
9982 nodes.
Add(
new TPair(sllist, elemlist));
9984 sllist =
dynamic_cast<TList*
>(p->
Key());
9986 if (sllist) sllist->
Add(sl);
9992 for (
Int_t i = 0; i < 2; i++) {
9995 while (
TDSetElement *elem = dynamic_cast<TDSetElement*>(nextElem())) {
9996 if (elem->GetValid())
continue;
10028 Warning(
"ValidateDSet",
"invalid values from TPair! Protocol error?");
10034 nonLocal.
Add(elem);
10036 Warning(
"ValidateDSet",
"no node to allocate TDSetElement to - ignoring");
10044 TIter nextNode(&nodes);
10046 while (
TPair *node = dynamic_cast<TPair*>(nextNode())) {
10047 TList *slaves =
dynamic_cast<TList*
>(node->Key());
10048 TList *setelements =
dynamic_cast<TList*
>(node->Value());
10049 if (!slaves || !setelements)
continue;
10053 for (
Int_t i=0; i<nslaves; i++) {
10057 for (
Int_t j = (i*nelements)/nslaves;
10058 j < ((i+1)*nelements)/nslaves;
10069 if (copyset.GetListOfElements()->GetSize()>0) {
10075 PDB(kGlobal,1)
Info(
"ValidateDSet",
10076 "Sending TDSet with %d elements to slave %s"
10077 " to be validated",
10078 copyset.GetListOfElements()->GetSize(),
10081 usedslaves.
Add(sl);
10088 Info(
"ValidateDSet",
"Calling Collect");
10165 if (datafile && strlen(datafile) > 0) {
10197 if (dataFile.
Length() > 0) {
10199 Info(
"SendInputDataFile",
"broadcasting %s", dataFile.
Data());
10246 if (!list_ok && !file_ok)
return;
10249 if (file_ok && !list_ok) {
10252 }
else if (!file_ok && list_ok) {
10262 while ((obj =
next())) {
10272 }
else if (file_ok && list_ok) {
10292 while ((obj =
next())) {
10298 Error(
"PrepareInputDataFile",
"could not open %s for updating", dataFile.
Data());
10357 if (!name || (name && strlen(name) <= 0) ||
10358 !out || (out && out->
GetSize() <= 0))
return o;
10365 while ((o = nxo())) {
10366 if ((pf = dynamic_cast<TProofOutputFile *> (o))) {
10371 if (!f || (f && f->IsZombie())) {
10372 ::Warning(
"TProof::GetOutput",
"problems opening file %s", fn.
Data());
10375 if (f && (o = f->
Get(name)))
return o;
10403 Warning(
"SetParameter",
"player undefined! Ignoring");
10422 Warning(
"SetParameter",
"player undefined! Ignoring");
10441 Warning(
"SetParameter",
"player undefined! Ignoring");
10460 Warning(
"SetParameter",
"player undefined! Ignoring");
10479 Warning(
"SetParameter",
"player undefined! Ignoring");
10499 Warning(
"GetParameter",
"player undefined! Ignoring");
10515 if (!wildcard) wildcard =
"";
10517 Int_t nch = strlen(wildcard);
10523 while ((p =
next())) {
10525 if (nch && s != wildcard && s.
Index(re) ==
kNPOS)
continue;
10540 if (!wildcard) wildcard =
"";
10542 Int_t nch = strlen(wildcard);
10547 while ((p =
next())) {
10549 if (nch && s != wildcard && s.
Index(re) ==
kNPOS)
continue;
10570 Info(
"AddFeedback",
"Adding object \"%s\" to feedback", name);
10601 Info(
"",
"no feedback requested");
10625 Error(
"GetTreeHeader",
"No connection");
10642 d = soc->
Recv(reply);
10645 Error(
"GetTreeHeader",
"Error getting a replay from the master.Result %d", (
int) d);
10652 if (s1 ==
"Success")
10657 Info(
"GetTreeHeader",
"%s, message size: %d, entries: %d",
10658 s1.Data(), reply->
BufferSize(), (int) t->GetMaxEntryLoop());
10660 Info(
"GetTreeHeader",
"tree header retrieval failed");
10824 msg << start << end;
10840 off_t nowlog = lseek(fileno(
fLogFileR), (off_t) 0, SEEK_CUR);
10843 "problem lseeking log file to current position (errno: %d)",
TSystem::GetErrno());
10848 off_t startlog = nowlog;
10849 off_t endlog = lseek(fileno(
fLogFileR), (off_t) 0, SEEK_END);
10858 if (tolog <= 0)
return maclog;
10861 if (lseek(fileno(
fLogFileR), startlog, SEEK_SET) < 0) {
10863 "problem lseeking log file to start position (errno: %d)",
TSystem::GetErrno());
10872 Int_t wanted = (tolog >
sizeof(
line)) ?
sizeof(
line) : tolog;
10873 while (fgets(line, wanted,
fLogFileR)) {
10876 if (line[r-1] ==
'\n') line[r-1] =
'\0';
10883 wanted = (tolog >
sizeof(
line)) ?
sizeof(
line) : tolog;
10887 if (lseek(fileno(
fLogFileR), nowlog, SEEK_SET) < 0) {
10889 "problem lseeking log file to original position (errno: %d)",
TSystem::GetErrno());
10928 if (strstr(queryref, qr->GetTitle()) &&
10929 strstr(queryref, qr->GetName()))
10952 off_t nowlog = lseek(fileno(
fLogFileR), (off_t) 0, SEEK_CUR);
10959 off_t startlog = nowlog;
10960 off_t endlog = lseek(fileno(
fLogFileR), (off_t) 0, SEEK_END);
10966 lseek(fileno(
fLogFileR), nowlog, SEEK_SET);
10969 lseek(fileno(
fLogFileR), (off_t) 0, SEEK_SET);
10970 }
else if (qry != -1) {
10981 }
else if (qry > 0) {
10984 TIter nxq(queries);
10991 TIter nxq(queries);
11002 Info(
"ShowLog",
"query %d not found in list", qry);
11014 lseek(fileno(
fLogFileR), startlog, SEEK_SET);
11019 Int_t wanted = (tolog >
sizeof(
line)) ?
sizeof(
line) : tolog;
11020 while (fgets(line, wanted,
fLogFileR)) {
11024 if (line[r-1] !=
'\n') line[r-1] =
'\n';
11030 SysError(
"ShowLog",
"error writing to stdout");
11037 tolog -= strlen(line);
11042 const char *opt = Getline(
"More (y/n)? [y]");
11052 wanted = (tolog >
sizeof(
line)) ?
sizeof(
line) : tolog;
11055 if (line[r-1] ==
'\n') line[r-1] = 0;
11061 if (
write(fileno(stdout),
"\n", 1) != 1)
11062 SysError(
"ShowLog",
"error writing to stdout");
11067 lseek(fileno(
fLogFileR), nowlog, SEEK_SET);
11105 Error(
"Detach",
"corrupted worker instance: wrk:%p, sock:%p", sl, s);
11112 if (shutdown && !
IsIdle()) {
11117 timeout = (timeout > 20) ? timeout : 20;
11215 Printf(
" *** WARNING: this function is obsolete: it has been replaced by TProofMgr::UploadFiles ***");
11246 Printf(
" *** WARNING: this function is obsolete: it has been replaced by TProofMgr::UploadFiles ***");
11264 Printf(
" *** WARNING: this function is obsolete: it has been replaced by TProofMgr::UploadFiles ***");
11290 Info(
"RegisterDataSet",
11291 "functionality not available: the server does not have dataset support");
11295 if (!dataSetName || strlen(dataSetName) <= 0) {
11296 Info(
"RegisterDataSet",
"specifying a dataset name is mandatory");
11304 parallelverify =
kTRUE;
11312 mess <<
TString(dataSetName);
11320 Error(
"RegisterDataSet",
"dataset was not saved");
11326 if (!parallelverify)
return result;
11331 Error(
"RegisterDataSet",
"problems verifying dataset '%s'", dataSetName);
11348 Info(
"SetDataSetTreeName",
"functionality not supported by the server");
11352 if (!dataset || strlen(dataset) <= 0) {
11353 Info(
"SetDataSetTreeName",
"specifying a dataset name is mandatory");
11357 if (!treename || strlen(treename) <= 0) {
11358 Info(
"SetDataSetTreeName",
"specifying a tree name is mandatory");
11374 Error(
"SetDataSetTreeName",
"some error occured: default tree name not changed");
11390 Info(
"GetDataSets",
11391 "functionality not available: the server does not have dataset support");
11394 if (
fProtocol < 31 && strstr(optStr,
":lite:"))
11395 Warning(
"GetDataSets",
"'lite' option not supported by the server");
11399 mess <<
TString(uri ? uri :
"");
11400 mess << TString(optStr ? optStr :
"");
11404 TMap *dataSetMap = 0;
11406 Error(
"GetDataSets",
"error receiving datasets information");
11412 Error(
"GetDataSets",
"error receiving datasets");
11414 Error(
"GetDataSets",
"message not found or wrong type (%p)", retMess);
11427 Info(
"ShowDataSets",
11428 "functionality not available: the server does not have dataset support");
11434 mess <<
TString(uri ? uri :
"");
11435 mess << TString(optStr ? optStr :
"");
11440 Error(
"ShowDataSets",
"error receiving datasets information");
11449 Info(
"ExistsDataSet",
"functionality not available: the server has an"
11450 " incompatible version of TFileInfo");
11454 if (!dataset || strlen(dataset) <= 0) {
11455 Error(
"ExistsDataSet",
"dataset name missing");
11477 Info(
"ClearDataSetCache",
"functionality not available on server");
11495 Info(
"ShowDataSetCache",
"functionality not available on server");
11518 Info(
"GetDataSet",
"functionality not available: the server has an"
11519 " incompatible version of TFileInfo");
11523 if (!uri || strlen(uri) <= 0) {
11524 Info(
"GetDataSet",
"specifying a dataset name is mandatory");
11531 nameMess << TString(optStr ? optStr:
"");
11533 Error(
"GetDataSet",
"sending request failed");
11538 Error(
"GetDataSet",
"error receiving datasets information");
11544 Error(
"GetDataSet",
"error reading list of files");
11546 Error(
"GetDataSet",
"message not found or wrong type (%p)", retMess);
11559 fileList->
Print(opt);
11562 Warning(
"ShowDataSet",
"no such dataset: %s", uri);
11573 nameMess <<
TString(uri?uri:
"");
11574 nameMess << TString(optStr?optStr:
"");
11576 Error(
"RemoveDataSet",
"sending request failed");
11590 Error (
"FindDataSets",
"not yet implemented");
11591 return (
TList *) 0;
11601 Error(
"RequestStagingDataSet",
11602 "functionality not supported by the server");
11613 Error(
"RequestStagingDataSet",
"staging request was unsuccessful");
11627 Error(
"CancelStagingDataSet",
11628 "functionality not supported by the server");
11639 Error(
"CancelStagingDataSet",
"cancel staging request was unsuccessful");
11654 Error(
"GetStagingStatusDataSet",
11655 "functionality not supported by the server");
11661 nameMess <<
TString(dataset);
11663 Error(
"GetStagingStatusDataSet",
"sending request failed");
11671 Error(
"GetStagingStatusDataSet",
"problem processing the request");
11679 Error(
"GetStagingStatusDataSet",
"error reading list of files");
11682 Error(
"GetStagingStatusDataSet",
11683 "response message not found or wrong type (%p)", retMess);
11711 Info(
"VerifyDataSet",
"functionality not available: the server has an"
11712 " incompatible version of TFileInfo");
11717 if (!uri || (uri && strlen(uri) <= 0)) {
11718 Error(
"VerifyDataSet",
"dataset name is is mandatory");
11722 Int_t nmissingfiles = 0;
11727 Info(
"VerifyDataSet",
"Master-only verification");
11730 nameMess <<
TString(uri ? uri :
"");
11737 Info(
"VerifyDataSet",
"no such dataset %s", uri);
11741 return nmissingfiles;
11746 Error(
"VerifyDataSet",
"PROOF is in sequential mode (no workers): cannot do parallel verification.");
11747 Error(
"VerifyDataSet",
"Either start PROOF with some workers or force sequential adding 'S' as option.");
11761 Int_t nmissingfiles = 0;
11776 Int_t oldifiip = -1;
11781 const char* mss=
"";
11783 const char* stageoption=
"";
11801 if (oldifiip > -1) {
11802 SetParameter(
"PROOF_IncludeFileInfoInPacket", oldifiip);
11810 Int_t ntouched = 0;
11816 while ((obj = nxtout())) {
11821 while ((fiindout = (
TFileInfo*) nxt())) {
11822 lfiindout->
Add(fiindout);
11828 nmissingfiles += pdisappeared->
GetVal();
11832 nopened += pnopened->
GetVal();
11836 ntouched += pntouched->
GetVal();
11844 Info(
"VerifyDataSetParallel",
"%s: changed? %d (# files opened = %d, # files touched = %d,"
11845 " # missing files = %d)",
11846 uri, changed_ds, nopened, ntouched, nmissingfiles);
11848 return nmissingfiles;
11857 Info(
"UploadDataSet",
"Lite-session: functionality not implemented");
11863 mess <<
TString(optStr?optStr:
"");
11867 TMap *groupQuotaMap = 0;
11869 Info(
"GetDataSetQuota",
"could not receive quota");
11875 Error(
"GetDataSetQuota",
"error getting quotas");
11877 Error(
"GetDataSetQuota",
"message not found or wrong type (%p)", retMess);
11880 return groupQuotaMap;
11890 Info(
"ShowDataSetQuota",
11891 "functionality not available: the server does not have dataset support");
11896 Info(
"UploadDataSet",
"Lite-session: functionality not implemented");
11907 Error(
"ShowDataSetQuota",
"error receiving quota information");
11970 if (!ord || strlen(ord) <= 0) {
11971 Info(
"ModifyWorkerLists",
11972 "an ordinal number - e.g. \"0.4\" or \"*\" for all - is required as input");
11976 Info(
"ModifyWorkerLists",
"ord: '%s' (add: %d, save: %d)", ord, add, save);
12013 while(oo.Tokenize(o, from,
","))
12023 while ((wrk = (
TSlave *) nxw())) {
12046 if (!allord && ords) {
12047 if (os) ords->
Remove(os);
12048 if (ords->
GetSize() == 0)
break;
12055 if (!fw && ords && ords->
GetSize() > 0) {
12058 while ((os = nxo())) {
12060 while ((wrk = (
TSlave *) nxw()))
12063 if (!oo.
IsNull()) oo +=
",";
12068 Warning(
"ModifyWorkerLists",
"worker(s) '%s' not found!", oo.
Data());
12088 mess << action <<
TString(ord);
12095 Warning(
"ModifyWorkerLists",
"request not completely full filled");
12097 Error(
"ModifyWorkerLists",
"request failed");
12102 if (oo.Contains(
","))
12103 Warning(
"ModifyWorkerLists",
"block request not supported by server: splitting into pieces ...");
12105 while(oo.Tokenize(o, from,
",")) {
12107 mess << action << o;
12162 const char *confdir,
Int_t loglevel)
12164 const char *pn =
"TProof::Open";
12172 ::Error(pn,
"plugin manager not found");
12176 if (
gROOT->IsBatch()) {
12177 ::Error(pn,
"we are in batch mode, cannot show PROOF Session Viewer");
12183 ::Error(pn,
"no plugin found for TSessionViewer");
12187 ::Error(pn,
"plugin for TSessionViewer could not be loaded");
12211 if (!opts.IsNull()) {
12214 TString sport = opts(it + strlen(
"tunnel="), opts.Length());
12220 host = sport(0, ic);
12221 sport.
Remove(0, ic + 1);
12232 port = sport.
Atoi();
12235 ::Info(
"TProof::Open",
"using tunnel at %s:%d", host.Data(), port);
12241 "problems parsing tunnelling info from options: %s", opts.Data());
12249 if (opts.Length() > 0) {
12254 }
else if (opts.IsDigit()) {
12255 locid = opts.Atoi();
12277 if (!proof || !proof->IsValid()) {
12279 ::Error(pn,
"new session could not be attached");
12288 if (!proof || !proof->IsValid()) {
12289 ::Error(pn,
"new session could not be created");
12322 "unable to initialize a valid manager instance");
12340 if (
gDebug > 0)
::Info(
"TProof::AddEnvVar",
"%s=%s", name, value);
12394 Error(
"SaveWorkerInfo",
"gProofServ undefined");
12400 Warning(
"SaveWorkerInfo",
"all relevant worker lists is undefined");
12407 FILE *fwrk = fopen(fnwrk.
Data(),
"w");
12409 Error(
"SaveWorkerInfo",
12410 "cannot open %s for writing (errno: %d)", fnwrk.
Data(), errno);
12420 if (reLogTag.
Match(addlogext) == 2) {
12421 addLogTag = reLogTag[1];
12427 Info(
"SaveWorkerInfo",
"request for additional line with ext: '%s'", addlogext.
Data());
12437 while ((wrk = (
TSlave *) nxa())) {
12440 if (re.
Match(logfile) == 2) logfile = re[1];
12443 fprintf(fwrk,
"%s@%s:%d %d %s %s.log\n",
12447 if (addlogext.
Length() > 0) {
12448 fprintf(fwrk,
"%s@%s:%d %d %s(%s) %s.%s\n",
12458 while ((wrk = (
TSlave *) nxb())) {
12460 if (re.
Match(logfile) == 2) logfile = re[1];
12464 fprintf(fwrk,
"%s@%s:%d 0 %s %s.log\n",
12477 if (re.
Match(logfile) == 2) logfile = re[1];
12479 fprintf(fwrk,
"%s 2 %s %s.log\n",
12482 if (addlogext.
Length() > 0) {
12483 fprintf(fwrk,
"%s 2 %s(%s) %s.%s\n",
12485 logfile.
Data(), addlogext.
Data());
12599 if (!dset || !input || !mgr) {
12600 emsg.
Form(
"invalid inputs (%p, %p, %p)", dset, input, mgr);
12609 if (dsname.BeginsWith(
"TFileCollection:")) {
12615 emsg.
Form(
"TFileCollection %s not found in input list", dset->
GetName());
12626 input->
Add(
new TNamed(
"PROOF_LookupOpt", lookupopt.
Data()));
12642 TString dsns( dsname.Data() ), enl;
12645 if (eli !=
kNPOS) {
12646 enl = dsns(eli+5, dsns.Length());
12647 dsns.Remove(eli, dsns.Length()-eli);
12654 (enl.Index(
",") ==
kNPOS) && (enl.Index(
" ") ==
kNPOS));
12656 if (validEnl && (( fc = mgr->
GetDataSet(dsns) ))) {
12680 dsns = dsname.Data();
12683 while (dsns.Tokenize(dsn1, from1,
"[, ]")) {
12686 while (dsn1.
Tokenize(dsn2, from2,
"|")) {
12689 if (ienl !=
kNPOS) {
12690 enl = dsn2(ienl + 5, dsn2.
Length());
12727 if (!datasets || datasets->
GetSize() <= 0) {
12728 emsg.
Form(
"no dataset(s) found on the master corresponding to: %s", dsname.Data());
12733 emsg.
Form(
"dataset pointer is null: corruption? - aborting");
12740 lookupopt =
gEnv->
GetValue(
"Proof.LookupOpt",
"stagedOnly");
12741 input->
Add(
new TNamed(
"PROOF_LookupOpt", lookupopt.
Data()));
12761 if (!dsTree.
IsNull() && dsTree !=
"/") {
12764 if (idx !=
kNPOS) {
12777 TList *srvmapslist = srvmapsref;
12783 if (srvmapsref && !srvmapslist) {
12784 msg.
Form(
"+++ Info: dataset server mapping(s) DISABLED by user");
12785 }
else if (srvmapsref && srvmapslist && srvmapslist != srvmapsref) {
12786 msg.
Form(
"+++ Info: dataset server mapping(s) modified by user");
12787 }
else if (!srvmapsref && srvmapslist) {
12788 msg.
Form(
"+++ Info: dataset server mapping(s) added by user");
12800 TIter nxds(datasets);
12801 while ((pair = (
TPair *) nxds())) {
12811 " entry list %s not found", os->
GetName()));
12816 " no sub-lists in entry-list!"));
12826 if (!ds->
Add(files, dsTree, availableOnly, missingFiles)) {
12827 emsg.
Form(
"error integrating dataset %s", dataset->
GetName());
12836 if (!dset->
Add(files, dsTree, availableOnly, missingFiles)) {
12837 emsg.
Form(
"error integrating dataset %s", dataset->
GetName());
12840 if (enl) entrylist = enl;
12842 if (missingFiles) {
12847 while ((file =
next())) {
12849 listOfMissingFiles->
Add(file);
12852 missingFiles->
Clear();
12858 while ((pair = (
TPair *) nxds())) {
12859 if (pair->
Key())
delete pair->
Key();
12866 if (srvmapslist && srvmapslist != srvmapsref) {
12877 if (listOfMissingFiles && listOfMissingFiles->
GetSize() > 0) {
12878 listOfMissingFiles->
SetName(
"MissingFiles");
12879 input->
Add(listOfMissingFiles);
12896 !cachedir || strlen(cachedir) <= 0)
return 0;
12901 if (!data && !inputdata)
return 0;
12908 if (dstname.BeginsWith(
"cache:")) {
12910 dstname.ReplaceAll(
"cache:",
"");
12911 srcname.Form(
"%s/%s", cachedir, dstname.Data());
12913 emsg.
Form(
"input data file not found in cache (%s)", srcname.Data());
12921 emsg.
Form(
"problems copying %s to %s", srcname.Data(), dstname.Data());
12926 if (inputdata && inputdata->
GetSize() > 0) {
12930 inputdata->
Write();
12934 emsg.
Form(
"could not create %s", dstname.Data());
12938 emsg.
Form(
"no input data!");
12942 ::Info(
"TProof::SaveInputData",
"input data saved to %s", dstname.Data());
12947 input->
Remove(inputdata);
12968 if (!inputdata)
return 0;
12972 emsg.
Form(
"input data file not found in sandbox (%s)", fname.Data());
12978 emsg.
Form(
"TProof object undefined or invalid: protocol error!");
12995 if (!input || !cachedir || strlen(cachedir) <= 0)
return 0;
12999 if (!inputdata)
return 0;
13004 emsg.
Form(
"input data file not found in cache (%s)", fname.
Data());
13010 added->
SetName(
"PROOF_InputObjsFromFile");
13016 emsg.
Form(
"could not get list of object keys from file");
13021 while ((k = (
TKey *)nxk())) {
13038 emsg.
Form(
"could not open %s", fname.
Data());
13051 if (!
gROOT->IsBatch()) {
13055 gROOT->GetPluginManager()->FindHandler(
"TProofProgressLog"))) {
13058 ::Error(
"TProof::LogViewer",
"cannot load the relevant plug-in");
13065 TString u = (url && strlen(url) <= 0) ?
"lite" : url;
13069 if (url && strlen(url) > 0) {
13070 ::Info(
"TProof::LogViewer",
13071 "batch mode: use TProofLog *pl = TProof::Mgr(\"%s\")->GetSessionLogs(%d)", url, idx);
13072 }
else if (url && strlen(url) <= 0) {
13073 ::Info(
"TProof::LogViewer",
13074 "batch mode: use TProofLog *pl = TProof::Mgr(\"lite\")->GetSessionLogs(%d)", idx);
13076 ::Info(
"TProof::LogViewer",
13077 "batch mode: use TProofLog *pl = TProof::Mgr(\"<master>\")->GetSessionLogs(%d)", idx);
13105 Warning(
"ShowMissingFiles",
"no (last) query found: do nothing");
13112 Info(
"ShowMissingFiles",
"no files missing in query %s:%s", xqr->
GetTitle(), xqr->
GetName());
13116 Int_t nmf = 0, ncf = 0;
13117 Long64_t msz = 0, mszzip = 0, mev = 0;
13120 TIter nxf(missing);
13141 if (msz <= 0) msz = -1;
13142 if (mszzip <= 0) mszzip = -1;
13144 if (msz > 0. || mszzip > 0.) {
13145 Printf(
" +++ %d file(s) missing, %d corrupted, i.e. %lld unprocessed events -->"
13146 " about %.2f%% of the total (%lld bytes, %lld zipped)",
13147 nmf, ncf, mev, xf * 100., msz, mszzip);
13149 Printf(
" +++ %d file(s) missing, %d corrupted, i.e. %lld unprocessed events -->"
13150 " about %.2f%% of the total", nmf, ncf, mev, xf * 100.);
13166 Warning(
"GetMissingFiles",
"no (last) query found: do nothing");
13174 Info(
"ShowMissingFiles",
"no files missing in query %s:%s", xqr->
GetTitle(), xqr->
GetName());
13184 while (
gDirectory->FindObject(fcname) && j < 1000)
13191 TIter nxf(missing);
13205 if (pf && strlen(pf) > 0) {
13209 if (withWrks)
SetParameter(
"PROOF_SlaveStatsTrace",
"");
13210 Info(
"SetPerfTree",
"saving of the performance tree enabled (%s)",
fPerfTree.
Data());
13216 Info(
"SetPerfTree",
"saving of the performance tree disabled");
13228 Error(
"SafePerfTree",
"this TProof instance is invalid!");
13234 if (ref && strlen(ref) > 0) {
13236 Error(
"SafePerfTree",
"requested to use query '%s' but player instance undefined!", ref);
13241 Error(
"SafePerfTree",
"TQueryResult instance for query '%s' could not be retrieved", ref);
13245 sref.
Form(
" for requested query '%s'", ref);
13247 if (!outls || (outls && outls->
GetSize() <= 0)) {
13248 Error(
"SafePerfTree",
"outputlist%s undefined or empty", sref.
Data());
13253 if (pf && strlen(pf)) fn = pf;
13254 if (fn.
IsNull()) fn =
"perftree.root";
13256 TFile f(fn,
"RECREATE");
13258 Error(
"SavePerfTree",
"could not open file '%s' for writing", fn.
Data());
13263 while ((obj = nxo())) {
13265 if (objname.BeginsWith(
"PROOF_")) {
13268 if (objname ==
"PROOF_PerfStats" ||
13269 objname ==
"PROOF_PacketsHist" ||
13270 objname ==
"PROOF_EventsHist" ||
13271 objname ==
"PROOF_NodeHist" ||
13272 objname ==
"PROOF_LatencyHist" ||
13273 objname ==
"PROOF_ProcTimeHist" ||
13274 objname ==
"PROOF_CpuTimeHist")
13280 Info(
"SavePerfTree",
"performance information%s saved in %s ...", sref.
Data(), fn.
Data());
const char * GetHost() const
const char * GetName() const
Returns name of object.
TList * GetListOfBadSlaves() const
virtual TQueryResult * GetQueryResult(const char *ref)=0
const char * GetSessionDir() const
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
void AddInputData(TObject *obj, Bool_t push=kFALSE)
Add data objects that might be needed during the processing of the selector (see Process()).
Int_t GetNumberOfUniqueSlaves() const
Return number of unique slaves, i.e.
virtual void DeleteDrawFeedback(TDrawFeedback *f)=0
Bool_t IsRetrieve() const
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
const char * GetDefaultTreeName() const
Returns the tree set with SetDefaultTreeName if set Returns the name of the first tree in the meta da...
Int_t HandleInputMessage(TSlave *wrk, TMessage *m, Bool_t deactonfail=kFALSE)
Analyze the received message.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual Int_t GetEntries() const
virtual void ShowData()
List contents of the data directory in the sandbox.
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 Int_t AddProcessed(TSlave *, TProofProgressStatus *, Double_t, TList **)
void AddFeedback(const char *name)
Add object to feedback list.
static void SystemCmd(const char *cmd, Int_t fdout)
Exec system command 'cmd'. If fdout > -1, append the output to fdout.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
void RecvLogFile(TSocket *s, Int_t size)
Receive the log file of the slave with socket s.
void Interrupt(EUrgent type, ESlaves list=kActive)
Send interrupt to master or slave servers.
void SetSessionTag(const char *st)
double read(const std::string &file_name)
reading
Ssiz_t Last(char c) const
Find last occurrence of a character c.
virtual Int_t SendGroupPriority(const char *, Int_t)
void Progress(Long64_t total, Long64_t processed)
Get query progress information.
const Long64_t kPROOF_DynWrkPollInt_s
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
virtual void SetAlias(const char *alias="")
Set an alias for this session.
const char * GetOutputFileName() const
virtual TList * GetInputList() const =0
virtual void WriteString(const char *s)
Write string to I/O buffer.
virtual TString SplitAclicMode(const char *filename, TString &mode, TString &args, TString &io) const
This method split a filename of the form: ~~~ {.cpp} [path/]macro.C[+|++[k|f|g|O|c|s|d|v|-]][(args)]...
virtual void AddOutput(TList *out)=0
virtual int GetPid()
Get process id.
virtual Long64_t GetSize() const
Returns the current file size.
const char * GetOrdinal() const
Int_t UnloadPackages()
Unload all packages.
const char *const kGUNZIP
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
void ActivateAsyncInput()
Activate the a-sync input handler.
void AskParallel()
Ask the for the number of parallel slaves.
const char * GetHostName() const
virtual TFileCollection * GetStagingStatusDataSet(const char *dataset)
Obtains a TFileCollection showing the staging status of the specified dataset.
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...
Bool_t R_ISLNK(Int_t mode)
Int_t ClearPackages()
Remove all packages.
virtual void Remove(TSocket *sock)
Remove a socket from the monitor.
TMonitor * fAllUniqueMonitor
void MarkBad(TSlave *wrk, const char *reason=0)
Add a bad slave server to the bad slave list and remove it from the active list and from the two moni...
virtual void AddInput(TObject *inp)=0
void Activate(TList *slaves=0)
Activate slave server list.
void RemoveChain(TChain *chain)
Remove chain from data set.
const char * GetDataDir() const
TSocket * GetSocket() const
virtual Bool_t ExistsDataSet(const char *dataset)
Returns kTRUE if 'dataset' exists, kFALSE otherwise.
static double p3(double t, double a, double b, double c, double d)
virtual ~TProof()
Clean up PROOF environment.
void PrepareInputDataFile(TString &dataFile)
Prepare the file with the input data objects to be sent the master; the objects are taken from the de...
R__EXTERN TProofDebug::EProofDebugMask gProofDebugMask
Int_t EnablePackage(const char *package, Bool_t notOnClient=kFALSE, TList *workers=0)
Enable specified package.
virtual void MarkBad(TSlave *, TProofProgressStatus *, TList **)
void ClearData(UInt_t what=kUnregistered, const char *dsname=0)
Remove files for the data directory.
void SetPerfTree(const char *pf="perftree.root", Bool_t withWrks=kFALSE)
Enable/Disable saving of the performance tree.
virtual const char * WorkingDirectory()
Return working directory.
virtual const char * GetName() const
Return name of this collection.
virtual Bool_t RegisterDataSet(const char *name, TFileCollection *dataset, const char *optStr="")
Register the 'dataSet' on the cluster under the current user, group and the given 'dataSetName'...
virtual Long64_t DrawSelect(TDSet *dset, const char *varexp, const char *selection="", Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Execute the specified drawing action on a data set (TDSet).
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.
Bool_t IsFinalized() const
void SetProtocol(const char *proto, Bool_t setDefaultPort=kFALSE)
Set protocol and, optionally, change the port accordingly.
void SetRealTimeLog(Bool_t on=kTRUE)
Switch ON/OFF the real-time logging facility.
virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, Bool_t resume=kFALSE)
Get list of workers to be used from now on.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
double write(int n, const std::string &file_name, const std::string &vector_type, int compress=0)
writing
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
virtual void FlushSocket()
const char Int_t const char TProof Int_t const char const char * msd
Collectable string class.
virtual void ls(Option_t *option="") const
List (ls) all objects in this collection.
virtual Double_t Rndm(Int_t i=0)
Machine independent random number generator.
virtual TVirtualProofPlayer * MakePlayer(const char *player=0, TSocket *s=0)
Construct a TProofPlayer object.
Int_t GetRemoteProtocol() const
virtual void Print(Option_t *option="") const
Print status of PROOF cluster.
void SetPrepTime(Float_t preptime)
virtual const char * GetBuildArch() const
Return the build architecture.
const char * GetUser() const
virtual Bool_t IsValid() const
void SetMonitor(TMonitor *mon=0, Bool_t on=kTRUE)
Activate (on == TRUE) or deactivate (on == FALSE) all sockets monitored by 'mon'. ...
const char * GetObjName() const
virtual Int_t Reconnect()
void InterruptCurrentMonitor()
If in active in a monitor set ready state.
void SetPasswd(const char *pw)
TObject * FindObject(const char *name) const
Find object using its name.
virtual void SetMaxDrawQueries(Int_t max)=0
virtual Bool_t StartSlaves(Bool_t attach=kFALSE)
Start up PROOF slaves.
void EmitVA(const char *signal_name, Int_t, const T &...params)
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
virtual void ShowDataSetCache(const char *dataset=0)
Display the content of the dataset cache, if any (matching 'dataset', if defined).
void ShowParameters(const char *wildcard="PROOF_*") const
Show the input list parameters specified by the wildcard.
This class represents a WWW compatible URL.
TString & ReplaceAll(const TString &s1, const TString &s2)
void SetupWorkersEnv(TList *wrks, Bool_t increasingpool=kFALSE)
Set up packages, loaded macros, include and lib paths ...
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
virtual Long64_t DrawSelect(TDSet *set, const char *varexp, const char *selection, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)=0
void SetPlayer(TVirtualProofPlayer *player)
Set a new PROOF player.
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
This class implements a data set to be used for PROOF processing.
Int_t GetNargs() const
Number of function arguments.
TList * GetOutputNames()
FIXME: to be written.
std::istream & ReadLine(std::istream &str, Bool_t skipWhite=kTRUE)
Read a line from stream upto newline skipping any whitespace.
virtual void SetName(const char *name)
Change (i.e.
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.
const char * GetProtocol() const
virtual TString GetFromPipe(const char *command)
Execute command and return output in TString.
virtual void FindUniqueSlaves()
Add to the fUniqueSlave list the active slaves that have a unique (user) file system image...
Int_t FindNextFreeMerger()
Return a merger, which is both active and still accepts some workers to be assigned to it...
void SetParameter(const char *par, const char *value)
Set input list parameter.
virtual void StoreFeedback(TObject *slave, TList *out)=0
TUrl * NextUrl()
Iterator function, start iteration by calling ResetUrl().
The PROOF manager interacts with the PROOF server coordinator to create or destroy a PROOF session...
void SetROOTVersion(const char *rv)
Double_t Atof() const
Return floating-point value contained in string.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
const char *const kPROOF_WorkDir
static const TList * GetEnvVars()
Get environemnt variables.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual EExitStatus GetExitStatus() const =0
virtual void Add()
Add signal handler to system signal handler list.
virtual Bool_t ReadBuffer(char *buf, Int_t len)
Read a buffer from the file.
virtual TFileCollection * GetDataSet(const char *dataset, const char *optStr="")
Get a list of TFileInfo objects describing the files of the specified dataset.
TList * GetOutputList()
Get list with all object created during processing (see Process()).
void SetArchCompiler(const char *ac)
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.
void ToUpper()
Change string to upper case.
virtual TFileCollection * GetDataSet(const char *uri, const char *server=0)
Utility function used in various methods for user dataset upload.
Regular expression class.
TFileCollection * GetMissingFiles(TQueryResult *qr=0)
Get a TFileCollection with the files missing in the query described by 'qr' or the last query if qr i...
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 Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection)...
TSlave * FindSlave(TSocket *s) const
Find slave that has TSocket s. Returns 0 in case slave is not found.
void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual Bool_t IsProofd() const
TMacro * GetLogFile() const
const char * GetConfFile() const
virtual void Add(TSocket *sock, Int_t interest=kRead)
Add socket to the monitor's active list.
virtual void StopProcess(Bool_t abort, Int_t timeout)
Sent stop/abort request to PROOF server.
Class supporting a collection of lines with C++ code.
const char * GetFileName() const
Int_t LoadPlugin()
Load the plugin library for this handler.
virtual void SetCurrentQuery(TQueryResult *q)=0
const char * GetOrdinal() const
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
const char * GetSessionTag() const
virtual void Add()
Add file event handler to system file handler list.
virtual void Progress(Long64_t total, Long64_t processed)=0
void SetDSet(TDSet *dset)
virtual void SetInterruptHandler(Bool_t)
TList * GetListOfActives() const
Returns a list with all active sockets.
virtual void SaveWorkerInfo()
Save information about the worker set in the file .workers in the working dir.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
void RemoveFeedback(const char *name)
Remove object from feedback list.
virtual Bool_t JoinProcess(TList *workers)=0
void SetProgressDialog(Bool_t on=kTRUE)
Enable/Disable the graphic progress dialog.
R__EXTERN TVirtualMutex * gROOTMutex
void LogMessage(const char *msg, Bool_t all)
Log a message into the appropriate window by emitting a signal.
virtual Int_t SendObject(const TObject *obj, Int_t kind=kMESS_OBJECT)
Send an object.
void SetQueryMode(EQueryMode mode)
Change query running mode to the one specified by 'mode'.
void SetUser(const char *user)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Int_t Broadcast(const TMessage &mess, TList *slaves)
Broadcast a message to all slaves in the specified list.
Int_t GetNumberOfBadSlaves() const
Return number of bad slaves.
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.
void ShowLog(Int_t qry=-1)
Display on screen the content of the temporary log file.
const char *const kPROOF_PackageLockFile
This class represents a RFC 3986 compatible URI.
Each ROOT method (see TMethod) has a linked list of its arguments.
void SetMaxDrawQueries(Int_t max)
Set max number of draw queries whose results are saved.
virtual FILE * OpenPipe(const char *command, const char *mode)
Open a pipe.
static TPluginHandler * fgLogViewer
TString & Prepend(const char *cs)
R__EXTERN TApplication * gApplication
Int_t ModifyWorkerLists(const char *ord, Bool_t add, Bool_t save)
Modify the worker active/inactive list by making the worker identified by the ordinal number 'ord' ac...
Bool_t IsEqual(const TObject *obj) const
Used to compare slaveinfos by ordinal.
virtual void DeActivateAll()
De-activate all activated sockets.
const char * GetGroup() const
const char * GetOptions() const
Long_t ExecPlugin(int nargs, const T &...params)
void PutLog(TQueryResult *qr)
Display log of query pq into the log window frame.
void CloseProgressDialog()
Close progress dialog.
Int_t GetNumberOfQueries()
Number of queries processed by this session.
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 <ord>, <user>, <u>, <group>, <stag>, <qnum>, <file>, <rver> and <build> placeholders in fname...
static void retrieve(const gsl_integration_workspace *workspace, double *a, double *b, double *r, double *e)
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.
void DisableGoAsyn()
Signal to disable related switches.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
Int_t SendObject(const TObject *obj, ESlaves list=kActive)
Send object to master or slave servers.
Int_t SendCurrentState(ESlaves list=kActive)
Transfer the current state of the master to the active slave servers.
TSignalHandler * GetSignalHandler() const
Int_t BroadcastRaw(const void *buffer, Int_t length, TList *slaves)
Broadcast a raw buffer of specified length to all slaves in the specified list.
const char *const kPROOF_PackDownloadDir
TVirtualProofPlayer * fPlayer
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t IsValid() const
const char * GetGroup() const
void SendParallel(Bool_t async=kFALSE)
Send number of parallel nodes to master or client.
virtual void DiscardSession(TProof *p)
Discard TProofDesc of session 'p' from the internal list.
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.
static TProofMgr * Mgr(const char *url)
Get instance of the effective manager for 'url' Return 0 on failure.
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 SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=0)
Set the value of a resource or create a new resource.
const char * GetObjName() const
virtual Bool_t Cp(const char *dst, Bool_t progressbar=kTRUE, UInt_t buffersize=1000000)
Allows to copy this file to the dst URL.
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
Int_t SavePerfTree(const char *pf=0, const char *qref=0)
Save performance information from TPerfStats to file 'pf'.
Bool_t fFinalizationRunning
void NotifyLogMsg(const char *msg, const char *sfx="\n")
Notify locally 'msg' to the appropriate units (file, stdout, window) If defined, 'sfx' is added after...
TFileHandler * GetInputHandler() const
virtual TObject * Clone(const char *newname="") const
Make a clone of an collection using the Streamer facility.
const char * Data() const
TSignalHandler * fIntHandler
Manages an element of a TDSet.
virtual TObject * ReadObject(const TClass *cl)
Read object from I/O buffer.
const TString & GetMsd() const
void AddMergedObjects(Int_t objects)
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
const char * GetDirectory() const
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.
TPluginHandler * fProgressDialog
virtual TList * GetOutputList() const =0
Int_t fLastAssignedMerger
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
Sequenceable collection abstract base class.
Double_t dot(const TVector2 &v1, const TVector2 &v2)
Bool_t fSendGroupView
list returned by kPROOF_GETSLAVEINFO
void Stop()
Stop the stopwatch.
virtual Bool_t IsOpen() const
Returns kTRUE in case file is open and kFALSE if file is not open.
virtual Bool_t CancelStagingDataSet(const char *dataset)
Cancels a dataset staging request.
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
const char * Export(Bool_t &changed)
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.
void UpdateDialog()
Final update of the progress dialog.
TList * fEnabledPackagesOnClient
THashList * fGlobalPackageDirList
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
TSlave * CreateSlave(const char *url, const char *ord, Int_t perf, const char *image, const char *workdir)
Create a new TSlave of type TSlave::kSlave.
This code implements the MD5 message-digest algorithm.
const char * GetMsd() const
The TNamed class is the base class for all named ROOT classes.
virtual void DeActivate(TSocket *sock)
De-activate a socket.
void SetLogLevel(Int_t level, UInt_t mask=TProofDebug::kAll)
Set server logging level.
virtual TDSetElement * GetNextPacket(TSlave *slave, TMessage *r)=0
Int_t DownloadPackage(const char *par, const char *dstdir=0)
Download a PROOF archive (PAR file) from the master package repository.
virtual char * ReadString(char *s, Int_t max)
Read string from I/O buffer.
EQueryMode GetQueryMode(Option_t *mode=0) const
Find out the query mode based on the current setting and 'mode'.
void DeActivateAsyncInput()
De-activate a-sync input handler.
UChar_t mod R__LOCKGUARD2(gSrvAuthenticateMutex)
virtual void ReleaseWorker(const char *)
virtual void ShowCache(Bool_t all=kFALSE)
List contents of file cache.
virtual Int_t Rm(const char *, const char *=0, const char *=0)
Run 'rm' on 'what'. Locally it is just a call to TSystem::Unlink .
ClassImp(TProof) Bool_t TProofInterruptHandler
TProof interrupt handler.
void Init(const TFunction *func)
Initialize the method invocation environment based on the TFunction object.
const char *const kPROOF_WorkerIdleTO
virtual const char * GetDynamicPath()
Return the dynamic path (used to find shared libraries).
Int_t BuildPackageOnClient(const char *package, Int_t opt=0, TString *path=0, Int_t chkveropt=kCheckROOT)
Build specified package on the client.
void SetWhat(UInt_t what)
Using this method one can change the message type a-posteriory.
void SetInputDataFile(const char *datafile)
Set the file to be used to optimally distribute the input data objects.
void ShowDataSet(const char *dataset="", const char *opt="filter:SsCc")
display meta-info for given dataset usi
static double p2(double t, double a, double b, double c)
TVirtualProofPlayer * GetPlayer() const
const char * GetMaster() const
Int_t LoadPackageOnClient(const char *package, TList *loadopts=0)
Load specified package in the client.
static TList * GetDataSetSrvMaps()
Static getter for server mapping list.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual UInt_t Integer(UInt_t imax)
Returns a random integer on [ 0, imax-1 ].
TProofLockPath * fPackageLock
Int_t Collect(const TSlave *sl, Long_t timeout=-1, Int_t endtype=-1, Bool_t deactonfail=kFALSE)
Collect responses from slave sl.
static void LogViewer(const char *url=0, Int_t sessionidx=0)
Start the log viewer window usign the plugin manager.
TList * GetListOfElements() const
void ResetMergePrg()
Reset the merge progress notificator.
A sorted doubly linked list.
void Info(const char *location, const char *msgfmt,...)
virtual TMap * GetDataSets(const char *uri="", const char *optStr="")
Lists all datasets that match given uri.
Int_t GoMoreParallel(Int_t nWorkersToAdd)
Add nWorkersToAdd workers to current list of workers.
Int_t Init(const char *masterurl, const char *conffile, const char *confdir, Int_t loglevel, const char *alias=0)
Start the PROOF environment.
virtual void ShowDataSets(const char *uri="", const char *optStr="")
Shows datasets in locations that match the uri.
virtual void AddEventsProcessed(Long64_t ev)=0
TString & Append(const char *cs)
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
virtual Int_t PollForNewWorkers()
Asks the PROOF Serv for new workers in Dynamic Startup mode and activates them.
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
void ShowFeedback() const
Show items in feedback list.
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
TSlave * CreateSubmaster(const char *url, const char *ord, const char *image, const char *msd, Int_t nwk=1)
Create a new TSlave of type TSlave::kMaster.
void Validate()
Validate the TDSet by opening files.
void ClearDataProgress(Int_t r, Int_t t)
Progress bar for clear data.
virtual TProofDesc * GetProofDesc(Int_t id)
Get TProofDesc instance corresponding to 'id'.
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.
TQueryResult * GetQueryResult(const char *ref=0)
Return pointer to the full TQueryResult instance owned by the player and referenced by 'ref'...
static TProof * Open(const char *url=0, const char *conffile=0, const char *confdir=0, Int_t loglevel=0)
Start a PROOF session on a specific cluster.
Bool_t IsParallel() const
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
Int_t UploadDataSet(const char *, TList *, const char *=0, Int_t=0, TList *=0)
*** This function is deprecated and will disappear in future versions *** *** It is just a wrapper ar...
virtual void SetOutputList(TList *out, Bool_t adopt=kTRUE)
Set / change the output list.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void Interrupt(Int_t type)
Send interrupt OOB byte to master or slave servers.
Method or function calling interface.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * GetWorkDir() const
void SetDirectory(const char *dir)
Set/change directory.
const Bool_t kSortDescending
friend class TProofInputHandler
virtual TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.
void SetSrvMaps(TList *srvmaps=0)
Set (or unset) the list for mapping servers coordinate for files.
A container class for query results.
TList * GetQueryResults()
Return pointer to the list of query results in the player.
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...
PrintProgress_t fPrintProgress
Long64_t GetEntries() const
TList * GetListOfSlaveInfos()
Returns list of TSlaveInfo's. In case of error return 0.
virtual void Close(Option_t *opt="")
Close slave socket.
const char * GetWorkDir() const
void Error(const char *location, const char *msgfmt,...)
static TList * fgProofEnvList
void HandleLibIncPath(const char *what, Bool_t add, const char *dirs)
Handle lib, inc search paths modification request.
virtual TList * GetListOfQueries(Option_t *opt="")
Ask the master for the list of queries.
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 .
void SetManager(TProofMgr *mgr)
Set manager and schedule its destruction after this for clean operations.
TObject * GetParameter(const char *par) const
Get specified parameter.
static Int_t PoDCheckUrl(TString *_cluster)
This a private API function.
void Emit(const char *signal)
Acitvate signal without args.
virtual Int_t GetFile(const char *, const char *, const char *=0)
Long64_t GetFirst() const
std::recursive_mutex fCloseMutex
void SetTermTime(Float_t termtime)
virtual TProof * AttachSession(Int_t, Bool_t=kFALSE)
Dummy version provided for completeness.
static TVirtualProofPlayer * Create(const char *player, TProof *p, TSocket *s=0)
Create a PROOF player.
virtual void SetStatus(Int_t st)
void ParseConfigField(const char *config)
The config file field may contain special instructions which need to be parsed at the beginning...
TProof()
Protected constructor to be used by classes deriving from TProof (they have to call Init themselves a...
virtual void ClearInput()=0
void AddInput(TObject *obj)
Add obj to the input list.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
Int_t UploadPackageOnClient(const char *package, EUploadPackageOpt opt, TMD5 *md5)
Upload a package on the client in ~/.proof/packages.
Int_t CleanupSession(const char *sessiontag)
Send cleanup request for the session specified by tag.
const char * GetProofWorkDir() const
Int_t GetSlaveType() const
void AddChain(TChain *chain)
Add chain to data set.
TMonitor * fUniqueMonitor
void SetMergedWorker()
Increase number of already merged workers by 1.
const char *const kPROOF_ConfFile
Int_t RestoreActiveList()
Restore saved list of active workers.
const TString & GetOrdinal() const
Int_t UnloadPackageOnClient(const char *package)
Unload a specific package on the client.
void cd(Int_t id=-1)
Set session with 'id' the default one.
Bool_t ElementsValid()
Check if all elements are valid.
Int_t Remove(Int_t query, Bool_t all=kFALSE)
Send remove request for the qry-th query in fQueries.
Int_t UploadPackage(const char *par, EUploadPackageOpt opt=kUntar, TList *workers=0)
Upload a PROOF archive (PAR file).
Int_t GetNumberOfActiveSlaves() const
Return number of active slaves, i.e.
const char Int_t const char TProof Int_t const char * workdir
virtual void AddQueryResult(TQueryResult *q)=0
const char * GetName() const
Returns name of object.
Int_t Archive(Int_t query, const char *url)
Send archive request for the qry-th query in fQueries.
Using a TBrowser one can browse all ROOT objects.
void InitMembers()
Default initializations.
Named parameter, streamable and storable.
virtual Bool_t Load() const
Load the macro into the interpreter.
friend class TProofInterruptHandler
TSocket * GetSocket() const
static void Reset(const char *url, Bool_t hard=kFALSE)
Wrapper around TProofMgr::Reset(...).
const TString & GetWorkDir() const
void DeleteDrawFeedback(TDrawFeedback *f)
Delete draw feedback object.
const char * GetName() const
Returns name of object.
virtual void Find(const char *="~/", const char *=0, const char *=0)
const char *const kPROOF_TerminateWorker
void QueryResultReady(const char *ref)
Notify availability of a query result.
virtual void HandleRecvHisto(TMessage *mess)=0
void SendDataSetStatus(const char *msg, UInt_t n, UInt_t tot, Bool_t st)
Send or notify data set status.
const char * GetFileName() const
virtual void Setenv(const char *name, const char *value)
Set environment variable.
The purpose of this class is to provide a complete node description for masters, submasters and worke...
virtual Long64_t Finalize(Bool_t force=kFALSE, Bool_t sync=kFALSE)=0
virtual TObject * GetOutput(const char *name) const =0
TString GetString() const
const char * GetPrefix() const
void Touch()
Ping PROOF slaves. Returns the number of slaves that responded.
TFileInfoMeta * GetMetaData(const char *meta=0) const
Get meta data object with specified name.
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.
Double_t length(const TVector2 &v)
virtual Bool_t RequestStagingDataSet(const char *dataset)
Allows users to request staging of a particular dataset.
R__EXTERN TSystem * gSystem
const TString GetUri() const
Returns the whole URI - an implementation of chapter 5.3 component recomposition. ...
static Int_t WriteChecksum(const char *file, const TMD5 *md5)
Writes checksum in ASCII format to specified file.
virtual Int_t Ping()
Ping the remote master or slave servers.
Int_t GetQueryReference(Int_t qry, TString &ref)
Get reference for the qry-th query in fQueries (as displayed by ShowQueries).
const char * GetName() const
Returns name of object.
virtual TProof * CreateSession(const char *=0, const char *=0, Int_t=-1)
Create a new remote session (master and associated workers).
void ShowDataSetQuota(Option_t *opt=0)
shows the quota and usage of all groups if opt contains "U" shows also distribution of usage on user-...
TList * GetListOfSlaves() const
TMonitor * fCurrentMonitor
Int_t BroadcastObject(const TObject *obj, Int_t kind, TList *slaves)
Broadcast an object to all slaves in the specified list.
Int_t Add(TFileInfo *info)
Add TFileInfo to the collection.
const char * GetDataPoolUrl() const
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.
Int_t GetLogLevel() const
TList * GetListOfLines() const
virtual void SetInitTime()=0
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.
const char *const kPROOF_ConfDir
Bool_t Gets(FILE *fp, Bool_t chop=kTRUE)
Read one line from the stream, including the , or until EOF.
void SaveActiveList()
Save current list of active workers.
Bool_t ParseUri(const char *uri, TString *dsGroup=0, TString *dsUser=0, TString *dsName=0, TString *dsTree=0, Bool_t onlyCurrent=kFALSE, Bool_t wildcards=kFALSE)
Parses a (relative) URI that describes a DataSet on the cluster.
virtual void SetDynamicPath(const char *pathname)
Set the dynamic path to a new value.
TObject * Remove(TObject *obj)
Remove object from the list.
Collection abstract base class.
void SetActive(Bool_t=kTRUE)
SysInfo_t GetSysInfo() const
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
virtual void ClearDataSetCache(const char *dataset=0)
Clear the content of the dataset cache, if any (matching 'dataset', if defined).
void GetMaxQueries()
Get max number of queries whose full results are kept in the remote sandbox.
virtual Int_t VerifyDataSet(const char *dataset, const char *optStr="")
Verify if all files in the specified dataset are available.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual void SetProof(Bool_t on=kTRUE, Bool_t refresh=kFALSE, Bool_t gettreeheader=kFALSE)
Enable/Disable PROOF processing on the current default Proof (gProof).
Bool_t TestBit(UInt_t f) const
char * Form(const char *fmt,...)
TObject * GetOutput(const char *name)
Get specified object that has been produced during the processing (see Process()).
Class to steer the merging of files produced on the workers.
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
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 Stat(const char *, FileStat_t &, const char *=0)
const char *const kUNTAR2
virtual const char * GetName() const
Returns name of object.
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...
TSubString Strip(EStripType s=kTrailing, char c= ' ') const
Return a substring of self stripped at beginning and/or end.
static void ResetEnvVars()
Clear the list of environment variables passed to proofserv on the master and slaves.
Bool_t CheckFile(const char *file, TSlave *sl, Long_t modtime, Int_t cpopt=(kCp|kCpBin))
Check if a file needs to be send to the slave.
virtual Int_t Reset(Bool_t hard=kFALSE, const char *usr=0)
Send a cleanup request for the sessions associated with the current user.
Bool_t SetFragment(const TString &fragment)
Set fragment component of URI: fragment = *( pchar / "/" / "?" ).
virtual Long64_t Process(TDSet *dset, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process a data set (TDSet) using the specified selector (.C) file or Tselector object Entry- or event...
Bool_t fProgressDialogStarted
virtual Int_t Exec(const char *shellcmd)
Execute a command.
const Int_t kPROOF_Protocol
Int_t SendGroupView()
Send to all active slaves servers the current slave group size and their unique id.
Int_t Exec(const char *cmd, ESlaves list, Bool_t plusMaster)
Send command to be executed on the PROOF master and/or slaves.
void SetStatus(ESlaveStatus stat)
virtual TObjLink * FirstLink() const
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.
R__EXTERN TRandom * gRandom
Long64_t GetEntries() const
void RedirectWorker(TSocket *s, TSlave *sl, Int_t output_size)
Redirect output of worker sl to some merger.
virtual void Activate(TSocket *sock)
Activate a de-activated socket.
void PrintProgress(Long64_t total, Long64_t processed, Float_t procTime=-1., Long64_t bytesread=-1)
Print a progress bar on stderr. Used in batch mode.
void ReleaseMonitor(TMonitor *mon)
Release the used monitor to be used, making sure to delete newly created monitors.
virtual void Unsetenv(const char *name)
Unset environment variable.
void DataSetStatus(const char *msg, Bool_t status, Int_t done, Int_t total)
Send dataset preparation status.
const char * GetUser() const
Int_t DisablePackageOnClient(const char *package)
Remove a specific package 'pack' from the client.
const char * GetImage() const
void AddInput(TObject *obj)
Add objects that might be needed during the processing of the selector (see Process()).
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.
TList * GetFeedbackList() const
Return feedback list.
const char * GetImage() const
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
TMacro * GetLastLog()
Fill a TMacro with the log lines since the last reading (fLogFileR) Return (TMacro *)0 if no line was...
Int_t VerifyDataSetParallel(const char *uri, const char *optStr)
Internal function for parallel dataset verification used TProof::VerifyDataSet and TProofLite::Verify...
Int_t RemoveDynamicPath(const char *libpath, Bool_t onClient=kFALSE)
Remove 'libpath' from the lib path search.
static TSlave * Create(const char *url, const char *ord, Int_t perf, const char *image, TProof *proof, Int_t stype, const char *workdir, const char *msd, Int_t nwk=1)
Static method returning the appropriate TSlave object for the remote server.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
void GoAsynchronous()
Send GOASYNC message to the master.
virtual void RemoveQueryResult(const char *ref)=0
virtual void SetAlias(const char *alias)
Set an alias for this session.
void ClearInputData(TObject *obj=0)
Remove obj form the input data list; if obj is null (default), clear the input data info...
Int_t SendCommand(const char *cmd, ESlaves list=kActive)
Send command to be executed on the PROOF master and/or slaves.
Int_t AssertPath(const char *path, Bool_t writable)
Make sure that 'path' exists; if 'writable' is kTRUE, make also sure that the path is writable...
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.
void Print(Option_t *option="") const
Print slave info.
Int_t LoadPackage(const char *package, Bool_t notOnClient=kFALSE, TList *loadopts=0, TList *workers=0)
Load specified package.
void SetHost(const char *host)
TString & Remove(Ssiz_t pos)
Float_t GetRealTime() const
The packetizer is a load balancing object created for each query.
TList * GetInputList()
Get input list.
virtual int Chmod(const char *file, UInt_t mode)
Set the file permission bits. Returns -1 in case or error, 0 otherwise.
Int_t HandleOutputOptions(TString &opt, TString &target, Int_t action)
Extract from opt information about output handling settings.
Bool_t AreAllWorkersAssigned()
Return if the determined number of workers has been already assigned to this merger.
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.
virtual TSignalHandler * RemoveSignalHandler(TSignalHandler *sh)
Remove a signal handler from list of signal handlers.
void Close(Option_t *option="")
Close all open slave servers.
TList * GetListOfActiveSlaves() const
virtual const char * GetIncludePath()
Get the list of include path.
virtual Int_t GetSize() const
void SetFeedback(TString &opt, TString &optfb, Int_t action)
Extract from opt in optfb information about wanted feedback settings.
virtual Bool_t IsLite() const
void SetDefaultTreeName(const char *treeName)
const char *const kPROOF_InputDataFile
TDrawFeedback * CreateDrawFeedback()
Draw feedback creation proxy.
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.
void DeleteParameters(const char *wildcard)
Delete the input list parameters specified by a wildcard (e.g.
TList * GetListOfMethodArgs()
Return list containing the TMethodArgs of a TFunction.
Int_t SetParallelSilent(Int_t nodes, Bool_t random=kFALSE)
Tell PROOF how many slaves to use in parallel.
virtual const char * GetName() const
Returns name of object.
Int_t GoParallel(Int_t nodes, Bool_t accept=kFALSE, Bool_t random=kFALSE)
Go in parallel mode with at most "nodes" slaves.
void SetObjName(const char *objname)
Set/change object name.
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.
Int_t Lock()
Locks the directory.
Int_t GetParallel() const
virtual void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt)=0
static Int_t GetInputData(TList *input, const char *cachedir, TString &emsg)
Get the input data from the file defined in the input list.
void ClearInput()
Clear input object list.
virtual void SetEntryList(TObject *aList)
Set entry (or event) list for this data set.
virtual void Remove()
Remove signal handler from system signal handler list.
void Feedback(TList *objs)
Get list of feedback objects.
TList * fNonUniqueMasters
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
virtual void SendInputDataFile()
Send the input data objects to the master; the objects are taken from the dedicated list and / or the...
TList * fEnabledPackagesOnCluster
This class controls a Parallel ROOT Facility, PROOF, cluster.
static RooMathCoreReg dummy
void Detach(Option_t *opt="")
Detach this instance to its proofserv.
Bool_t Contains(const char *name) const
virtual void SetInputList(TList *in, Bool_t adopt=kTRUE)
Set / change the input list.
Bool_t IsFloat() const
Returns kTRUE if string contains a floating point or integer number.
virtual TQueryResult * GetCurrentQuery() const =0
void SetRunStatus(ERunStatus rst)
virtual TTree * GetTreeHeader(TDSet *tdset)
Creates a tree header (a tree with nonexisting files) object for the DataSet.
TList * GetEnabledPackages() const
void ShowMissingFiles(TQueryResult *qr=0)
Show information about missing files during query described by 'qr' or the last query if qr is null (...
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.
Int_t GetSandbox(TString &sb, Bool_t assert=kFALSE, const char *rc=0)
Set the sandbox path from ' Proof.Sandbox' or the alternative var 'rc'.
void ShowQueries(Option_t *opt="")
Ask the master for the list of queries.
Int_t AddWorkers(TList *wrks)
Works on the master node only.
void SetArchived(const char *archfile)
Set (or update) query in archived state.
virtual void Remove()
Remove file event handler from system file handler list.
Bool_t AreAllWorkersMerged()
Return if merger has already merged all workers, i.e. if it has finished its merging job...
Long64_t Finalize(Int_t query=-1, Bool_t force=kFALSE)
Finalize the qry-th query in fQueries.
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Int_t Match(const TString &s, UInt_t start=0)
Runs a match on s against the regex 'this' was created with.
virtual void AddAfter(const TObject *after, TObject *obj)
Insert object after object after in the list.
const char * GetName() const
Returns name of object.
TString Getenv(const char *env, const char *ord="0")
Get value of environment variable 'env' on node 'ord'.
Int_t UnloadPackage(const char *package)
Unload specified package.
Mother of all ROOT objects.
Float_t GetCpuTime() const
Global functions class (global functions are obtained from CINT).
const char * GetPackageDir() const
void Print(Option_t *option="") const
Prints the contents of the TFileCollection.
const char Int_t const char TProof * proof
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
void CleanGDirectory(TList *ol)
Remove links to objects in list 'ol' from gDirectory.
Int_t GetNumberOfSlaves() const
Return number of slaves as described in the config file.
TList * GetListOfEnabledPackages()
Get from the master the list of names of the packages enabled.
TString fActiveSlavesSaved
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 SendingLogToWindow() const
void ShowEnabledPackages(Bool_t all=kFALSE)
List which packages are enabled.
Int_t GetRC(const char *RCenv, Int_t &env, const char *ord="0")
Get into 'env' the value of integer RC env variable 'rcenv' on node 'ord'.
TUrl * GetCurrentUrl() const
Return the current url.
Bool_t R_ISDIR(Int_t mode)
static void SetMacroPath(const char *newpath)
Set or extend the macro search path.
R__EXTERN TProofServ * gProofServ
Int_t UploadDataSetFromFile(const char *, const char *, const char *=0, Int_t=0, TList *=0)
*** This function is deprecated and will disappear in future versions *** *** It is just a wrapper ar...
virtual void Add(TObject *obj)
virtual TList * QuerySessions(Option_t *opt="S")
Get list of sessions accessible to this manager.
const char * GetConfDir() const
Wrapper for PCRE library (Perl Compatible Regular Expressions).
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
TMap * GetDataSetQuota(const char *optStr="")
returns a map of the quotas of all groups
const char * GetMsd() const
void Execute(const char *, const char *, int *=0)
Execute method on this object with the given parameter string, e.g.
Utility class to draw objects in the feedback list during queries.
Int_t GetActiveMergersCount()
Get the active mergers count.
TProofOutputList fOutputList
Int_t Compare(const void *item1, const void *item2)
Int_t Ping()
Ping PROOF. Returns 1 if master server responded.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
R__EXTERN Int_t gProofDebugLevel
A chain is a collection of files containg TTree objects.
void WriteObject(const TObject *obj)
Write object to message buffer.
void SetOptions(const char *opt)
void AskStatistics()
Ask the for the statistics of the slaves.
const TString & GetNodeName() const
const char *const kUNTAR3
void SetParam(Long_t l)
Add a long method parameter.
Int_t GetNumberOfInactiveSlaves() const
Return number of inactive slaves, i.e.
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
static TList * ParseDataSetSrvMaps(const TString &srvmaps)
Create a server mapping list from the content of 'srvmaps' Return the list (owned by the caller) or 0...
void ClearFeedback()
Clear feedback list.
Int_t SetParallel(Int_t nodes=-1, Bool_t random=kFALSE)
Tell PROOF how many slaves to use in parallel.
virtual int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE)
Copy a file.
const char * GetDir(Bool_t raw=kFALSE) const
void AddWorker(TSlave *sl)
Add new worker to the list of workers to be merged by this merger.
ClassImp(TSlaveInfo) Int_t TSlaveInfo const TSlaveInfo * si
Used to sort slaveinfos by ordinal.
Int_t GetClientProtocol() const
Int_t AddDynamicPath(const char *libpath, Bool_t onClient=kFALSE, TList *wrks=0, Bool_t doCollect=kTRUE)
Add 'libpath' to the lib path search.
const char * GetType() const
TList * GetListOfPackages()
Get from the master the list of names of the packages available.
virtual void AddIncludePath(const char *includePath)
Add includePath to the already set include path.
virtual Int_t AddOutputObject(TObject *obj)=0
TList * fAvailablePackages
A TTree object has a header with a name and a title.
void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt)
Set draw feedback option.
static void ResetErrno()
Static function resetting system error number.
Class describing a generic file including meta information.
Int_t SendInitialState()
Transfer the initial (i.e.
Int_t Retrieve(Int_t query, const char *path=0)
Send retrieve request for the qry-th query in fQueries.
TProofMgr::EServType fServType
void AttachList(TList *alist)
Attach to list 'alist'.
const AParamType & GetVal() const
TList * GetEnabledPackages() const
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual void ActivateAll()
Activate all de-activated sockets.
Abstract interface for the PROOF player.
TList * fTerminatedSlaveInfos
Int_t BroadcastGroupPriority(const char *grp, Int_t priority, ESlaves list=kAllUnique)
Broadcast the group priority to all workers in the specified list.
virtual Bool_t IsValid() const
void GetStatistics(Bool_t verbose=kFALSE)
Get statistics about CPU time, real time and bytes read.
TList * FindDataSets(const char *searchString, const char *optStr="")
Find datasets, returns in a TList all found datasets.
const char * GetImage() const
Bool_t Prompt(const char *p)
Prompt the question 'p' requiring an answer y,Y,n,N Return kTRUE is the answer was y or Y...
Double_t Sqrt(Double_t x)
virtual void ShowStagingStatusDataSet(const char *dataset, const char *optStr="filter:SsCc")
Like GetStagingStatusDataSet, but displays results immediately.
virtual Int_t RemoveDataSet(const char *dataset, const char *optStr="")
Remove the specified dataset from the PROOF cluster.
void AskForOutput(TSlave *sl)
Master asks for output from worker sl.
const Bool_t kIterBackward
Int_t GetPerfIndex() const
static TProofMgr * Create(const char *url, Int_t loglevel=-1, const char *alias=0, Bool_t xpd=kTRUE)
Static method returning the appropriate TProofMgr object using the plugin manager.
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...
Class describing a PROOF worker server.
Container class for processing statistics.
virtual Int_t SetDataSetTreeName(const char *dataset, const char *treename)
Set/Change the name of the default tree.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
const TString & GetImage() const
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.
TInetAddress GetInetAddress() const
void GetLog(Int_t start=-1, Int_t end=-1)
Ask for remote logs in the range [start, end].
void ResetProgressDialog(const char *sel, Int_t sz, Long64_t fst, Long64_t ent)
Reset progress dialog.
Int_t ClearPackage(const char *package)
Remove a specific package.
void SetString(const char *s)
virtual const char * GetTitle() const
Returns title of object.
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
Int_t SendPrint(Option_t *option="")
Send print command to master server.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
void StartupMessage(const char *msg, Bool_t status, Int_t done, Int_t total)
Send startup message.
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.
static int64_t push(FILE *fp, SOCKET sock, SSL *ssl, const char *buf, int64_t len)
Int_t GetParallel() const
Returns number of slaves active in parallel mode.
virtual Int_t SetupServ(Int_t stype, const char *conffile)
Init a PROOF slave object.
static void DelEnvVar(const char *name)
Remove an variable from the list of environment variables passed to proofserv on the master and slave...
TMonitor * fActiveMonitor
const char * GetUser() const
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write all objects in this collection.
virtual TList * GetListOfResults() const =0
virtual TVirtualPacketizer * GetPacketizer() const
void Browse(TBrowser *b)
Build the PROOF's structure in the browser.
virtual TObjString * AddLine(const char *text)
Add line with text in the list of lines of this macro.
Ssiz_t First(char c) const
Find first occurrence of a character c.
virtual void UpdateAutoBin(const char *name, Double_t &xmin, Double_t &xmax, Double_t &ymin, Double_t &ymax, Double_t &zmin, Double_t &zmax)=0
const char * GetFile() const
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
Int_t CollectInputFrom(TSocket *s, Int_t endtype=-1, Bool_t deactonfail=kFALSE)
Collect and analyze available input from socket s.
virtual TDrawFeedback * CreateDrawFeedback(TProof *p)=0
Long64_t fLastPollWorkers_s
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
Int_t BroadcastFile(const char *file, Int_t opt, const char *rfile, TList *wrks)
Broadcast file to all workers in the specified list.
const char * GetDirectory() const
Return directory where to look for object.
static Int_t SendInputData(TQueryResult *qr, TProof *p, TString &emsg)
Send the input data file to the workers.
virtual TObjString * GetLineWith(const char *text) const
Search the first line containing text.
TProof * GetProof() const
void HandleSubmerger(TMessage *mess, TSlave *sl)
Process a message of type kPROOF_SUBMERGER.
virtual void Close(Option_t *option="")
Close a file.
virtual TList * GetLists() const
const char Int_t const char * image
void SetOrdinal(const char *ord)
const char *const kPROOF_PackDir
void SetInputHandler(TFileHandler *ih)
Adopt and register input handler for this slave.
static Int_t AssertDataSet(TDSet *dset, TList *input, TDataSetManager *mgr, TString &emsg)
Make sure that dataset is in the form to be processed.
Bool_t CreateMerger(TSlave *sl, Int_t port)
Create a new merger.
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.