Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TProofPlayer.h
Go to the documentation of this file.
1// @(#)root/proofplayer:$Id$
2// Author: Maarten Ballintijn 07/01/02
3
4/*************************************************************************
5 * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TProofPlayer
13#define ROOT_TProofPlayer
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TProofPlayer //
19// //
20// This internal class and its subclasses steer the processing in PROOF.//
21// Instances of the TProofPlayer class are created on the worker nodes //
22// per session and do the processing. //
23// Instances of its subclass - TProofPlayerRemote are created per each //
24// query on the master(s) and on the client. On the master(s), //
25// TProofPlayerRemote coordinate processing, check the dataset, create //
26// the packetizer and take care of merging the results of the workers. //
27// The instance on the client collects information on the input //
28// (dataset and selector), it invokes the Begin() method and finalizes //
29// the query by calling Terminate(). //
30// //
31//////////////////////////////////////////////////////////////////////////
32
33#include "TVirtualProofPlayer.h"
34#include "TArrayL64.h"
35#include "TArrayF.h"
36#include "TArrayI.h"
37#include "TList.h"
38#include "TSystem.h"
39#include "TQueryResult.h"
41#include "TError.h"
42
43#include <mutex>
44
45class TSelector;
46class TSocket;
48class TSlave;
49class TEventIter;
50class TProofStats;
51class TStatus;
52class TTimer;
53class THashList;
54class TH1;
55class TFile;
56class TStopwatch;
57
58//------------------------------------------------------------------------
59
61
62private:
63 TList *fAutoBins; // Map of min/max values by name for slaves
64
65protected:
66 TList *fInput; //-> list with input objects
67 THashList *fOutput; // list with output objects
68 TSelector *fSelector; //! the latest selector
69 Bool_t fCreateSelObj; //! kTRUE when fSelector has been created locally
70 TClass *fSelectorClass; //! class of the latest selector
71 TTimer *fFeedbackTimer; //! timer for sending intermediate results
72 Long_t fFeedbackPeriod; //! period (ms) for sending intermediate results
73 TEventIter *fEvIter; //! iterator on events or objects
74 TStatus *fSelStatus; //! status of query in progress
75 EExitStatus fExitStatus; // exit status
76 Long64_t fTotalEvents; // number of events requested
77 TProofProgressStatus *fProgressStatus; // the progress status object;
78
79 Long64_t fReadBytesRun; //! Bytes read in this run
80 Long64_t fReadCallsRun; //! Read calls in this run
81 Long64_t fProcessedRun; //! Events processed in this run
82
83 TList *fQueryResults; //List of TQueryResult
84 TQueryResult *fQuery; //Instance of TQueryResult currently processed
85 TQueryResult *fPreviousQuery; //Previous instance of TQueryResult processed
86 Int_t fDrawQueries; //Number of Draw queries in the list
87 Int_t fMaxDrawQueries; //Max number of Draw queries kept
88
89 TTimer *fStopTimer; //Timer associated with a stop request
90 std::mutex fStopTimerMtx; //To protect the stop timer
91
92 TTimer *fDispatchTimer; //Dispatch pending events while processing
93
94 TTimer *fProcTimeTimer; //Notifies reaching of allowed max proc time
95 TStopwatch *fProcTime; //Packet proc time
96
97 TString fOutputFilePath; //Path to file with (partial) results of the query
98 TFile *fOutputFile; //TFile object attached to fOutputFilePath
99 Long_t fSaveMemThreshold; //Threshold for saving output to file
100 Bool_t fSavePartialResults; //Whether to save the partial results
101 Bool_t fSaveResultsPerPacket; //Whether to save partial results after each packet
102
103 static THashList *fgDrawInputPars; // List of input parameters to be kept on drawing actions
104
105 void *GetSender() override { return this; } //used to set gTQSender
106
107 virtual Int_t DrawCanvas(TObject *obj); // Canvas drawing via libProofDraw
108
109 virtual void SetupFeedback(); // specialized setup
110
111 void MergeOutput(Bool_t savememvalues = kFALSE) override;
112
113public: // fix for broken compilers so TCleanup can call StopFeedback()
114 virtual void StopFeedback(); // specialized teardown
115
116protected:
117 class TCleanup {
118 private:
120 public:
123 };
124
125 Int_t AssertSelector(const char *selector_file);
126 Bool_t CheckMemUsage(Long64_t &mfreq, Bool_t &w80r, Bool_t &w80v, TString &wmsg);
127
128 void MapOutputListToDataMembers() const;
129
130public:
133
134 TProofPlayer(TProof *proof = 0);
135 ~TProofPlayer() override;
136
138 const char *selector, Option_t *option = "",
139 Long64_t nentries = -1, Long64_t firstentry = 0) override;
141 TSelector *selector, Option_t *option = "",
142 Long64_t nentries = -1, Long64_t firstentry = 0) override;
143 Bool_t JoinProcess(TList *workers) override;
144 TVirtualPacketizer *GetPacketizer() const override { return 0; }
145 Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE) override;
146 Long64_t Finalize(TQueryResult *qr) override;
147 Long64_t DrawSelect(TDSet *set, const char *varexp,
148 const char *selection, Option_t *option = "",
149 Long64_t nentries = -1, Long64_t firstentry = 0) override;
150 Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt,
151 TString &selector, TString &objname) override;
152 void HandleGetTreeHeader(TMessage *mess) override;
153 void HandleRecvHisto(TMessage *mess) override;
154 void FeedBackCanvas(const char *name, Bool_t create);
155
156 void StopProcess(Bool_t abort, Int_t timeout = -1) override;
157 void AddInput(TObject *inp) override;
158 void ClearInput() override;
159 TObject *GetOutput(const char *name) const override;
160 TList *GetOutputList() const override;
161 TList *GetInputList() const override { return fInput; }
162 TList *GetListOfResults() const override { return fQueryResults; }
163 void AddQueryResult(TQueryResult *q) override;
164 TQueryResult *GetCurrentQuery() const override { return fQuery; }
165 TQueryResult *GetQueryResult(const char *ref) override;
166 void RemoveQueryResult(const char *ref) override;
167 void SetCurrentQuery(TQueryResult *q) override;
168 void SetMaxDrawQueries(Int_t max) override { fMaxDrawQueries = max; }
170 Int_t AddOutputObject(TObject *obj) override;
171 void AddOutput(TList *out) override; // Incorporate a list
172 void StoreOutput(TList *out) override; // Adopts the list
173 void StoreFeedback(TObject *slave, TList *out) override; // Adopts the list
174 void Progress(Long64_t total, Long64_t processed) override; // *SIGNAL*
175 void Progress(TSlave *, Long64_t total, Long64_t processed) override
176 { Progress(total, processed); }
177 void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
178 Float_t initTime, Float_t procTime,
179 Float_t evtrti, Float_t mbrti) override; // *SIGNAL*
180 void Progress(TSlave *, Long64_t total, Long64_t processed, Long64_t bytesread,
181 Float_t initTime, Float_t procTime,
182 Float_t evtrti, Float_t mbrti) override
183 { Progress(total, processed, bytesread, initTime, procTime,
184 evtrti, mbrti); } // *SIGNAL*
185 void Progress(TProofProgressInfo *pi) override; // *SIGNAL*
186 void Progress(TSlave *, TProofProgressInfo *pi) override { Progress(pi); } // *SIGNAL*
187 void Feedback(TList *objs) override; // *SIGNAL*
188
190 void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt) override;
191 void DeleteDrawFeedback(TDrawFeedback *f) override;
192
193 TDSetElement *GetNextPacket(TSlave *slave, TMessage *r) override;
194
195 Int_t ReinitSelector(TQueryResult *qr) override;
196
197 void UpdateAutoBin(const char *name,
200 Double_t& zmin, Double_t& zmax) override;
201
202 Bool_t IsClient() const override { return kFALSE; }
203
204 void SetExitStatus(EExitStatus st) override { fExitStatus = st; }
205 EExitStatus GetExitStatus() const override { return fExitStatus; }
208
209 void SetDispatchTimer(Bool_t on = kTRUE) override;
211 Bool_t abort = kFALSE, Int_t timeout = 0) override;
212
213 void SetInitTime() override { }
214
215 void SetMerging(Bool_t = kTRUE) override { }
216
217 Long64_t GetCacheSize() override;
218 Int_t GetLearnEntries() override;
219
220 void SetOutputFilePath(const char *fp) override { fOutputFilePath = fp; }
221 Int_t SavePartialResults(Bool_t queryend = kFALSE, Bool_t force = kFALSE) override;
222
225
226 void UpdateProgressInfo() override;
227
228 ClassDefOverride(TProofPlayer,0) // Basic PROOF player
229};
230
231
232//------------------------------------------------------------------------
233
235
236private:
238
239protected:
240 void SetupFeedback() override { }
241 void StopFeedback() override { }
242
243public:
244 TProofPlayerLocal(Bool_t client = kTRUE) : fIsClient(client) { }
245 ~TProofPlayerLocal() override { }
246
247 Bool_t IsClient() const override { return fIsClient; }
248 Long64_t Process(const char *selector, Long64_t nentries = -1, Option_t *option = "");
249 Long64_t Process(TSelector *selector, Long64_t nentries = -1, Option_t *option = "");
251 const char *selector, Option_t *option = "",
252 Long64_t nentries = -1, Long64_t firstentry = 0) override {
253 return TProofPlayer::Process(set, selector, option, nentries, firstentry); }
255 TSelector *selector, Option_t *option = "",
256 Long64_t nentries = -1, Long64_t firstentry = 0) override {
257 return TProofPlayer::Process(set, selector, option, nentries, firstentry); }
258 ClassDefOverride(TProofPlayerLocal,0) // PROOF player running on client
259};
260
261
262//------------------------------------------------------------------------
263
264//////////////////////////////////////////////////////////////////////////
265// //
266// TProofPlayerRemote //
267// //
268// Instances of TProofPlayerRemote are created per each query on the //
269// master(s) and on the client. On the master(s), TProofPlayerRemote //
270// coordinate processing, check the dataset, create the packetizer //
271// and take care of merging the results of the workers. //
272// The instance on the client collects information on the input //
273// (dataset and selector), it invokes the Begin() method and finalizes //
274// the query by calling Terminate(). //
275// //
276//////////////////////////////////////////////////////////////////////////
277
278
280
281protected:
282 TProof *fProof; // link to associated PROOF session
283 TList *fOutputLists; // results returned by slaves
284 TList *fFeedback; // reference for use on master
285 TList *fFeedbackLists; // intermediate results
286 TVirtualPacketizer *fPacketizer; // transform TDSet into packets for slaves
287 Bool_t fMergeFiles; // is True when merging output files centrally is needed
288 TDSet *fDSet; //!tdset for current processing
289 ErrorHandlerFunc_t fErrorHandler; // Store previous handler when redirecting output
290 Bool_t fMergeTH1OneByOne; // If kTRUE forces TH1 merge one-by-one [kTRUE]
291 TH1 *fProcPackets; //!Histogram with packets being processed (owned by TPerfStats)
292 TMessage *fProcessMessage; // Process message to replay when adding new workers dynamically
293 TString fSelectorFileName; // Current Selector's name, set by Process()
294
295 TStopwatch *fMergeSTW; // Merging stop watch
296 Int_t fNumMergers; // Number of submergers
297
298 Bool_t HandleTimer(TTimer *timer) override;
300 Long64_t first, const char *defpackunit,
301 const char *defpackdata);
304 void NotifyMemory(TObject *obj);
305 void SetLastMergingMsg(TObject *obj);
306 virtual Bool_t SendSelector(const char *selector_file); //send selector to slaves
307 TProof *GetProof() const { return fProof; }
308 void SetupFeedback() override; // specialized setup
309 void StopFeedback() override; // specialized teardown
311
312public:
319 ~TProofPlayerRemote() override; // Owns the fOutput list
320 Long64_t Process(TDSet *set, const char *selector,
321 Option_t *option = "", Long64_t nentries = -1,
322 Long64_t firstentry = 0) override;
323 Long64_t Process(TDSet *set, TSelector *selector,
324 Option_t *option = "", Long64_t nentries = -1,
325 Long64_t firstentry = 0) override;
326 Bool_t JoinProcess(TList *workers) override;
327 Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE) override;
328 Long64_t Finalize(TQueryResult *qr) override;
329 Long64_t DrawSelect(TDSet *set, const char *varexp,
330 const char *selection, Option_t *option = "",
331 Long64_t nentries = -1, Long64_t firstentry = 0) override;
332
334 void StopProcess(Bool_t abort, Int_t timeout = -1) override;
335 void StoreOutput(TList *out) override; // Adopts the list
336 void StoreFeedback(TObject *slave, TList *out) override; // Adopts the list
337 Int_t Incorporate(TObject *obj, TList *out, Bool_t &merged);
338 TObject *HandleHistogram(TObject *obj, Bool_t &merged);
340 Int_t AddOutputObject(TObject *obj) override;
341 void AddOutput(TList *out) override; // Incorporate a list
342 void MergeOutput(Bool_t savememvalues = kFALSE) override;
343 void Progress(Long64_t total, Long64_t processed) override; // *SIGNAL*
344 void Progress(TSlave*, Long64_t total, Long64_t processed) override
345 { Progress(total, processed); }
346 void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
347 Float_t initTime, Float_t procTime,
348 Float_t evtrti, Float_t mbrti) override; // *SIGNAL*
349 void Progress(TSlave *, Long64_t total, Long64_t processed, Long64_t bytesread,
350 Float_t initTime, Float_t procTime,
351 Float_t evtrti, Float_t mbrti) override
352 { Progress(total, processed, bytesread, initTime, procTime,
353 evtrti, mbrti); } // *SIGNAL*
354 void Progress(TProofProgressInfo *pi) override; // *SIGNAL*
355 void Progress(TSlave *, TProofProgressInfo *pi) override { Progress(pi); } // *SIGNAL*
356 void Feedback(TList *objs) override; // *SIGNAL*
357 TDSetElement *GetNextPacket(TSlave *slave, TMessage *r) override;
358 TVirtualPacketizer *GetPacketizer() const override { return fPacketizer; }
359
360 Bool_t IsClient() const override;
361
362 void SetInitTime() override;
363
364 void SetMerging(Bool_t on = kTRUE) override;
365
366 ClassDefOverride(TProofPlayerRemote,0) // PROOF player running on master server
367};
368
369
370//------------------------------------------------------------------------
371
373
374private:
376 TList *fFeedback; // List of objects to send updates of
377
378 Bool_t HandleTimer(TTimer *timer) override;
379
380protected:
381 void SetupFeedback() override;
382 void StopFeedback() override;
383
384public:
386
387 void HandleGetTreeHeader(TMessage *mess) override;
388
389 ClassDefOverride(TProofPlayerSlave,0) // PROOF player running on slave server
390};
391
392
393//------------------------------------------------------------------------
394
396
397private:
410
411protected:
412 Bool_t HandleTimer(TTimer *timer) override;
413 void SetupFeedback() override;
414
415public:
419
420 Long64_t Process(TDSet *set, const char *selector,
421 Option_t *option = "", Long64_t nentries = -1,
422 Long64_t firstentry = 0) override;
424 Option_t *option = "", Long64_t nentries = -1,
425 Long64_t firstentry = 0) override
426 { return TProofPlayerRemote::Process(set, selector, option,
427 nentries, firstentry); }
428 void Progress(Long64_t total, Long64_t processed) override
429 { TProofPlayerRemote::Progress(total, processed); }
430 void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
431 Float_t initTime, Float_t procTime,
432 Float_t evtrti, Float_t mbrti) override
433 { TProofPlayerRemote::Progress(total, processed, bytesread,
434 initTime, procTime, evtrti, mbrti); }
436 void Progress(TSlave *sl, Long64_t total, Long64_t processed) override;
437 void Progress(TSlave *sl, Long64_t total, Long64_t processed, Long64_t bytesread,
438 Float_t initTime, Float_t procTime,
439 Float_t evtrti, Float_t mbrti) override;
440 void Progress(TSlave *sl, TProofProgressInfo *pi) override;
441
442 ClassDefOverride(TProofPlayerSuperMaster,0) // PROOF player running on super master
443};
444
445#endif
#define f(i)
Definition RSha256.hxx:104
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
long Long_t
Definition RtypesCore.h:54
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
double Double_t
Definition RtypesCore.h:59
long long Long64_t
Definition RtypesCore.h:69
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66
#define BIT(n)
Definition Rtypes.h:90
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
void(* ErrorHandlerFunc_t)(int level, Bool_t abort, const char *location, const char *msg)
Definition TError.h:71
static unsigned int total
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
char name[80]
Definition TGX11.cxx:110
float xmin
int nentries
float * q
float ymin
float xmax
float ymax
Array of floats (32 bits per element).
Definition TArrayF.h:27
Array of integers (32 bits per element).
Definition TArrayI.h:27
Array of long64s (64 bits per element).
Definition TArrayL64.h:27
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
Manages an element of a TDSet.
Definition TDSet.h:66
This class implements a data set to be used for PROOF processing.
Definition TDSet.h:153
Utility class to draw objects in the feedback list during queries.
Special iterator class used in TProofPlayer to iterate over events or objects in the packets.
Definition TEventIter.h:42
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Definition TFile.h:53
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:59
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
Definition THashList.h:34
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0) override
Process specified TDSet on PROOF worker.
void SetupFeedback() override
Set up feedback (may not be used in this class).
void StopFeedback() override
Stop feedback (may not be used in this class).
~TProofPlayerLocal() override
Bool_t IsClient() const override
Long64_t Process(TDSet *set, TSelector *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0) override
Process specified TDSet on PROOF worker with TSelector object The return value is -1 in case of error...
Long64_t Process(const char *selector, Long64_t nentries=-1, Option_t *option="")
Process the specified TSelector file 'nentries' times.
TProofPlayerLocal(Bool_t client=kTRUE)
~TProofPlayerRemote() override
Destructor.
TStopwatch * fMergeSTW
ErrorHandlerFunc_t fErrorHandler
tdset for current processing
void Progress(TSlave *, TProofProgressInfo *pi) override
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.
Long64_t Finalize(Bool_t force=kFALSE, Bool_t sync=kFALSE) override
Finalize query (may not be used in this class).
void NotifyMemory(TObject *obj)
Printout the memory record after merging object 'obj' This record is used by the memory monitor.
Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0) override
Process specified TDSet on PROOF.
TObject * HandleHistogram(TObject *obj, Bool_t &merged)
Low statistic histograms need a special treatment when using autobin.
TList * MergeFeedback()
Merge feedback lists.
TVirtualPacketizer * fPacketizer
Bool_t JoinProcess(TList *workers) override
Prepares the given list of new workers to join a progressing process.
void AddOutput(TList *out) override
Incorporate the content of the received output list 'out' into the final output list fOutput.
void Progress(TSlave *, Long64_t total, Long64_t processed) override
TDSetElement * GetNextPacket(TSlave *slave, TMessage *r) override
Get next packet for specified slave.
Long64_t DrawSelect(TDSet *set, const char *varexp, const char *selection, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0) override
Draw (support for TChain::Draw()).
void RedirectOutput(Bool_t on=kTRUE)
Control output redirection to TProof::fLogFileW.
void SetInitTime() override
Set init time.
Bool_t HandleTimer(TTimer *timer) override
Send feedback objects to client.
void Feedback(TList *objs) override
Feedback signal.
TMessage * fProcessMessage
Histogram with packets being processed (owned by TPerfStats)
Bool_t MergeOutputFiles()
Merge output in files.
Int_t Incorporate(TObject *obj, TList *out, Bool_t &merged)
Incorporate object 'newobj' in the list 'outlist'.
void StopProcess(Bool_t abort, Int_t timeout=-1) override
Stop process after this event.
Bool_t IsClient() const override
Is the player running on the client?
void SetSelectorDataMembersFromOutputList()
Set the selector's data members: find the mapping of data members to otuput list entries in the outpu...
TProofPlayerRemote(TProof *proof=0)
void Progress(Long64_t total, Long64_t processed) override
Progress signal.
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....
TProof * GetProof() const
void StoreOutput(TList *out) override
Store received output list.
void Progress(TSlave *, Long64_t total, Long64_t processed, Long64_t bytesread, Float_t initTime, Float_t procTime, Float_t evtrti, Float_t mbrti) override
Int_t AddOutputObject(TObject *obj) override
Incorporate the received object 'obj' into the output list fOutput.
void StopFeedback() override
Stop reporting of feedback objects.
TVirtualPacketizer * GetPacketizer() const override
void SetLastMergingMsg(TObject *obj)
Set the message to be notified in case of exception.
void MergeOutput(Bool_t savememvalues=kFALSE) override
Merge objects in output the lists.
void SetMerging(Bool_t on=kTRUE) override
Switch on/off merge timer.
virtual Bool_t SendSelector(const char *selector_file)
Send the selector file(s) to master or worker nodes.
void SetupFeedback() override
Setup reporting of feedback objects.
void StoreFeedback(TObject *slave, TList *out) override
Store feedback results from the specified slave.
void StopFeedback() override
Stop feedback.
Bool_t HandleTimer(TTimer *timer) override
Handle timer event.
void SetupFeedback() override
Setup feedback.
void HandleGetTreeHeader(TMessage *mess) override
Handle tree header request.
TProofPlayerSlave(TSocket *socket=0)
Bool_t HandleTimer(TTimer *timer) override
Send progress and feedback to client.
void Progress(TProofProgressInfo *pi) override
Progress signal.
TProofPlayerSuperMaster(TProof *proof=0)
Long64_t Process(TDSet *set, TSelector *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0) override
Process specified TDSet on PROOF.
void Progress(Long64_t total, Long64_t processed) override
Progress signal.
Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0) override
Process specified TDSet on PROOF.
void SetupFeedback() override
Setup reporting of feedback objects and progress messages.
~TProofPlayerSuperMaster() override
void Progress(Long64_t total, Long64_t processed, Long64_t bytesread, Float_t initTime, Float_t procTime, Float_t evtrti, Float_t mbrti) override
Progress signal.
TCleanup(TProofPlayer *p)
TProofPlayer * fPlayer
Internal class steering processing in PROOF.
Long64_t fReadCallsRun
Bytes read in this run.
TVirtualPacketizer * GetPacketizer() const override
TList * fAutoBins
TString fOutputFilePath
TFile * fOutputFile
Bool_t fCreateSelObj
the latest selector
TQueryResult * GetQueryResult(const char *ref) override
Get query result instances referenced 'ref' from the list of results.
Int_t SavePartialResults(Bool_t queryend=kFALSE, Bool_t force=kFALSE) override
Save the partial results of this query to a dedicated file under the user data directory.
virtual void StopFeedback()
Stop feedback (may not be used in this class).
void DeleteDrawFeedback(TDrawFeedback *f) override
Delete draw feedback object.
virtual Int_t DrawCanvas(TObject *obj)
Draw the object if it is a canvas.
void SetInitTime() override
static THashList * fgDrawInputPars
void StopProcess(Bool_t abort, Int_t timeout=-1) override
Stop the process after this event.
TEventIter * fEvIter
period (ms) for sending intermediate results
void ClearInput() override
Clear input list.
Long64_t fTotalEvents
TTimer * fFeedbackTimer
class of the latest selector
Bool_t JoinProcess(TList *workers) override
Not implemented: meaningful only in the remote player. Returns kFALSE.
Int_t ReinitSelector(TQueryResult *qr) override
Reinitialize fSelector using the selector files in the query result.
Long64_t GetEventsProcessed() const override
TList * GetOutputList() const override
Get output list.
void StoreOutput(TList *out) override
Store output list (may not be used in this class).
void HandleGetTreeHeader(TMessage *mess) override
Handle tree header request.
Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0) override
Process specified TDSet on PROOF worker.
TSelector * fSelector
Int_t fDrawQueries
void Progress(TSlave *, Long64_t total, Long64_t processed, Long64_t bytesread, Float_t initTime, Float_t procTime, Float_t evtrti, Float_t mbrti) override
TList * GetInputList() const override
EExitStatus GetExitStatus() const override
Bool_t IsClient() const override
void StoreFeedback(TObject *slave, TList *out) override
Store feedback list (may not be used in this class).
Long64_t fReadBytesRun
void Feedback(TList *objs) override
Set feedback list (may not be used in this class).
THashList * fOutput
TObject * GetOutput(const char *name) const override
Get output object by name.
TDSetElement * GetNextPacket(TSlave *slave, TMessage *r) override
Get next packet (may not be used in this class).
void AddInput(TObject *inp) override
Add object to input list.
void AddOutput(TList *out) override
Incorporate output list (may not be used in this class).
TTimer * fStopTimer
void HandleRecvHisto(TMessage *mess) override
Receive histo from slave.
EExitStatus fExitStatus
status of query in progress
Long_t fFeedbackPeriod
timer for sending intermediate results
TList * fQueryResults
Events processed in this run.
void SetDispatchTimer(Bool_t on=kTRUE) override
Enable/disable the timer to dispatch pening events while processing.
void MapOutputListToDataMembers() const
void FeedBackCanvas(const char *name, Bool_t create)
Create/destroy a named canvas for feedback.
Int_t AddOutputObject(TObject *obj) override
Incorporate output object (may not be used in this class).
Long_t fSaveMemThreshold
void SetMaxDrawQueries(Int_t max) override
void AddQueryResult(TQueryResult *q) override
Add query result to the list, making sure that there are no duplicates.
void MergeOutput(Bool_t savememvalues=kFALSE) override
Merge output (may not be used in this class).
void Progress(Long64_t total, Long64_t processed) override
Report progress (may not be used in this class).
Bool_t fSaveResultsPerPacket
Long64_t fProcessedRun
Read calls in this run.
Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt, TString &selector, TString &objname) override
Parse the arguments from var, sel and opt and fill the selector and object name accordingly.
Long64_t Finalize(Bool_t force=kFALSE, Bool_t sync=kFALSE) override
Finalize query (may not be used in this class).
TProofProgressStatus * GetProgressStatus() const override
void SetOutputFilePath(const char *fp) override
Bool_t fSavePartialResults
TTimer * fProcTimeTimer
void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt) override
Set draw feedback option.
TStatus * fSelStatus
iterator on events or objects
TClass * fSelectorClass
kTRUE when fSelector has been created locally
void SetCurrentQuery(TQueryResult *q) override
Set current query and save previous value.
void SetMerging(Bool_t=kTRUE) override
void Progress(TSlave *, Long64_t total, Long64_t processed) override
void RemoveQueryResult(const char *ref) override
Remove all query result instances referenced 'ref' from the list of results.
TQueryResult * fPreviousQuery
void RestorePreviousQuery() override
Int_t GetLearnEntries() override
Return the number of entries in the learning phase.
TTimer * fDispatchTimer
void UpdateProgressInfo() override
Update fProgressStatus.
Long64_t GetCacheSize() override
Return the size in bytes of the cache.
TList * fInput
Long64_t DrawSelect(TDSet *set, const char *varexp, const char *selection, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0) override
Draw (may not be used in this class).
TQueryResult * fQuery
TList * GetListOfResults() const override
TProofProgressStatus * fProgressStatus
Int_t fMaxDrawQueries
void AddEventsProcessed(Long64_t ev) override
std::mutex fStopTimerMtx
void SetExitStatus(EExitStatus st) override
void Progress(TSlave *, TProofProgressInfo *pi) override
virtual void SetupFeedback()
Set up feedback (may not be used in this class).
void SetStopTimer(Bool_t on=kTRUE, Bool_t abort=kFALSE, Int_t timeout=0) override
Enable/disable the timer to stop/abort processing.
TDrawFeedback * CreateDrawFeedback(TProof *p) override
Draw feedback creation proxy.
void SetProcessing(Bool_t on=kTRUE)
Set processing bit according to 'on'.
TQueryResult * GetCurrentQuery() const override
Bool_t CheckMemUsage(Long64_t &mfreq, Bool_t &w80r, Bool_t &w80v, TString &wmsg)
Check the memory usage, if requested.
void UpdateAutoBin(const char *name, Double_t &xmin, Double_t &xmax, Double_t &ymin, Double_t &ymax, Double_t &zmin, Double_t &zmax) override
Update automatic binning parameters for given object "name".
void * GetSender() override
~TProofPlayer() override
Destructor.
TStopwatch * fProcTime
Int_t AssertSelector(const char *selector_file)
Make sure that a valid selector object Return -1 in case of problems, 0 otherwise.
Container class for processing statistics.
Long64_t GetEntries() const
void IncEntries(Long64_t entries=1)
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition TProof.h:316
A container class for query results.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition TSelector.h:31
Class describing a PROOF worker server.
Definition TSlave.h:46
This class holds the status of an ongoing operation and collects error messages.
Definition TStatus.h:32
Stopwatch class.
Definition TStopwatch.h:28
Basic string class.
Definition TString.h:139
Handles synchronous and a-synchronous timer events.
Definition TTimer.h:51
The packetizer is a load balancing object created for each query.
Abstract interface for the PROOF player.
TH1F * h1
Definition legend1.C:5