Logo ROOT  
Reference Guide
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() { 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 virtual void MergeOutput(Bool_t savememvalues = kFALSE);
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 virtual ~TProofPlayer();
136
138 const char *selector, Option_t *option = "",
139 Long64_t nentries = -1, Long64_t firstentry = 0);
141 TSelector *selector, Option_t *option = "",
142 Long64_t nentries = -1, Long64_t firstentry = 0);
143 virtual Bool_t JoinProcess(TList *workers);
144 TVirtualPacketizer *GetPacketizer() const { return 0; }
145 Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE);
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);
150 Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt,
151 TString &selector, TString &objname);
152 void HandleGetTreeHeader(TMessage *mess);
153 void HandleRecvHisto(TMessage *mess);
154 void FeedBackCanvas(const char *name, Bool_t create);
155
156 void StopProcess(Bool_t abort, Int_t timeout = -1);
157 void AddInput(TObject *inp);
158 void ClearInput();
159 TObject *GetOutput(const char *name) const;
160 TList *GetOutputList() const;
161 TList *GetInputList() const { return fInput; }
165 TQueryResult *GetQueryResult(const char *ref);
166 void RemoveQueryResult(const char *ref);
171 void AddOutput(TList *out); // Incorporate a list
172 void StoreOutput(TList *out); // Adopts the list
173 void StoreFeedback(TObject *slave, TList *out); // Adopts the list
174 void Progress(Long64_t total, Long64_t processed); // *SIGNAL*
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); // *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)
183 { Progress(total, processed, bytesread, initTime, procTime,
184 evtrti, mbrti); } // *SIGNAL*
185 void Progress(TProofProgressInfo *pi); // *SIGNAL*
186 void Progress(TSlave *, TProofProgressInfo *pi) { Progress(pi); } // *SIGNAL*
187 void Feedback(TList *objs); // *SIGNAL*
188
192
194
196
197 void UpdateAutoBin(const char *name,
200 Double_t& zmin, Double_t& zmax);
201
202 Bool_t IsClient() const { return kFALSE; }
203
208
209 void SetDispatchTimer(Bool_t on = kTRUE);
210 void SetStopTimer(Bool_t on = kTRUE,
211 Bool_t abort = kFALSE, Int_t timeout = 0);
212
213 virtual void SetInitTime() { }
214
215 virtual void SetMerging(Bool_t = kTRUE) { }
216
219
220 void SetOutputFilePath(const char *fp) { fOutputFilePath = fp; }
221 Int_t SavePartialResults(Bool_t queryend = kFALSE, Bool_t force = kFALSE);
222
223 void SetProcessing(Bool_t on = kTRUE);
225
226 void UpdateProgressInfo();
227
228 ClassDef(TProofPlayer,0) // Basic PROOF player
229};
230
231
232//------------------------------------------------------------------------
233
235
236private:
238
239protected:
240 void SetupFeedback() { }
241 void StopFeedback() { }
242
243public:
244 TProofPlayerLocal(Bool_t client = kTRUE) : fIsClient(client) { }
245 virtual ~TProofPlayerLocal() { }
246
247 Bool_t IsClient() const { 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) {
253 return TProofPlayer::Process(set, selector, option, nentries, firstentry); }
255 TSelector *selector, Option_t *option = "",
256 Long64_t nentries = -1, Long64_t firstentry = 0) {
257 return TProofPlayer::Process(set, selector, option, nentries, firstentry); }
258 ClassDef(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 virtual Bool_t HandleTimer(TTimer *timer);
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(); // specialized setup
309 void StopFeedback(); // specialized teardown
311
312public:
319 virtual ~TProofPlayerRemote(); // Owns the fOutput list
320 virtual Long64_t Process(TDSet *set, const char *selector,
321 Option_t *option = "", Long64_t nentries = -1,
322 Long64_t firstentry = 0);
323 virtual Long64_t Process(TDSet *set, TSelector *selector,
324 Option_t *option = "", Long64_t nentries = -1,
325 Long64_t firstentry = 0);
326 virtual Bool_t JoinProcess(TList *workers);
327 virtual Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE);
328 virtual Long64_t Finalize(TQueryResult *qr);
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);
332
333 void RedirectOutput(Bool_t on = kTRUE);
334 void StopProcess(Bool_t abort, Int_t timeout = -1);
335 void StoreOutput(TList *out); // Adopts the list
336 virtual void StoreFeedback(TObject *slave, TList *out); // Adopts the list
337 Int_t Incorporate(TObject *obj, TList *out, Bool_t &merged);
338 TObject *HandleHistogram(TObject *obj, Bool_t &merged);
341 void AddOutput(TList *out); // Incorporate a list
342 virtual void MergeOutput(Bool_t savememvalues = kFALSE);
343 void Progress(Long64_t total, Long64_t processed); // *SIGNAL*
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); // *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)
352 { Progress(total, processed, bytesread, initTime, procTime,
353 evtrti, mbrti); } // *SIGNAL*
354 void Progress(TProofProgressInfo *pi); // *SIGNAL*
355 void Progress(TSlave *, TProofProgressInfo *pi) { Progress(pi); } // *SIGNAL*
356 void Feedback(TList *objs); // *SIGNAL*
359
360 Bool_t IsClient() const;
361
362 void SetInitTime();
363
364 void SetMerging(Bool_t on = kTRUE);
365
366 ClassDef(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);
379
380protected:
381 void SetupFeedback();
382 void StopFeedback();
383
384public:
386
387 void HandleGetTreeHeader(TMessage *mess);
388
389 ClassDef(TProofPlayerSlave,0) // PROOF player running on slave server
390};
391
392
393//------------------------------------------------------------------------
394
396
397private:
410
411protected:
412 Bool_t HandleTimer(TTimer *timer);
413 void SetupFeedback();
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);
424 Option_t *option = "", Long64_t nentries = -1,
425 Long64_t firstentry = 0)
426 { return TProofPlayerRemote::Process(set, selector, option,
427 nentries, firstentry); }
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)
433 { TProofPlayerRemote::Progress(total, processed, bytesread,
434 initTime, procTime, evtrti, mbrti); }
436 void Progress(TSlave *sl, Long64_t total, Long64_t processed);
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);
441
442 ClassDef(TProofPlayerSuperMaster,0) // PROOF player running on super master
443};
444
445#endif
ROOT::R::TRInterface & r
Definition: Object.C:4
#define f(i)
Definition: RSha256.hxx:104
int Int_t
Definition: RtypesCore.h:45
const Bool_t kFALSE
Definition: RtypesCore.h:101
long Long_t
Definition: RtypesCore.h:54
bool Bool_t
Definition: RtypesCore.h:63
double Double_t
Definition: RtypesCore.h:59
long long Long64_t
Definition: RtypesCore.h:80
float Float_t
Definition: RtypesCore.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:100
const char Option_t
Definition: RtypesCore.h:66
#define ClassDef(name, id)
Definition: Rtypes.h:325
#define BIT(n)
Definition: Rtypes.h:85
void(* ErrorHandlerFunc_t)(int level, Bool_t abort, const char *location, const char *msg)
Definition: TError.h:70
static unsigned int total
char name[80]
Definition: TGX11.cxx:110
float xmin
Definition: THbookFile.cxx:95
int nentries
Definition: THbookFile.cxx:91
float * q
Definition: THbookFile.cxx:89
float ymin
Definition: THbookFile.cxx:95
float xmax
Definition: THbookFile.cxx:95
float ymax
Definition: THbookFile.cxx:95
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:80
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.
Definition: TDrawFeedback.h:35
Special iterator class used in TProofPlayer to iterate over events or objects in the packets.
Definition: TEventIter.h:42
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:54
TH1 is the base class of all histogram classes in ROOT.
Definition: TH1.h:58
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:44
Mother of all ROOT objects.
Definition: TObject.h:37
EStatusBits
Definition: TObject.h:57
virtual ~TProofPlayerLocal()
Definition: TProofPlayer.h:245
void StopFeedback()
Stop feedback (may not be used in this class).
Definition: TProofPlayer.h:241
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.
Definition: TProofPlayer.h:250
Bool_t IsClient() const
Definition: TProofPlayer.h:247
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)
Definition: TProofPlayer.h:244
Long64_t Process(TDSet *set, TSelector *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process specified TDSet on PROOF worker with TSelector object The return value is -1 in case of error...
Definition: TProofPlayer.h:254
void SetupFeedback()
Set up feedback (may not be used in this class).
Definition: TProofPlayer.h:240
TStopwatch * fMergeSTW
Definition: TProofPlayer.h:295
ErrorHandlerFunc_t fErrorHandler
tdset for current processing
Definition: TProofPlayer.h:289
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 Progress(TSlave *, TProofProgressInfo *pi)
Definition: TProofPlayer.h:355
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
Definition: TProofPlayer.h:286
void Progress(TSlave *, Long64_t total, Long64_t processed, Long64_t bytesread, Float_t initTime, Float_t procTime, Float_t evtrti, Float_t mbrti)
Definition: TProofPlayer.h:349
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
Definition: TProofPlayer.h:293
void Feedback(TList *objs)
Feedback signal.
TMessage * fProcessMessage
Histogram with packets being processed (owned by TPerfStats)
Definition: TProofPlayer.h:292
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.
void Progress(TSlave *, Long64_t total, Long64_t processed)
Definition: TProofPlayer.h:344
TProofPlayerRemote(TProof *proof=0)
Definition: TProofPlayer.h:313
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
Definition: TProofPlayer.h:307
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.
TVirtualPacketizer * GetPacketizer() const
Definition: TProofPlayer.h:358
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.
TProofPlayerSlave(TSocket *socket=0)
Definition: TProofPlayer.h:385
void SetupFeedback()
Setup reporting of feedback objects and progress messages.
void Progress(Long64_t total, Long64_t processed, Long64_t bytesread, Float_t initTime, Float_t procTime, Float_t evtrti, Float_t mbrti)
Progress signal.
Definition: TProofPlayer.h:430
Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process specified TDSet on PROOF.
TProofPlayerSuperMaster(TProof *proof=0)
Definition: TProofPlayer.h:416
Long64_t Process(TDSet *set, TSelector *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process specified TDSet on PROOF.
Definition: TProofPlayer.h:423
virtual ~TProofPlayerSuperMaster()
Definition: TProofPlayer.h:418
Bool_t HandleTimer(TTimer *timer)
Send progress and feedback to client.
void Progress(Long64_t total, Long64_t processed)
Progress signal.
Definition: TProofPlayer.h:428
void Progress(TProofProgressInfo *pi)
Progress signal.
Definition: TProofPlayer.h:435
TCleanup(TProofPlayer *p)
Definition: TProofPlayer.h:121
TProofPlayer * fPlayer
Definition: TProofPlayer.h:119
Internal class steering processing in PROOF.
Definition: TProofPlayer.h:60
Long64_t fReadCallsRun
Bytes read in this run.
Definition: TProofPlayer.h:80
TQueryResult * GetCurrentQuery() const
Definition: TProofPlayer.h:164
TList * fAutoBins
Definition: TProofPlayer.h:63
TString fOutputFilePath
Definition: TProofPlayer.h:97
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).
TFile * fOutputFile
Definition: TProofPlayer.h:98
Bool_t fCreateSelObj
the latest selector
Definition: TProofPlayer.h:69
virtual void StopFeedback()
Stop feedback (may not be used in this class).
TList * GetListOfResults() const
Definition: TProofPlayer.h:162
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
Definition: TProofPlayer.h:103
void Feedback(TList *objs)
Set feedback list (may not be used in this class).
TEventIter * fEvIter
period (ms) for sending intermediate results
Definition: TProofPlayer.h:73
Long64_t fTotalEvents
Definition: TProofPlayer.h:76
TTimer * fFeedbackTimer
class of the latest selector
Definition: TProofPlayer.h:71
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()
Definition: TProofPlayer.h:169
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.
TSelector * fSelector
Definition: TProofPlayer.h:68
Long64_t GetEventsProcessed() const
Definition: TProofPlayer.h:206
Int_t fDrawQueries
Definition: TProofPlayer.h:86
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
Definition: TProofPlayer.h:224
Int_t GetLearnEntries()
Return the number of entries in the learning phase.
void SetOutputFilePath(const char *fp)
Definition: TProofPlayer.h:220
void * GetSender()
Definition: TProofPlayer.h:105
virtual void SetMerging(Bool_t=kTRUE)
Definition: TProofPlayer.h:215
Long64_t fReadBytesRun
Definition: TProofPlayer.h:79
THashList * fOutput
Definition: TProofPlayer.h:67
void Progress(TSlave *, Long64_t total, Long64_t processed)
Definition: TProofPlayer.h:175
Bool_t IsClient() const
Definition: TProofPlayer.h:202
TTimer * fStopTimer
Definition: TProofPlayer.h:89
EExitStatus fExitStatus
status of query in progress
Definition: TProofPlayer.h:75
Long_t fFeedbackPeriod
timer for sending intermediate results
Definition: TProofPlayer.h:72
TList * fQueryResults
Events processed in this run.
Definition: TProofPlayer.h:83
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.
TVirtualPacketizer * GetPacketizer() const
Definition: TProofPlayer.h:144
Long_t fSaveMemThreshold
Definition: TProofPlayer.h:99
void ClearInput()
Clear input list.
void Progress(TSlave *, TProofProgressInfo *pi)
Definition: TProofPlayer.h:186
Bool_t fSaveResultsPerPacket
Definition: TProofPlayer.h:101
Long64_t fProcessedRun
Read calls in this run.
Definition: TProofPlayer.h:81
TList * GetInputList() const
Definition: TProofPlayer.h:161
Bool_t fSavePartialResults
Definition: TProofPlayer.h:100
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).
TTimer * fProcTimeTimer
Definition: TProofPlayer.h:94
TStatus * fSelStatus
iterator on events or objects
Definition: TProofPlayer.h:74
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
Definition: TProofPlayer.h:70
TQueryResult * fPreviousQuery
Definition: TProofPlayer.h:85
void SetDispatchTimer(Bool_t on=kTRUE)
Enable/disable the timer to dispatch pening events while processing.
void AddEventsProcessed(Long64_t ev)
Definition: TProofPlayer.h:207
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.
void SetMaxDrawQueries(Int_t max)
Definition: TProofPlayer.h:168
TTimer * fDispatchTimer
Definition: TProofPlayer.h:92
TList * fInput
Definition: TProofPlayer.h:66
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).
void SetExitStatus(EExitStatus st)
Definition: TProofPlayer.h:204
TDrawFeedback * CreateDrawFeedback(TProof *p)
Draw feedback creation proxy.
TQueryResult * fQuery
Definition: TProofPlayer.h:84
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
Definition: TProofPlayer.h:77
Int_t ReinitSelector(TQueryResult *qr)
Reinitialize fSelector using the selector files in the query result.
Int_t fMaxDrawQueries
Definition: TProofPlayer.h:87
void SetStopTimer(Bool_t on=kTRUE, Bool_t abort=kFALSE, Int_t timeout=0)
Enable/disable the timer to stop/abort processing.
std::mutex fStopTimerMtx
Definition: TProofPlayer.h:90
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
Definition: TProofPlayer.h:205
void AddInput(TObject *inp)
Add object to input list.
void SetProcessing(Bool_t on=kTRUE)
Set processing bit according to 'on'.
virtual void SetInitTime()
Definition: TProofPlayer.h:213
Bool_t CheckMemUsage(Long64_t &mfreq, Bool_t &w80r, Bool_t &w80v, TString &wmsg)
Check the memory usage, if requested.
TStopwatch * fProcTime
Definition: TProofPlayer.h:95
void Progress(TSlave *, Long64_t total, Long64_t processed, Long64_t bytesread, Float_t initTime, Float_t procTime, Float_t evtrti, Float_t mbrti)
Definition: TProofPlayer.h:180
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.
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.
Definition: TQueryResult.h:41
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:136
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
static constexpr double pi
Definition: first.py:1