80#define kPEX_STOPPED 1001
81#define kPEX_ABORTED 1002
87class TAutoBinVal :
public TNamed {
89 Double_t fXmin, fXmax, fYmin, fYmax, fZmin, fZmax;
97 fZmin = zmin; fZmax = zmax;
104 zmin = fZmin; zmax = fZmax;
113class TDispatchTimer :
public TTimer {
127Bool_t TDispatchTimer::Notify()
129 if (
gDebug > 0) printf(
"TDispatchTimer::Notify: called!\n");
142class TProctimeTimer :
public TTimer {
156Bool_t TProctimeTimer::Notify()
158 if (
gDebug > 0) printf(
"TProctimeTimer::Notify: called!\n");
170class TStopTimer :
public TTimer {
188 :
TTimer(((to <= 0 || to > 864000) ? 10 : to * 1000),
kFALSE)
191 Info (
"TStopTimer",
"enter: %d, timeout: %d", abort, to);
197 Info (
"TStopTimer",
"timeout set to %s ms", fTime.AsString());
206Bool_t TStopTimer::Notify()
208 if (
gDebug > 0) printf(
"TStopTimer::Notify: called!\n");
228 : fAutoBins(0), fOutput(0), fSelector(0), fCreateSelObj(
kTRUE), fSelectorClass(0),
229 fFeedbackTimer(0), fFeedbackPeriod(2000),
230 fEvIter(0), fSelStatus(0),
231 fTotalEvents(0), fReadBytesRun(0), fReadCallsRun(0), fProcessedRun(0),
232 fQueryResults(0), fQuery(0), fPreviousQuery(0), fDrawQueries(0),
233 fMaxDrawQueries(1), fStopTimer(0), fDispatchTimer(0),
234 fProcTimeTimer(0), fProcTime(0),
236 fSaveMemThreshold(-1), fSavePartialResults(
kFALSE), fSaveResultsPerPacket(
kFALSE)
249 initLimitsFinder =
kTRUE;
291 Info (
"StopProcess",
"abort: %d, timeout: %d", abort, timeout);
296 if (abort ==
kTRUE) {
332 fStopTimer =
new TStopTimer(
this, abort, timeout);
336 Info (
"SetStopTimer",
"%s timer STARTED (timeout: %d)",
337 (abort ?
"ABORT" :
"STOP"), timeout);
340 Info (
"SetStopTimer",
"timer STOPPED");
351 Warning(
"AddQueryResult",
"query undefined - do nothing");
356 if (!(
q->IsDraw())) {
432 if (ref && strlen(ref) > 0) {
506 Info(
"ReinitSelector",
"query undefined - do nothing");
512 if (selec.
Length() <= 0) {
513 Info(
"ReinitSelector",
"selector name undefined - do nothing");
526 if (!stdselec && !compselec) {
533 TMD5 *md5icur = 0, *md5iold = 0, *md5hcur = 0, *md5hold = 0;
547 if (md5hcur && md5hold && md5icur && md5iold)
548 if (*md5hcur == *md5hold && *md5icur == *md5iold)
555 if (selc)
delete [] selc;
587 selec += opt(
id + 1, opt.
Length());
590 Info(
"ReinitSelector",
"problems locating or exporting selector files");
638 Info(
"ReinitSelector",
"compiled selector re-init failed:"
639 " automatic reload unsuccessful:"
640 " please load manually the correct library");
656 if (ipathold.
Length() > 0)
787 Info(
"SavePartialResults",
"partial result saving disabled");
793 Error(
"SavePartialResults",
"gProofServ undefined: something really wrong going on!!!");
797 Error(
"SavePartialResults",
"fOutput undefined: something really wrong going on!!!");
802 Info(
"SavePartialResults",
"start saving partial results {%d,%d,%d,%d}",
806 PDB(kOutput, 2)
Info(
"SavePartialResults",
"fEvIter: %p",
fEvIter);
809 PDB(kOutput, 2)
Info(
"SavePartialResults",
"list of packets: %p, sz: %d",
810 packets, (packets ? packets->
GetSize(): -1));
813 const char *oopt =
"UPDATE";
842 if (packetsDir) packetsDir->
cd();
852 while ((o = nxo())) {
856 if (!strncmp(o->
GetName(),
"PROOF_", 6))
continue;
860 if (!strcmp(o->
GetName(),
"MissingFiles"))
continue;
866 if (!
d || (
d && !
d->InheritsFrom(
"TFile"))) {
891 if (queryend) torm.
Add(o);
918 if (!strcmp(
TUrl(oname,
kTRUE).GetProtocol(),
"file")) {
931 oname.
Form(
"<datadir>/%s", baseName.
Data());
951 if (queryend && torm.
GetSize() > 0) {
958 Info(
"SavePartialResults",
"partial results saved to file");
969 if (selector_file && strlen(selector_file)) {
987 Error(
"AssertSelector",
"cannot load: %s", selector_file );
992 Info(
"AssertSelector",
"Processing via filename (%s)", selector_file);
994 Error(
"AssertSelector",
"no TSelector object define : cannot continue!");
997 Info(
"AssertSelector",
"Processing via TSelector object");
1028 PDB(kGlobal,1)
Info(
"Process",
"Enter");
1039 Error(
"Process",
"cannot assert the selector object");
1066 while ((
e = dset->
Next())) {
1074 Int_t useTreeCache = 1;
1076 if (useTreeCache > -1 && useTreeCache < 2)
1077 gEnv->
SetValue(
"ProofPlayer.UseTreeCache", useTreeCache);
1085 Int_t useParallelUnzip = 0;
1087 if (useParallelUnzip > -1 && useParallelUnzip < 2)
1088 gEnv->
SetValue(
"ProofPlayer.UseParallelUnzip", useParallelUnzip);
1091 Int_t dontCacheFiles = 0;
1093 if (dontCacheFiles == 1)
1106 opt =
gEnv->
GetValue(
"ProofPlayer.SavePartialResults", 0);
1119 Info(
"Process",
"memory threshold for saving objects to file set to %ld kB",
1122 Error(
"Process",
"cannot get SysInfo_t (!)");
1127 PDB(kLoop,1)
Info(
"Process",
"Call Begin(0)");
1132 PDB(kLoop,1)
Info(
"Process",
"Call Begin(0)");
1136 PDB(kLoop,1)
Info(
"Process",
"Call SlaveBegin(0)");
1144 Error(
"Process",
"exception %d caught", excode);
1151 Warning(
"Process",
"problems seetting up file-object swapping");
1160 Info(
"Process",
"Looping over Process()");
1187 TString lastMsg(
"(unfortunately no detailed info is available about current packet)");
1190 if (!
CheckMemUsage(singleshot, warnHWMres, warnHWMvir, wmsg)) {
1200 }
else if (!wmsg.
IsNull()) {
1204 TPair *currentElem = 0;
1231 lastMsg =
"check logs for possible stacktrace - last cycle:";
1235 lastMsg.
Form(
"while processing dset:'%s', file:'%s'"
1236 " - check logs for possible stacktrace - last event:", dset->
GetName(), fn.
Data());
1249 if (maxproctime > 0) {
1256 if (refnum < 0 && maxproctime <= 0) {
1257 wmsg.
Form(
"neither entries nor max proc time specified:"
1258 " risk of infinite loop: processing aborted");
1269 while (refnum < 0 || num--) {
1286 Info(
"Process",
"max proc time reached (%ld msecs): packet processing stopped:\n%s",
1287 maxproctime, lastMsg.
Data());
1305 Info(
"Process",
"Call ProcessCut(%lld)", entry);
1308 Info(
"Process",
"Call ProcessFill(%lld)", entry);
1313 Info(
"Process",
"Call Process(%lld)", entry);
1319 Info(
"Process",
"packet processing aborted following the"
1320 " selector settings:\n%s", lastMsg.
Data());
1329 if (!
CheckMemUsage(memlogfreq, warnHWMres, warnHWMvir, wmsg)) {
1366 Info(
"Process",
"received stop-process signal");
1370 Info(
"Process",
"received abort-process signal");
1373 Error(
"Process",
"exception %d caught", excode);
1382 TPair *currentElem = 0;
1385 delete currentElem->
Key();
1394 if (!wmsg.
IsNull())
Warning(
"Process",
"%s (%s)", wmsg.
Data(), shrc ?
"warn" :
"hwm");
1416 Warning(
"Process",
"problems saving the results to file");
1426 while ((o = nxo())) {
1432 const char *dir = of->
GetDir();
1433 if (!dir || (dir && strlen(dir) <= 0)) {
1435 }
else if (dir && strlen(dir) > 0) {
1437 if (!strcmp(u.
GetHost(),
"localhost") || !strcmp(u.
GetHost(),
"127.0.0.1") ||
1438 !strcmp(u.
GetHost(),
"localhost.localdomain")) {
1451 PDB(kLoop,1)
Info(
"Process",
"Call Terminate()");
1454 PDB(kLoop,1)
Info(
"Process",
"Call SlaveTerminate()");
1457 PDB(kLoop,1)
Info(
"Process",
"Call Terminate()");
1490 Error(
"Process",
"selector object undefiend!");
1517 if (mfreq > 0 && processed%mfreq == 0) {
1523 Info(
"CheckMemUsage|Svc",
"Memory %ld virtual %ld resident event %lld",
1524 pi.fMemVirtual,
pi.fMemResident, processed);
1530 wmsg.
Form(
"using more than %d%% of allowed virtual memory (%ld kB)"
1536 wmsg.
Form(
"using more than %d%% of allowed virtual memory (%ld kB)",
1544 wmsg.
Form(
"using more than %d%% of allowed resident memory (%ld kB)"
1551 wmsg.
Form(
"using more than %d%% of allowed both virtual and resident memory ({%ld,%ld} kB)",
1554 wmsg.
Form(
"using more than %d%% of allowed resident memory (%ld kB)",
1702 if (!gDrawCanvasHook) {
1704 TString drawlib =
"libProofDraw";
1714 Warning(
"DrawCanvas",
"can't find DrawCanvas");
1716 Warning(
"DrawCanvas",
"can't load %s", drawlib.
Data());
1718 Warning(
"DrawCanvas",
"can't locate %s", drawlib.
Data());
1720 if (gDrawCanvasHook && obj)
1721 return (*gDrawCanvasHook)(obj);
1734 static Int_t (*gGetDrawArgsHook)(
const char *,
const char *,
Option_t *,
1738 if (!gGetDrawArgsHook) {
1740 TString drawlib =
"libProofDraw";
1748 gGetDrawArgsHook = (
Int_t (*)(
const char *,
const char *,
Option_t *,
1751 Warning(
"GetDrawArgs",
"can't find GetDrawArgs");
1753 Warning(
"GetDrawArgs",
"can't load %s", drawlib.
Data());
1755 Warning(
"GetDrawArgs",
"can't locate %s", drawlib.
Data());
1757 if (gGetDrawArgsHook)
1758 return (*gGetDrawArgsHook)(var, sel, opt, selector, objname);
1768 static void (*gFeedBackCanvasHook)(
const char *,
Bool_t) = 0;
1771 if (!gFeedBackCanvasHook) {
1773 TString drawlib =
"libProofDraw";
1781 gFeedBackCanvasHook = (
void (*)(
const char *,
Bool_t))(
f);
1783 Warning(
"FeedBackCanvas",
"can't find FeedBackCanvas");
1785 Warning(
"FeedBackCanvas",
"can't load %s", drawlib.
Data());
1787 Warning(
"FeedBackCanvas",
"can't locate %s", drawlib.
Data());
1789 if (gFeedBackCanvasHook) (*gFeedBackCanvasHook)(
name, create);
1821 if (fNumMergers <= 0 && fProof->fMergersCount > 0)
1857 Error(
"Process",
"selector object undefiend!");
1918 const char *defpackdata)
1921 PDB(kGlobal,1)
Info(
"Process",
"Enter");
1926 Int_t honebyone = 1;
1928 honebyone =
gEnv->
GetValue(
"ProofPlayer.MergeTH1OneByOne", 1);
1934 TList *listOfMissingFiles = 0;
1943 packetizer = defpackunit;
1945 Info(
"InitPacketizer",
"using alternate packetizer: %s", packetizer.
Data());
1950 Error(
"InitPacketizer",
"class '%s' not found", packetizer.
Data());
1958 Error(
"InitPacketizer",
1959 "cannot find correct constructor for '%s'", cl->
GetName());
1974 Error(
"InitPacketizer",
"received stop/abort request");
1980 packetizer =
"TPacketizerMulti";
1985 Error(
"InitPacketizer",
"class '%s' not found", packetizer.
Data());
1993 Error(
"InitPacketizer",
"cannot find correct constructor for '%s'", cl->
GetName());
2019 listOfMissingFiles =
new TList;
2028 Error(
"InitPacketizer",
"received stop/abort request");
2037 Error(
"InitPacketizer",
"No files from the data set were found - Aborting");
2039 if (listOfMissingFiles) {
2049 packetizer = defpackdata;
2051 Info(
"InitPacketizer",
"using alternate packetizer: %s", packetizer.
Data());
2056 Error(
"InitPacketizer",
"class '%s' not found", packetizer.
Data());
2064 Error(
"InitPacketizer",
"cannot find correct constructor for '%s'", cl->
GetName());
2085 Error(
"InitPacketizer",
"cannot construct '%s'", cl->
GetName());
2091 Error(
"InitPacketizer",
2092 "instantiated packetizer object '%s' is invalid", cl->
GetName());
2113 if (!listOfMissingFiles)
2114 listOfMissingFiles =
new TList;
2124 if (listOfMissingFiles && listOfMissingFiles->
GetSize() > 0) {
2125 TIter missingFiles(listOfMissingFiles);
2131 msg =
Form(
"File not found: %s - skipping!",
2134 msg =
Form(
"File not found: %s - skipping!", fi->
GetName());
2141 listOfMissingFiles->
SetName(
"MissingFiles");
2151 msg =
Form(
" About %.2f %c of the requested files (%d out of %d) were missing or unusable; details in"
2152 " the 'missingFiles' list", xb * 100.,
'%', nbad, nbad + ngood);
2155 " +++ About %.2f %c of the requested files (%d out of %d) are missing or unusable; details in"
2156 " the 'MissingFiles' list\n"
2157 " +++", xb * 100.,
'%', nbad, nbad + ngood);
2179 PDB(kGlobal,1)
Info(
"Process",
"Enter");
2185 Error(
"Process",
"No progress status");
2222 TList *inputtmp = 0;
2226 PDB(kPacketizer,1)
Info(
"Process",
"Create Proxy TDSet");
2233 Error(
"Process",
"cannot init the packetizer");
2248 if (clf.
IsDigit()) { memlogfreq = clf.
Atoi(); mrc = 0; }
2251 if (memlogfreq == 0) {
2253 if (memlogfreq <= 0) memlogfreq = 1;
2261 Warning(
"Process",
"could not forward input data: %s", emsg.
Data());
2266 Warning(
"Process",
"could not attach to histogram 'PROOF_ProcPcktHist'");
2269 Info(
"Process",
"attached to histogram 'PROOF_ProcPcktHist' to record"
2270 " packets being processed");
2304 Info(
"Process",
"starting new query");
2327 while ((o = nxi())) {
2331 inputtmp =
new TList;
2345 PDB(kLoop,1)
Info(
"Process",
"Call Begin(0)");
2380 mesg << set << fn <<
fInput << opt << num << fst << evl << sync << enl;
2381 (*fProcessMessage) << set << fn <<
fInput << opt << num << fst << evl << sync << enl;
2383 mesg << set << fn <<
fInput << opt << num << fst << evl << sync;
2386 Warning(
"Process",
"entry lists not supported by the server");
2393 PDB(kGlobal,1)
Info(
"Process",
"Broadcast called: %d workers notified", nb);
2406 Info(
"Process|Svc",
"Start merging Memory information");
2413 PDB(kGlobal,1)
Info(
"Process",
"Asynchronous processing:"
2414 " activating CollectInputFrom");
2423 PDB(kGlobal,1)
Info(
"Process",
"Calling Collect");
2448 PDB(kGlobal,1)
Info(
"Process",
"Synchronous processing: calling Collect");
2452 Info(
"Process",
"switching to the asynchronous mode ...");
2490 TIter nxi(inputtmp);
2512 Error(
"Process",
"selector object undefined");
2537 Error(
"Process",
"Should not happen: fProcessMessage=%p fProof=%p fPacketizer=%p",
2543 Error(
"Process",
"Invalid call");
2548 Info(
"Process",
"Preparing %d new worker(s) to process", workers->
GetEntries());
2563 Info(
"Process",
"Adding new workers to the packetizer");
2565 Error(
"Process",
"Cannot add new workers to the packetizer!");
2570 Info(
"Process",
"Broadcasting process message to new workers");
2593 while ((o = nxo())) {
2604 Error(
"MergeOutputFiles",
"file merger is null in TProofOutputFile! Protocol error?");
2622 if (outfile.
Contains(
"<datadir>/")) {
2668 outfilerem.
Insert(0, srv);
2676 Error(
"MergeOutputFiles",
"cannot open the output file");
2681 if (!filemerger->
Merge()) {
2682 Error(
"MergeOutputFiles",
"cannot merge the output files");
2688 TIter next(fileList);
2700 filemerger->
Reset();
2710 pf->
Merge(&dumlist);
2715 Error(
"MergeOutputFiles",
"file collection is null in TProofOutputFile! Protocol error?");
2736 if (!rmList) rmList =
new TList;
2745 if (rmList && rmList->
GetSize() > 0) {
2748 while((o = nxo())) {
2755 PDB(kOutput,1)
Info(
"MergeOutputFiles",
"done!");
2772 PDB(kOutput,1)
Warning(
"SetSelectorDataMembersFromOutputList",
2773 "failed to find map object in output list!");
2795 PDB(kGlobal,1)
Info(
"Finalize",
"Calling Merge Output to finalize the output list");
2814 PDB(kOutput,1)
Info(
"Finalize",
"Calling Merge Output");
2838 if (!listOfMissingFiles) {
2839 listOfMissingFiles =
new TList;
2840 listOfMissingFiles->
SetName(
"MissingFiles");
2866 Info(
"Finalize",
"problems reinitializing selector \"%s\"",
2875 failedPackets->SetName(
"FailedPackets");
2880 status->
Add(
"Some packets were not processed! Check the the"
2881 " 'FailedPackets' list in the output list");
2890 while(
TObject* obj = next()) {
2897 Warning(
"Finalize",
"undefined output list in the selector! Protocol error?");
2909 PDB(kLoop,1)
Info(
"Finalize",
"Call Terminate()");
2931 Warning(
"Finalize",
"current TQueryResult object is undefined!");
2961 PDB(kGlobal,1)
Info(
"Process",
"exit");
2976 PDB(kGlobal,1)
Info(
"Finalize(TQueryResult *)",
"Enter");
2979 Info(
"Finalize(TQueryResult *)",
2980 "method to be executed only on the clients");
2985 Info(
"Finalize(TQueryResult *)",
"query undefined");
2990 Info(
"Finalize(TQueryResult *)",
"query already finalized");
3014 Info(
"Finalize(TQueryResult *)",
"outputlist is empty");
3048 if (!selector_file) {
3049 Info(
"SendSelector",
"Invalid input: selector (file) name undefined");
3055 Info(
"SendSelector",
"selector name '%s' does not contain a '.':"
3056 " nothing to send, it will be loaded from a library", selector_file);
3061 TString selec = selector_file;
3093 Info(
"SendSelector",
3094 "header file not found: tried: %s %s",
h.Data(), header.
Data());
3101 Info(
"SendSelector",
"problems sending implementation file %s", selec.
Data());
3105 Info(
"SendSelector",
"problems sending header file %s", header.
Data());
3117 PDB(kOutput,1)
Info(
"MergeOutput",
"Enter");
3125 while ( (list = (
TList *) next()) ) {
3128 obj = list->
First();
3133 if ( list->
IsEmpty() )
continue;
3143 while ( (obj = list->
First()) ) {
3153 PDB(kOutput,1)
Info(
"MergeOutput",
"fOutputLists empty");
3170 while ((obj = nxo())) {
3174 PDB(kOutput,2)
Info(
"MergeOutput",
"found TProofOutputFile '%s'", obj->
GetName());
3176 PDB(kOutput,2)
Info(
"MergeOutput",
"outputfilename: '%s'", dir.
Data());
3179 PDB(kOutput,2)
Info(
"MergeOutput",
"dir: '%s'", dir.
Data());
3188 PDB(kOutput,2)
Info(
"MergeOutput",
"rawdir: '%s'", dir.
Data());
3223 PDB(kOutput,2)
Info(
"MergeOutput",
"output object '%s' is not a TProofOutputFile", obj->
GetName());
3229 TIter nxrm(&rmlist);
3230 while ((obj = nxrm()))
3237 if (saveMemValues) {
3274 Info(
"Progress",
"%lld %lld %lld %f %f %f %f",
total, processed, bytesread,
3275 initTime, procTime, evtrti, mbrti);
3282 m <<
total << processed << bytesread << initTime << procTime << evtrti << mbrti;
3294 Info(
"Progress",
"%lld %lld %lld %f %f %f %f %d %f",
pi->fTotal,
pi->fProcessed,
pi->fBytesRead,
3295 pi->fInitTime,
pi->fProcTime,
pi->fEvtRateI,
pi->fMBRateI,
3296 pi->fActWorkers,
pi->fEffSessions);
3300 pi->fInitTime,
pi->fProcTime,
3301 pi->fEvtRateI,
pi->fMBRateI,
3302 pi->fActWorkers,
pi->fTotSessions,
pi->fEffSessions);
3310 Warning(
"Progress",
"TProofProgressInfo object undefined!");
3348 Info(
"AddOutputObject",
"Enter: %p (%s)", obj, obj ? obj->
ClassName() :
"undef");
3352 PDB(kOutput,1)
Info(
"AddOutputObject",
"Invalid input (obj == 0x0)");
3365 if (elists && !strcmp(elists->
GetName(),
"PROOF_EventListsList")) {
3372 TIter nxevl(elists);
3374 while ((evl =
dynamic_cast<TEventList *
> (nxevl()))) {
3380 while ((elem =
dynamic_cast<TDSetElement *
> (nxelem()))) {
3385 Error(
"AddOutputObject",
"Found an event list for %s, but no object with"
3386 " the same name in the TDSet", evl->
GetName());
3394 if (arr && offset > 0)
3395 for (
Int_t i = 0; i < num; i++)
3461 if (!of.
EndsWith(
".merger")) of +=
".merger";
3483 return (merged ? 1 : 0);
3510 PDB(kOutput,1)
Info(
"AddOutput",
"Enter");
3514 PDB(kOutput,1)
Info(
"AddOutput",
"Invalid input (out == 0x0)");
3532 TIter nxevl(elists);
3534 while ((evl =
dynamic_cast<TEventList *
> (nxevl()))) {
3540 while ((elem =
dynamic_cast<TDSetElement *
> (nxelem()))) {
3545 Error(
"AddOutput",
"Found an event list for %s, but no object with"
3546 " the same name in the TDSet", evl->
GetName());
3554 if (arr && offset > 0)
3555 for (
Int_t i = 0; i < num; i++)
3576 while ((obj = nxo())) {
3602 Info(
"NotifyMemory|Svc",
"Memory %ld virtual %ld resident after merging object %s",
3635 Info(
"Incorporate",
"enter: obj: %p (%s), list: %p",
3636 newobj, newobj ? newobj->
ClassName() :
"undef", outlist);
3639 if (!newobj || !outlist) {
3640 Error(
"Incorporate",
"Invalid inputs: obj: %p, list: %p", newobj, outlist);
3650 PDB(kOutput,1)
Info(
"Incorporate",
"histogram object '%s' merged", newobj->
GetName());
3652 PDB(kOutput,1)
Info(
"Incorporate",
"histogram object '%s' added to the"
3653 " appropriate list for delayed merging", newobj->
GetName());
3664 outlist->
Add(newobj);
3685 outlist->
Add(newobj);
3698 TH1 *
h =
dynamic_cast<TH1 *
>(obj);
3712 Int_t nent =
h->GetBufferLength();
3713 PDB(kOutput,2)
Info(
"HandleHistogram",
"h:%s ent:%d, buffer size: %d",
3714 h->GetName(), nent,
h->GetBufferSize());
3719 PDB(kOutput,2)
Info(
"HandleHistogram",
"create fOutputLists");
3744 while ((href = (
TH1 *) nxh())) {
3759 while ((href = (
TH1 *) nxh())) {
3780 Int_t hsz =
h->GetNbinsX() *
h->GetNbinsY() *
h->GetNbinsZ();
3815 if (!h0 || !
h1)
return rc;
3817 TAxis *a0 = 0, *a1 = 0;
3822 if (a0->
GetNbins() == a1->GetNbins())
3831 if (a0->
GetNbins() == a1->GetNbins())
3841 if (a0->
GetNbins() == a1->GetNbins())
3855 PDB(kOutput,1)
Info(
"StoreOutput",
"Enter");
3858 PDB(kOutput,1)
Info(
"StoreOutput",
"Leave (empty)");
3866 PDB(kOutput,2)
Info(
"StoreOutput",
"Create fOutputLists");
3878 while ( (aList =
dynamic_cast<TEventList*
> (it())) ) {
3882 while ( (elem =
dynamic_cast<TDSetElement*
> (nxe())) ) {
3887 Error(
"StoreOutput",
"found the EventList for %s, but no object with that name "
3888 "in the TDSet", aList->
GetName());
3897 for (
int i = 0; i < num; i++)
3900 mainList->
Add(aList);
3906 while( (obj = next()) ) {
3907 PDB(kOutput,2)
Info(
"StoreOutput",
"find list for '%s'", obj->
GetName() );
3911 PDB(kOutput,2)
Info(
"StoreOutput",
"list for '%s' not found (creating)", obj->
GetName());
3921 PDB(kOutput,1)
Info(
"StoreOutput",
"leave");
3930 Info(
"MergeFeedback",
"Enter");
3934 Info(
"MergeFeedback",
"Leave (no output)");
3944 while ( (map = (
TMap*) next()) ) {
3954#ifndef R__TH1MERGEFIXED
3958 while (
TObject *key = keys() ) {
3960 TH1 *
h =
dynamic_cast<TH1 *
>(o);
3961#ifndef R__TH1MERGEFIXED
3966 if (
h && !strncmp(o->
GetName(),
"PROOF_",6)) {
3967 if (
h->GetNbinsX() > nbmx) {
3968 nbmx=
h->GetNbinsX();
3976 while ((href = (
TH1 *)nxh())) {
3977 if (
h->GetBuffer()) {
3994#ifdef R__TH1MERGEFIXED
4017 while ( (obj = list->
First()) ) {
4027 Info(
"MergeFeedback",
"Leave (%d object(s))", fb->
GetSize());
4038 Info(
"StoreFeedback",
"Enter");
4042 Info(
"StoreFeedback",
"Leave (empty)");
4054 PDB(kFeedback,2)
Info(
"StoreFeedback",
"Create fFeedbackLists");
4062 const char *ord = ((
TSlave*) slave)->GetOrdinal();
4065 while( (obj = next()) ) {
4067 Info(
"StoreFeedback",
"%s: Find '%s'", ord, obj->
GetName() );
4071 Info(
"StoreFeedback",
"%s: map for '%s' not found (creating)", ord, obj->
GetName());
4078 Info(
"StoreFeedback",
"%s: removing previous value", ord);
4083 map->
Add(slave, obj);
4090 Info(
"StoreFeedback",
"Leave");
4102 PDB(kFeedback,1)
Info(
"SetupFeedback",
"\"FeedbackList\" %sfound",
4123 PDB(kFeedback,1)
Info(
"StopFeedback",
"Stop Timer");
4133 PDB(kFeedback,2)
Info(
"HandleTimer",
"Entry");
4171 PDB(kFeedback,2)
Info(
"HandleTimer",
"Sending %d objects", fb->
GetSize());
4212 Info(
"GetNextPacket",
"%s (%s): '%s' '%s' '%s' %lld %lld",
4214 e->GetDirectory(),
e->GetObjName(),
e->GetFirst(),
e->GetNum());
4234 const char *selection,
Option_t *option,
4253 if (
GetDrawArgs(varexp, selection, option, selector, objname) != 0) {
4254 Error(
"DrawSelect",
"parsing arguments");
4259 TNamed *selectionobj =
new TNamed(
"selection", selection);
4265 while ((o = nxi())) {
4277 if (objname ==
"") objname =
"htemp";
4291 delete selectionobj;
4295 TIter nxsi(savedInput);
4296 while ((o = nxsi()))
4326 Info(
"SetupFeedback",
"\"FeedbackList\" found: %d objects", fb->
GetSize());
4329 Info(
"SetupFeedback",
"\"FeedbackList\" NOT found");
4332 if (fb == 0 || fb->
GetSize() == 0)
return;
4353 PDB(kFeedback,1)
Info(
"StopFeedback",
"Stop Timer");
4363 PDB(kFeedback,2)
Info(
"HandleTimer",
"Entry");
4400 if (o != 0) fb->
Add(o);
4404 PDB(kFeedback,2)
Info(
"HandleTimer",
"Sending %d objects", fb->
GetSize());
4434 PDB(kGlobal, 1)
Info(
"HandleGetTreeHeader",
"empty TDSet");
4439 t = (
TTree*)
f->Get(
e->GetObjName());
4446 while ((
e = dset->
Next()) != 0) {
4451 entries +=
t1->GetEntries();
4462 answ <<
TString(
"Success") << t;
4464 answ <<
TString(
"Failed") << t;
4487 PDB(kGlobal,1)
Info(
"Process",
"Enter");
4490 if (!proof)
return -1;
4498 Error(
"Process",
"sending selector %s", selector_file);
4511 Error(
"Process",
"could not validate TDSet");
4526 while (
TSlave *sl =
dynamic_cast<TSlave*
>(nextslave())) {
4527 TList *submasters = 0;
4530 submasters =
new TList;
4531 submasters->
SetName(sl->GetMsd());
4532 keyholder.
Add(submasters);
4535 valueholder.
Add(setelements);
4536 msds.
Add(
new TPair(submasters, setelements));
4538 submasters =
dynamic_cast<TList*
>(msd->
Key());
4540 if (submasters) submasters->
Add(sl);
4548 if (elem->GetNum()<1)
continue;
4555 if (cur+elem->GetNum()-1<
first) {
4557 cur+=elem->GetNum();
4563 elem->SetNum(elem->GetNum()-(
first-cur));
4564 elem->SetFirst(elem->GetFirst()+
first-cur);
4569 cur+=elem->GetNum();
4578 Error(
"Process",
"data requires mass storage domain '%s'"
4579 " which is not accessible in this proof session",
4584 if (elements) elements->
Add(elem);
4590 while (
TPair *msd =
dynamic_cast<TPair*
>(nextmsd())) {
4591 TList *submasters =
dynamic_cast<TList*
>(msd->Key());
4592 TList *setelements =
dynamic_cast<TList*
>(msd->Value());
4595 Int_t nmasters = submasters ? submasters->
GetSize() : -1;
4596 Int_t nelements = setelements ? setelements->
GetSize() : -1;
4597 for (
Int_t i=0; i<nmasters; i++) {
4602 for (
Int_t j = (i*nelements)/nmasters;
4603 j < ((i+1)*nelements)/nmasters;
4613 Warning(
"Process",
"not a TDSetElement object");
4625 PDB(kGlobal,1)
Info(
"Process",
4626 "Sending TDSet with %d elements to submaster %s",
4630 usedmasters.
Add(sl);
4655 Warning(
"Process",
"not a TSlave object");
4662 PDB(kGlobal,1)
Info(
"Process",
"Calling Collect");
4670 PDB(kGlobal,1)
Info(
"Process",
"Calling Merge Output");
4686 Warning(
"Progress",
"total events has changed for slave %s", sl->
GetName());
4707 Info(
"Progress",
"%s: %lld %lld %f %f %f %f", sl->
GetName(),
4708 processed, bytesread, initTime, procTime, evtrti, mbrti);
4712 Warning(
"Progress",
"total events has changed for slave %s", sl->
GetName());
4754 srti = (nsrti > 0) ? srti / nerti : 0.;
4766 Info(
"Progress",
"%s: %lld %lld %lld %f %f %f %f %d %f", wrk->
GetOrdinal(),
4767 pi->fTotal,
pi->fProcessed,
pi->fBytesRead,
4768 pi->fInitTime,
pi->fProcTime,
pi->fEvtRateI,
pi->fMBRateI,
4769 pi->fActWorkers,
pi->fEffSessions);
4773 Warning(
"Progress",
"total events has changed for worker %s", wrk->
GetName());
4820 pisum.fMBRateI = (nsrti > 0) ? pisum.fMBRateI / nerti : 0.;
4866 erti = (nerti > 0) ? erti / nerti : 0.;
4867 srti = (nsrti > 0) ? srti / nerti : 0.;
4878 m << tot << proc << bytes <<
init << ptime << erti << srti;
void Info(const char *location, const char *msgfmt,...)
R__EXTERN Int_t gErrorIgnoreLevel
ErrorHandlerFunc_t SetErrorHandler(ErrorHandlerFunc_t newhandler)
Set an errorhandler function. Returns the old handler.
void Throw(int code)
If an exception context has been set (using the TRY and RETRY macros) jump back to where it was set.
static unsigned int total
const Bool_t kSortDescending
R__EXTERN TProofServ * gProofServ
char * Form(const char *fmt,...)
void Printf(const char *fmt,...)
typedef void((*Func_t)())
R__EXTERN TSystem * gSystem
R__EXTERN TVirtualMonitoringWriter * gMonitoringWriter
static struct mg_connection * fc(struct mg_context *ctx)
void Set(Int_t n)
Set size of this array to n floats.
void Set(Int_t n)
Set size of this array to n ints.
void Set(Int_t n)
Set size of this array to n long64s.
Class to manage histogram axis.
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual TObject * ReadObject(const TClass *cl)
Read object from I/O buffer.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual void ls(Option_t *option="") const
List (ls) all objects in this collection.
virtual const char * GetName() const
Return name of this collection.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
void SetName(const char *name)
virtual Int_t GetEntries() const
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Bool_t IsEmpty() const
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write all objects in this collection.
Manages an element of a TDSet.
TFileInfo * GetFileInfo(const char *type="TTree")
Return the content of this element in the form of a TFileInfo.
const char * GetObjName() const
Float_t GetMaxProcTime() const
const char * GetDirectory() const
Return directory where to look for object.
Long64_t GetTDSetOffset() const
const char * GetMsd() const
const char * GetFileName() const
Long64_t GetFirst() const
This class implements a data set to be used for PROOF processing.
virtual TDSetElement * Next(Long64_t totalEntries=-1)
Returns next TDSetElement.
Int_t Remove(TDSetElement *elem, Bool_t deleteElem=kTRUE)
Remove TDSetElement 'elem' from the list.
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.
virtual void Reset()
Reset or initialize access to the elements.
Bool_t ElementsValid()
Check if all elements are valid.
void Lookup(Bool_t removeMissing=kFALSE, TList **missingFiles=0)
Resolve the end-point URL for the current elements of this data set If the removeMissing option is se...
TDSetElement * Current() const
TObject * GetEntryList() const
void Validate()
Validate the TDSet by opening files.
const char * GetType() const
void SetWriteV3(Bool_t on=kTRUE)
Set/Reset the 'OldStreamer' bit in this instance and its elements.
TList * GetListOfElements() const
const char * GetDirectory() const
const char * GetObjName() const
UInt_t Convert(Bool_t toGMT=kFALSE) const
Convert fDatime from TDatime format to the standard time_t format.
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
Describe directory structure in memory.
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
Utility class to draw objects in the feedback list during queries.
A List of entry numbers in a TTree or TChain.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual TEnvRec * Lookup(const char *n) const
Loop over all resource records and return the one with name.
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.
virtual Long64_t GetEntryNumber(Long64_t)
virtual Int_t GetLearnEntries()=0
virtual void StopProcess(Bool_t abort)
Set flag to stop the process.
virtual Long64_t GetCacheSize()=0
static TEventIter * Create(TDSet *dset, TSelector *sel, Long64_t first, Long64_t num)
Create and instance of the appropriate iterator.
virtual Int_t GetNextPacket(Long64_t &first, Long64_t &num)=0
virtual void InvalidatePacket()
Invalidated the current packet (if any) by setting the TDSetElement::kCorrupted bit.
A TEventList object is a list of selected events (entries) in a TTree.
virtual Int_t GetN() const
virtual Long64_t * GetList() const
virtual void Add(const TEventList *list)
Merge contents of alist with this list.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
Class describing a generic file including meta information.
TUrl * GetCurrentUrl() const
Return the current url.
This class provides file copy and merging services.
virtual Bool_t OutputFile(const char *url, Bool_t force)
Open merger output file.
virtual Bool_t AddFile(TFile *source, Bool_t own, Bool_t cpProgress)
Add the TFile to this file merger and give ownership of the TFile to this object (unless kFALSE is re...
virtual void PrintFiles(Option_t *options)
Print list of files being merged.
virtual Bool_t Merge(Bool_t=kTRUE)
Merge the files.
virtual void Reset()
Reset merger file list.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
virtual void Close(Option_t *option="")
Close a file.
static EFileType GetType(const char *name, Option_t *option="", TString *prefix=0)
Resolve the file type as a function of the protocol field in 'name'.
static Long64_t GetFileBytesRead()
Static function returning the total number of bytes read from all files.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseGeneralPurpose, Int_t netopt=0)
Create / open a file.
static Int_t GetFileReadCalls()
Static function returning the total number of read calls from all files.
1-D histogram with an int per channel (see TH1 documentation)}
virtual Int_t GetDimension() const
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
Int_t GetBufferLength() const
virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="")
Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2),...
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual Double_t GetEntries() const
Return the current number of entries.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
const Double_t * GetBuffer() const
static void SetLimitsFinder(THLimitsFinder *finder)
This static function can be used to specify a finder derived from THLimitsFinder.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
TObject * FindObject(const char *name) const
Find object using its name.
TObject * Remove(TObject *obj)
Remove object from the list.
void Clear(Option_t *option="")
Remove all objects from the list.
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual void AddAfter(const TObject *after, TObject *obj)
Insert object after object after in the list.
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual void AddLast(TObject *obj)
Add object at the end of the list.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
This code implements the MD5 message-digest algorithm.
static TMD5 * FileChecksum(const char *file)
Returns checksum of specified file.
virtual TMD5 * Checksum()
Returns checksum of the current content.
void SaveSource(FILE *fp)
Save macro source in file pointer fp.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
TObject * Remove(TObject *key)
Remove the (key,value) pair with key from the map.
TClass * GetClass() const
Method or function calling interface.
void ResetParam()
Reset parameter list. To be used before the first call the SetParam().
Bool_t IsValid() const
Return true if the method call has been properly initialized and is usable.
void Execute(const char *, const char *, int *=0)
Execute method on this object with the given parameter string, e.g.
void InitWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Initialize the method invocation environment.
void SetParam(Long_t l)
Add a long method parameter.
The TNamed class is the base class for all named ROOT classes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Collectable string class.
const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
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 * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Bool_t HandleTimer(TTimer *timer)
Execute action in response of a timer timing out.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void MayNotUse(const char *method) const
Use this method to signal that a method (defined in a base class) may not be called in a derived clas...
R__ALWAYS_INLINE Bool_t IsZombie() const
@ kOverwrite
overwrite existing object with same name
@ kSingleKey
write collection with single key
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Set the selector's data members to the corresponding elements of the output list.
static TOutputListSelectorDataMap * FindInList(TCollection *coll)
Find a TOutputListSelectorDataMap in a collection.
Bool_t SetDataMembers(TSelector *sel) const
Given an output list, set the data members of a TSelector.
Class used by TMap to store (key,value) pairs.
void SetValue(TObject *val)
static void SetMemValues()
Record memory usage.
static void Setup(TList *input)
Setup the PROOF input list with requested statistics and tracing options.
static void Stop()
Terminate the PROOF statistics run.
static void GetMemValues(Long_t &vmax, Long_t &rmax)
Get memory usage.
static void Start(TList *input, TList *output)
Initialize PROOF statistics run.
Implement Tree drawing using PROOF.
Class to find axis limits and synchronize them between workers.
static void AutoBinFunc(TString &key, Double_t &xmin, Double_t &xmax, Double_t &ymin, Double_t &ymax, Double_t &zmin, Double_t &zmax)
Get bining information.
Int_t Unlock()
Unlock the directory.
Int_t Lock()
Locks the directory.
Class to steer the merging of files produced on the workers.
UInt_t GetTypeOpt() const
const char * GetDir(Bool_t raw=kFALSE) const
const char * GetOutputFileName() const
Bool_t IsRegister() const
const char * GetFileName() const
Bool_t IsRetrieve() const
void ResetFileCollection()
TFileCollection * GetFileCollection()
Get instance of the file collection to be used in 'dataset' mode.
Long64_t Merge(TCollection *list)
Merge objects from the list into this object.
void SetDir(const char *dir, Bool_t raw=kFALSE)
void SetMerged(Bool_t merged=kTRUE)
void SetOutputFileName(const char *name)
Set the name of the output file; in the form of an Url.
void SetFileName(const char *name)
void Print(Option_t *option="") const
Dump the class content.
void SetWorkerOrdinal(const char *ordinal)
Int_t AdoptFile(TFile *f)
Adopt a file already open.
TFileMerger * GetFileMerger(Bool_t local=kFALSE)
Get instance of the file merger to be used in 'merge' mode.
Long64_t Process(const char *selector, Long64_t nentries=-1, Option_t *option="")
Process the specified TSelector file 'nentries' times.
ErrorHandlerFunc_t fErrorHandler
tdset for current processing
Int_t InitPacketizer(TDSet *dset, Long64_t nentries, Long64_t first, const char *defpackunit, const char *defpackdata)
Init the packetizer Return 0 on success (fPacketizer is correctly initialized), -1 on failure.
void NotifyMemory(TObject *obj)
Printout the memory record after merging object 'obj' This record is used by the memory monitor.
void StopProcess(Bool_t abort, Int_t timeout=-1)
Stop process after this event.
TObject * HandleHistogram(TObject *obj, Bool_t &merged)
Low statistic histograms need a special treatment when using autobin.
Bool_t IsClient() const
Is the player running on the client?
TList * MergeFeedback()
Merge feedback lists.
void SetInitTime()
Set init time.
TVirtualPacketizer * fPacketizer
void RedirectOutput(Bool_t on=kTRUE)
Control output redirection to TProof::fLogFileW.
void AddOutput(TList *out)
Incorporate the content of the received output list 'out' into the final output list fOutput.
TString fSelectorFileName
void Feedback(TList *objs)
Feedback signal.
TMessage * fProcessMessage
Histogram with packets being processed (owned by TPerfStats)
virtual ~TProofPlayerRemote()
Destructor.
Bool_t MergeOutputFiles()
Merge output in files.
virtual Long64_t Finalize(Bool_t force=kFALSE, Bool_t sync=kFALSE)
Finalize query (may not be used in this class).
Int_t Incorporate(TObject *obj, TList *out, Bool_t &merged)
Incorporate object 'newobj' in the list 'outlist'.
void StoreOutput(TList *out)
Store received output list.
virtual void MergeOutput(Bool_t savememvalues=kFALSE)
Merge objects in output the lists.
void SetSelectorDataMembersFromOutputList()
Set the selector's data members: find the mapping of data members to otuput list entries in the outpu...
void SetMerging(Bool_t on=kTRUE)
Switch on/off merge timer.
Bool_t HistoSameAxis(TH1 *h0, TH1 *h1)
Return kTRUE is the histograms 'h0' and 'h1' have the same binning and ranges on the axis (i....
Int_t AddOutputObject(TObject *obj)
Incorporate the received object 'obj' into the output list fOutput.
virtual void StoreFeedback(TObject *slave, TList *out)
Store feedback results from the specified slave.
void StopFeedback()
Stop reporting of feedback objects.
virtual Bool_t JoinProcess(TList *workers)
Prepares the given list of new workers to join a progressing process.
TProof * GetProof() const
TDSetElement * GetNextPacket(TSlave *slave, TMessage *r)
Get next packet for specified slave.
virtual Bool_t HandleTimer(TTimer *timer)
Send feedback objects to client.
void Progress(Long64_t total, Long64_t processed)
Progress signal.
Long64_t DrawSelect(TDSet *set, const char *varexp, const char *selection, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Draw (support for TChain::Draw()).
void SetLastMergingMsg(TObject *obj)
Set the message to be notified in case of exception.
virtual Bool_t SendSelector(const char *selector_file)
Send the selector file(s) to master or worker nodes.
void SetupFeedback()
Setup reporting of feedback objects.
virtual Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process specified TDSet on PROOF.
void SetupFeedback()
Setup feedback.
Bool_t HandleTimer(TTimer *timer)
Handle timer event.
void StopFeedback()
Stop feedback.
void HandleGetTreeHeader(TMessage *mess)
Handle tree header request.
void SetupFeedback()
Setup reporting of feedback objects and progress messages.
TArrayL64 fSlaveBytesRead
Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process specified TDSet on PROOF.
Bool_t HandleTimer(TTimer *timer)
Send progress and feedback to client.
void Progress(Long64_t total, Long64_t processed)
Progress signal.
Internal class steering processing in PROOF.
Long64_t fReadCallsRun
Bytes read in this run.
void HandleGetTreeHeader(TMessage *mess)
Handle tree header request.
void Progress(Long64_t total, Long64_t processed)
Report progress (may not be used in this class).
Bool_t fCreateSelObj
the latest selector
virtual void StopFeedback()
Stop feedback (may not be used in this class).
virtual Int_t DrawCanvas(TObject *obj)
Draw the object if it is a canvas.
void AddOutput(TList *out)
Incorporate output list (may not be used in this class).
static THashList * fgDrawInputPars
void Feedback(TList *objs)
Set feedback list (may not be used in this class).
TEventIter * fEvIter
period (ms) for sending intermediate results
TTimer * fFeedbackTimer
class of the latest selector
TProofPlayer(TProof *proof=0)
Default ctor.
TList * GetOutputList() const
Get output list.
Int_t SavePartialResults(Bool_t queryend=kFALSE, Bool_t force=kFALSE)
Save the partial results of this query to a dedicated file under the user data directory.
void RestorePreviousQuery()
void RemoveQueryResult(const char *ref)
Remove all query result instances referenced 'ref' from the list of results.
void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt)
Set draw feedback option.
void UpdateProgressInfo()
Update fProgressStatus.
Long64_t GetEventsProcessed() const
void UpdateAutoBin(const char *name, Double_t &xmin, Double_t &xmax, Double_t &ymin, Double_t &ymax, Double_t &zmin, Double_t &zmax)
Update automatic binning parameters for given object "name".
Long64_t GetCacheSize()
Return the size in bytes of the cache.
TProofProgressStatus * GetProgressStatus() const
Int_t GetLearnEntries()
Return the number of entries in the learning phase.
EExitStatus fExitStatus
status of query in progress
Long_t fFeedbackPeriod
timer for sending intermediate results
TList * fQueryResults
Events processed in this run.
virtual Bool_t JoinProcess(TList *workers)
Not implemented: meaningful only in the remote player. Returns kFALSE.
virtual void MergeOutput(Bool_t savememvalues=kFALSE)
Merge output (may not be used in this class).
void MapOutputListToDataMembers() const
void FeedBackCanvas(const char *name, Bool_t create)
Create/destroy a named canvas for feedback.
void ClearInput()
Clear input list.
Bool_t fSaveResultsPerPacket
Long64_t fProcessedRun
Read calls in this run.
Bool_t fSavePartialResults
void AddQueryResult(TQueryResult *q)
Add query result to the list, making sure that there are no duplicates.
void StoreFeedback(TObject *slave, TList *out)
Store feedback list (may not be used in this class).
TDSetElement * GetNextPacket(TSlave *slave, TMessage *r)
Get next packet (may not be used in this class).
TStatus * fSelStatus
iterator on events or objects
Int_t AddOutputObject(TObject *obj)
Incorporate output object (may not be used in this class).
virtual ~TProofPlayer()
Destructor.
TClass * fSelectorClass
kTRUE when fSelector has been created locally
TQueryResult * fPreviousQuery
void SetDispatchTimer(Bool_t on=kTRUE)
Enable/disable the timer to dispatch pening events while processing.
Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process specified TDSet on PROOF worker.
TObject * GetOutput(const char *name) const
Get output object by name.
Long64_t Finalize(Bool_t force=kFALSE, Bool_t sync=kFALSE)
Finalize query (may not be used in this class).
TDrawFeedback * CreateDrawFeedback(TProof *p)
Draw feedback creation proxy.
void StopProcess(Bool_t abort, Int_t timeout=-1)
Stop the process after this event.
Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt, TString &selector, TString &objname)
Parse the arguments from var, sel and opt and fill the selector and object name accordingly.
void DeleteDrawFeedback(TDrawFeedback *f)
Delete draw feedback object.
TProofProgressStatus * fProgressStatus
Int_t ReinitSelector(TQueryResult *qr)
Reinitialize fSelector using the selector files in the query result.
void SetStopTimer(Bool_t on=kTRUE, Bool_t abort=kFALSE, Int_t timeout=0)
Enable/disable the timer to stop/abort processing.
TQueryResult * GetQueryResult(const char *ref)
Get query result instances referenced 'ref' from the list of results.
Long64_t DrawSelect(TDSet *set, const char *varexp, const char *selection, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Draw (may not be used in this class).
virtual void SetupFeedback()
Set up feedback (may not be used in this class).
void StoreOutput(TList *out)
Store output list (may not be used in this class).
void SetCurrentQuery(TQueryResult *q)
Set current query and save previous value.
EExitStatus GetExitStatus() const
void AddInput(TObject *inp)
Add object to input list.
void SetProcessing(Bool_t on=kTRUE)
Set processing bit according to 'on'.
Bool_t CheckMemUsage(Long64_t &mfreq, Bool_t &w80r, Bool_t &w80v, TString &wmsg)
Check the memory usage, if requested.
Int_t AssertSelector(const char *selector_file)
Make sure that a valid selector object Return -1 in case of problems, 0 otherwise.
void HandleRecvHisto(TMessage *mess)
Receive histo from slave.
Container class for processing statistics.
void SetLastUpdate(Double_t updtTime=0)
Update time stamp either with the passed value (if > 0) or with the current time.
void SetBytesRead(Long64_t bytesRead)
Long64_t GetEntries() const
void IncEntries(Long64_t entries=1)
void SetReadCalls(Long64_t readCalls)
const char * GetOrdinal() const
Int_t GetQuerySeqNum() const
const char * GetTopSessionTag() const
static void ErrorHandler(Int_t level, Bool_t abort, const char *location, const char *msg)
The PROOF error handler function.
static void GetLocalServer(TString &dsrv)
Extract LOCALDATASERVER info in 'dsrv'.
static void SetLastEntry(Long64_t lastentry)
Set the last entry before exception.
static Float_t GetMemHWM()
MemHWM getter.
Bool_t IsParallel() const
True if in parallel mode.
static void FilterLocalroot(TString &path, const char *url="root://dum/")
If 'path' is local and 'dsrv' is Xrootd, apply 'path.Localroot' settings, if any.
static FILE * SetErrorHandlerFile(FILE *ferr)
Set the file stream where to log (default stderr).
Float_t GetEffSessions() const
static void SetLastMsg(const char *lastmsg)
Set the message to be sent back in case of exceptions.
const char * GetDataDirOpts() const
TSocket * GetSocket() const
void SendAsynMessage(const char *msg, Bool_t lf=kTRUE)
Send an asychronous message to the master / client .
const char * GetDataDir() const
Int_t GetTotSessions() const
Long64_t GetMsgSizeHWM() const
TProofLockPath * GetCacheLock()
static Long_t GetResMemMax()
ResMemMax getter.
const char * GetCacheDir() const
static Long_t GetVirtMemMax()
VirtMemMax getter.
const char * GetSessionDir() const
Int_t GetProtocol() const
const char * GetPrefix() const
static Float_t GetMemStop()
MemStop getter.
Bool_t IsTopMaster() const
Implementation of TProof controlling PROOF federated clusters.
void ValidateDSet(TDSet *dset)
Validate a TDSet.
This class controls a Parallel ROOT Facility, PROOF, cluster.
void Activate(TList *slaves=0)
Activate slave server list.
void AddFeedback(const char *name)
Add object to feedback list.
Bool_t IsParallel() const
TObject * GetParameter(const char *par) const
Get specified parameter.
void ResetMergePrg()
Reset the merge progress notificator.
Int_t Collect(const TSlave *sl, Long_t timeout=-1, Int_t endtype=-1, Bool_t deactonfail=kFALSE)
Collect responses from slave sl.
static Int_t SendInputData(TQueryResult *qr, TProof *p, TString &emsg)
Send the input data file to the workers.
Int_t Broadcast(const TMessage &mess, TList *slaves)
Broadcast a message to all slaves in the specified list.
void SetParameter(const char *par, const char *value)
Set input list parameter.
Int_t GetParallel() const
Returns number of slaves active in parallel mode.
void RemoveFeedback(const char *name)
Remove object from feedback list.
ERunStatus GetRunStatus() const
TList * GetListOfActiveSlaves() const
void Progress(Long64_t total, Long64_t processed)
Get query progress information.
Long64_t Finalize(Int_t query=-1, Bool_t force=kFALSE)
Finalize the qry-th query in fQueries.
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.
void Feedback(TList *objs)
Get list of feedback objects.
EQueryMode GetQueryMode(Option_t *mode=0) const
Find out the query mode based on the current setting and 'mode'.
virtual void SendInputDataFile()
Send the input data objects to the master; the objects are taken from the dedicated list and / or the...
TList * GetInputList()
Get input list.
A container class for query results.
virtual void SetOutputList(TList *out, Bool_t adopt=kTRUE)
Set / change the output list.
void SetNumMergers(Int_t nmergers)
const char * GetLibList() const
Bool_t Matches(const char *ref)
Return TRUE if reference ref matches.
TMacro * GetSelecImp() const
void SetMergeTime(Float_t mergetime)
void SetRecvTime(Float_t recvtime)
void Print(Option_t *opt="") const
Print query content. Use opt = "F" for a full listing.
TDatime GetStartTime() const
virtual void SetProcessInfo(Long64_t ent, Float_t cpu=0., Long64_t siz=-1, Float_t inittime=0., Float_t proctime=0.)
Set processing info.
TMacro * GetSelecHdr() const
const char * GetOptions() const
virtual void SetFinalized()
Bool_t IsFinalized() const
static const char * GetMacroPath()
Get macro search path. Static utility function.
static void SetMacroPath(const char *newpath)
Set or extend the macro search path.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
virtual EAbort GetAbort() const
virtual void ProcessFill(Long64_t)
virtual int Version() const
virtual TList * GetInputList() const
virtual Bool_t Process(Long64_t)
static Bool_t IsStandardDraw(const char *selec)
Find out if this is a standard selection used for Draw actions (either TSelectorDraw,...
virtual void SlaveBegin(TTree *)
virtual Bool_t ProcessCut(Long64_t)
virtual void SetOption(const char *option)
virtual Long64_t GetStatus() const
virtual void SetInputList(TList *input)
virtual void Abort(const char *why, EAbort what=kAbortProcess)
Abort processing.
virtual TList * GetOutputList() const
virtual void SlaveTerminate()
virtual void Begin(TTree *)
static TSelector * GetSelector(const char *filename)
The code in filename is loaded (interpreted or compiled, see below), filename must contain a valid cl...
virtual Int_t IndexOf(const TObject *obj) const
Return index of object in collection.
Class describing a PROOF worker server.
TSocket * GetSocket() const
const char * GetName() const
Returns name of object.
const char * GetOrdinal() const
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
A sorted doubly linked list.
This class holds the status of an ongoing operation and collects error messages.
void Add(const char *mesg)
Add an error message.
void SetMemValues(Long_t vmem=-1, Long_t rmem=-1, Bool_t master=kFALSE)
Set max memory values.
void SetExitStatus(Int_t est)
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Stop()
Stop the stopwatch.
TString & Insert(Ssiz_t pos, const char *s)
Int_t Atoi() const
Return integer value of string.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
const char * Data() const
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
TString & ReplaceAll(const TString &s1, const TString &s2)
Ssiz_t Last(char c) const
Find last occurrence of a character c.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Func_t DynFindSymbol(const char *module, const char *entry)
Find specific entry point in specified library.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual const char * GetIncludePath()
Get the list of include path.
virtual TString SplitAclicMode(const char *filename, TString &mode, TString &args, TString &io) const
This method split a filename of the form:
virtual int MakeDirectory(const char *name)
Make a directory.
virtual int GetSysInfo(SysInfo_t *info) const
Returns static system info, like OS type, CPU type, number of CPUs RAM size, etc into the SysInfo_t s...
virtual void SetIncludePath(const char *includePath)
IncludePath should contain the list of compiler flags to indicate where to find user defined header f...
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
virtual int GetProcInfo(ProcInfo_t *info) const
Returns cpu and memory used by this process into the ProcInfo_t structure.
virtual void DispatchOneEvent(Bool_t pendingOnly=kFALSE)
Dispatch a single event.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * HostName()
Return the system's host name.
virtual const char * WorkingDirectory()
Return working directory.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual int Unlink(const char *name)
Unlink, i.e.
virtual Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=0)
Redirect standard output (stdout, stderr) to the specified file.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
char * DynamicPathName(const char *lib, Bool_t quiet=kFALSE)
Find a dynamic library called lib using the system search paths.
Handles synchronous and a-synchronous timer events.
virtual void Start(Long_t milliSec=-1, Bool_t singleShot=kFALSE)
Starts the timer with a milliSec timeout.
void SetObject(TObject *object)
Set the object to be notified at time out.
virtual Bool_t Notify()
Notify when timer times out.
A TTree represents a columnar dataset.
virtual void SetMaxEntryLoop(Long64_t maxev=kMaxEntries)
TDirectory * GetDirectory() const
virtual void SetMaxVirtualSize(Long64_t size=0)
virtual void DropBaskets()
Remove some baskets from memory.
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
virtual Long64_t GetEntries() const
virtual void SetAutoFlush(Long64_t autof=-30000000)
This function may be called at the start of a program to change the default value for fAutoFlush.
This class defines a UUID (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDent...
const char * AsString() const
Return UUID as string. Copy string immediately since it will be reused.
This class represents a WWW compatible URL.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
const char * GetFile() const
const char * GetHost() const
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
void SetHost(const char *host)
const char * GetProtocol() const
virtual Bool_t SendProcessingProgress(Double_t, Double_t, Bool_t=kFALSE)
virtual Bool_t SendProcessingStatus(const char *, Bool_t=kFALSE)
The packetizer is a load balancing object created for each query.
Float_t GetProcTime() const
TList * GetFailedPackets()
virtual Int_t AddWorkers(TList *workers)
Adds new workers.
TNtuple * GetProgressPerf(Bool_t steal=kFALSE)
void SetFailedPackets(TList *list)
Long64_t GetTotalEntries() const
virtual void StopProcess(Bool_t abort, Bool_t stoptimer=kFALSE)
Stop process.
Float_t GetInitTime() const
virtual void SetInitTime()
Set the initialization time.
Long64_t GetBytesRead() const
TList * GetConfigParams(Bool_t steal=kFALSE)
virtual TDSetElement * GetNextPacket(TSlave *sl, TMessage *r)
Get next packet.
static constexpr double nm
static constexpr double pi
static constexpr double ps
static void output(int code)