ROOT  6.06/09
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 #ifndef ROOT_TVirtualProofPlayer
34 #include "TVirtualProofPlayer.h"
35 #endif
36 #ifndef ROOT_TArrayL64
37 #include "TArrayL64.h"
38 #endif
39 #ifndef ROOT_TArrayF
40 #include "TArrayF.h"
41 #endif
42 #ifndef ROOT_TArrayI
43 #include "TArrayI.h"
44 #endif
45 #ifndef ROOT_TList
46 #include "TList.h"
47 #endif
48 #ifndef ROOT_TSystem
49 #include "TSystem.h"
50 #endif
51 #ifndef ROOT_TQueryResult
52 #include "TQueryResult.h"
53 #endif
54 #ifndef ROOT_TProofProgressStatus
55 #include "TProofProgressStatus.h"
56 #endif
57 #ifndef ROOT_TError
58 #include "TError.h"
59 #endif
60 
61 class TSelector;
62 class TSocket;
63 class TVirtualPacketizer;
64 class TSlave;
65 class TEventIter;
66 class TProofStats;
67 class TMutex;
68 class TStatus;
69 class TTimer;
70 class THashList;
71 class TH1;
72 class TFile;
73 class TStopwatch;
74 
75 //------------------------------------------------------------------------
76 
78 
79 private:
80  TList *fAutoBins; // Map of min/max values by name for slaves
81 
82 protected:
83  TList *fInput; //-> list with input objects
84  THashList *fOutput; // list with output objects
85  TSelector *fSelector; //! the latest selector
86  Bool_t fCreateSelObj; //! kTRUE when fSelector has been created locally
87  TClass *fSelectorClass; //! class of the latest selector
88  TTimer *fFeedbackTimer; //! timer for sending intermediate results
89  Long_t fFeedbackPeriod; //! period (ms) for sending intermediate results
90  TEventIter *fEvIter; //! iterator on events or objects
91  TStatus *fSelStatus; //! status of query in progress
92  EExitStatus fExitStatus; // exit status
93  Long64_t fTotalEvents; // number of events requested
94  TProofProgressStatus *fProgressStatus; // the progress status object;
95 
96  Long64_t fReadBytesRun; //! Bytes read in this run
97  Long64_t fReadCallsRun; //! Read calls in this run
98  Long64_t fProcessedRun; //! Events processed in this run
99 
100  TList *fQueryResults; //List of TQueryResult
101  TQueryResult *fQuery; //Instance of TQueryResult currently processed
102  TQueryResult *fPreviousQuery; //Previous instance of TQueryResult processed
103  Int_t fDrawQueries; //Number of Draw queries in the list
104  Int_t fMaxDrawQueries; //Max number of Draw queries kept
105 
106  TTimer *fStopTimer; //Timer associated with a stop request
107  TMutex *fStopTimerMtx; //To protect the stop timer
108 
109  TTimer *fDispatchTimer; //Dispatch pending events while processing
110 
111  TTimer *fProcTimeTimer; //Notifies reaching of allowed max proc time
112  TStopwatch *fProcTime; //Packet proc time
113 
114  TString fOutputFilePath; //Path to file with (partial) results of the query
115  TFile *fOutputFile; //TFile object attached to fOutputFilePath
116  Long_t fSaveMemThreshold; //Threshold for saving output to file
117  Bool_t fSavePartialResults; //Whether to save the partial results
118  Bool_t fSaveResultsPerPacket; //Whether to save partial results after each packet
119 
120  static THashList *fgDrawInputPars; // List of input parameters to be kept on drawing actions
121 
122  void *GetSender() { return this; } //used to set gTQSender
123 
124  virtual Int_t DrawCanvas(TObject *obj); // Canvas drawing via libProofDraw
125 
126  virtual void SetupFeedback(); // specialized setup
127 
128  virtual void MergeOutput(Bool_t savememvalues = kFALSE);
129 
130 public: // fix for broken compilers so TCleanup can call StopFeedback()
131  virtual void StopFeedback(); // specialized teardown
132 
133 protected:
134  class TCleanup {
135  private:
137  public:
138  TCleanup(TProofPlayer *p) : fPlayer(p) { }
139  ~TCleanup() { fPlayer->StopFeedback(); }
140  };
141 
142  Int_t AssertSelector(const char *selector_file);
143  Bool_t CheckMemUsage(Long64_t &mfreq, Bool_t &w80r, Bool_t &w80v, TString &wmsg);
144 
145  void MapOutputListToDataMembers() const;
146 
147 public:
150 
151  TProofPlayer(TProof *proof = 0);
152  virtual ~TProofPlayer();
153 
154  Long64_t Process(TDSet *set,
155  const char *selector, Option_t *option = "",
156  Long64_t nentries = -1, Long64_t firstentry = 0);
157  Long64_t Process(TDSet *set,
158  TSelector *selector, Option_t *option = "",
159  Long64_t nentries = -1, Long64_t firstentry = 0);
160  virtual Bool_t JoinProcess(TList *workers);
161  TVirtualPacketizer *GetPacketizer() const { return 0; }
162  Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE);
164  Long64_t DrawSelect(TDSet *set, const char *varexp,
165  const char *selection, Option_t *option = "",
166  Long64_t nentries = -1, Long64_t firstentry = 0);
167  Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt,
168  TString &selector, TString &objname);
169  void HandleGetTreeHeader(TMessage *mess);
170  void HandleRecvHisto(TMessage *mess);
171  void FeedBackCanvas(const char *name, Bool_t create);
172 
173  void StopProcess(Bool_t abort, Int_t timeout = -1);
174  void AddInput(TObject *inp);
175  void ClearInput();
176  TObject *GetOutput(const char *name) const;
177  TList *GetOutputList() const;
178  TList *GetInputList() const { return fInput; }
179  TList *GetListOfResults() const { return fQueryResults; }
181  TQueryResult *GetCurrentQuery() const { return fQuery; }
182  TQueryResult *GetQueryResult(const char *ref);
183  void RemoveQueryResult(const char *ref);
185  void SetMaxDrawQueries(Int_t max) { fMaxDrawQueries = max; }
188  void AddOutput(TList *out); // Incorporate a list
189  void StoreOutput(TList *out); // Adopts the list
190  void StoreFeedback(TObject *slave, TList *out); // Adopts the list
191  void Progress(Long64_t total, Long64_t processed); // *SIGNAL*
192  void Progress(TSlave *, Long64_t total, Long64_t processed)
193  { Progress(total, processed); }
194  void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
195  Float_t initTime, Float_t procTime,
196  Float_t evtrti, Float_t mbrti); // *SIGNAL*
197  void Progress(TSlave *, Long64_t total, Long64_t processed, Long64_t bytesread,
198  Float_t initTime, Float_t procTime,
199  Float_t evtrti, Float_t mbrti)
200  { Progress(total, processed, bytesread, initTime, procTime,
201  evtrti, mbrti); } // *SIGNAL*
202  void Progress(TProofProgressInfo *pi); // *SIGNAL*
203  void Progress(TSlave *, TProofProgressInfo *pi) { Progress(pi); } // *SIGNAL*
204  void Feedback(TList *objs); // *SIGNAL*
205 
209 
211 
213 
214  void UpdateAutoBin(const char *name,
217  Double_t& zmin, Double_t& zmax);
218 
219  Bool_t IsClient() const { return kFALSE; }
220 
221  void SetExitStatus(EExitStatus st) { fExitStatus = st; }
223  Long64_t GetEventsProcessed() const { return fProgressStatus->GetEntries(); }
224  void AddEventsProcessed(Long64_t ev) { fProgressStatus->IncEntries(ev); }
225 
226  void SetDispatchTimer(Bool_t on = kTRUE);
227  void SetStopTimer(Bool_t on = kTRUE,
228  Bool_t abort = kFALSE, Int_t timeout = 0);
229 
230  virtual void SetInitTime() { }
231 
232  virtual void SetMerging(Bool_t = kTRUE) { }
233 
236 
237  void SetOutputFilePath(const char *fp) { fOutputFilePath = fp; }
238  Int_t SavePartialResults(Bool_t queryend = kFALSE, Bool_t force = kFALSE);
239 
240  void SetProcessing(Bool_t on = kTRUE);
242 
243  void UpdateProgressInfo();
244 
245  ClassDef(TProofPlayer,0) // Basic PROOF player
246 };
247 
248 
249 //------------------------------------------------------------------------
250 
252 
253 private:
255 
256 protected:
257  void SetupFeedback() { }
258  void StopFeedback() { }
259 
260 public:
261  TProofPlayerLocal(Bool_t client = kTRUE) : fIsClient(client) { }
262  virtual ~TProofPlayerLocal() { }
263 
264  Bool_t IsClient() const { return fIsClient; }
265  Long64_t Process(const char *selector, Long64_t nentries = -1, Option_t *option = "");
266  Long64_t Process(TSelector *selector, Long64_t nentries = -1, Option_t *option = "");
268  const char *selector, Option_t *option = "",
269  Long64_t nentries = -1, Long64_t firstentry = 0) {
270  return TProofPlayer::Process(set, selector, option, nentries, firstentry); }
272  TSelector *selector, Option_t *option = "",
273  Long64_t nentries = -1, Long64_t firstentry = 0) {
274  return TProofPlayer::Process(set, selector, option, nentries, firstentry); }
275  ClassDef(TProofPlayerLocal,0) // PROOF player running on client
276 };
277 
278 
279 //------------------------------------------------------------------------
280 
281 //////////////////////////////////////////////////////////////////////////
282 // //
283 // TProofPlayerRemote //
284 // //
285 // Instances of TProofPlayerRemote are created per each query on the //
286 // master(s) and on the client. On the master(s), TProofPlayerRemote //
287 // coordinate processing, check the dataset, create the packetizer //
288 // and take care of merging the results of the workers. //
289 // The instance on the client collects information on the input //
290 // (dataset and selector), it invokes the Begin() method and finalizes //
291 // the query by calling Terminate(). //
292 // //
293 //////////////////////////////////////////////////////////////////////////
294 
295 
297 
298 protected:
299  TProof *fProof; // link to associated PROOF session
300  TList *fOutputLists; // results returned by slaves
301  TList *fFeedback; // reference for use on master
302  TList *fFeedbackLists; // intermediate results
303  TVirtualPacketizer *fPacketizer; // transform TDSet into packets for slaves
304  Bool_t fMergeFiles; // is True when merging output files centrally is needed
305  TDSet *fDSet; //!tdset for current processing
306  ErrorHandlerFunc_t fErrorHandler; // Store previous handler when redirecting output
307  Bool_t fMergeTH1OneByOne; // If kTRUE forces TH1 merge one-by-one [kTRUE]
308  TH1 *fProcPackets; //!Histogram with packets being processed (owned by TPerfStats)
309  TMessage *fProcessMessage; // Process message to replay when adding new workers dynamically
310  TString fSelectorFileName; // Current Selector's name, set by Process()
311 
312  TStopwatch *fMergeSTW; // Merging stop watch
313  Int_t fNumMergers; // Number of submergers
314 
315  virtual Bool_t HandleTimer(TTimer *timer);
317  Long64_t first, const char *defpackunit,
318  const char *defpackdata);
319  TList *MergeFeedback();
321  void NotifyMemory(TObject *obj);
323  virtual Bool_t SendSelector(const char *selector_file); //send selector to slaves
324  TProof *GetProof() const { return fProof; }
325  void SetupFeedback(); // specialized setup
326  void StopFeedback(); // specialized teardown
328 
329 public:
330  TProofPlayerRemote(TProof *proof = 0) : fProof(proof), fOutputLists(0), fFeedback(0),
331  fFeedbackLists(0), fPacketizer(0),
332  fMergeFiles(kFALSE), fDSet(0), fErrorHandler(0),
333  fMergeTH1OneByOne(kTRUE), fProcPackets(0),
334  fProcessMessage(0), fMergeSTW(0), fNumMergers(0)
336  virtual ~TProofPlayerRemote(); // Owns the fOutput list
337  virtual Long64_t Process(TDSet *set, const char *selector,
338  Option_t *option = "", Long64_t nentries = -1,
339  Long64_t firstentry = 0);
340  virtual Long64_t Process(TDSet *set, TSelector *selector,
341  Option_t *option = "", Long64_t nentries = -1,
342  Long64_t firstentry = 0);
343  virtual Bool_t JoinProcess(TList *workers);
344  virtual Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE);
345  virtual Long64_t Finalize(TQueryResult *qr);
346  Long64_t DrawSelect(TDSet *set, const char *varexp,
347  const char *selection, Option_t *option = "",
348  Long64_t nentries = -1, Long64_t firstentry = 0);
349 
350  void RedirectOutput(Bool_t on = kTRUE);
351  void StopProcess(Bool_t abort, Int_t timeout = -1);
352  void StoreOutput(TList *out); // Adopts the list
353  virtual void StoreFeedback(TObject *slave, TList *out); // Adopts the list
354  Int_t Incorporate(TObject *obj, TList *out, Bool_t &merged);
356  Bool_t HistoSameAxis(TH1 *h0, TH1 *h1);
358  void AddOutput(TList *out); // Incorporate a list
359  virtual void MergeOutput(Bool_t savememvalues = kFALSE);
360  void Progress(Long64_t total, Long64_t processed); // *SIGNAL*
361  void Progress(TSlave*, Long64_t total, Long64_t processed)
362  { Progress(total, processed); }
363  void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
364  Float_t initTime, Float_t procTime,
365  Float_t evtrti, Float_t mbrti); // *SIGNAL*
366  void Progress(TSlave *, Long64_t total, Long64_t processed, Long64_t bytesread,
367  Float_t initTime, Float_t procTime,
368  Float_t evtrti, Float_t mbrti)
369  { Progress(total, processed, bytesread, initTime, procTime,
370  evtrti, mbrti); } // *SIGNAL*
371  void Progress(TProofProgressInfo *pi); // *SIGNAL*
372  void Progress(TSlave *, TProofProgressInfo *pi) { Progress(pi); } // *SIGNAL*
373  void Feedback(TList *objs); // *SIGNAL*
376 
377  Bool_t IsClient() const;
378 
379  void SetInitTime();
380 
381  void SetMerging(Bool_t on = kTRUE);
382 
383  ClassDef(TProofPlayerRemote,0) // PROOF player running on master server
384 };
385 
386 
387 //------------------------------------------------------------------------
388 
390 
391 private:
393  TList *fFeedback; // List of objects to send updates of
394 
396 
397 protected:
398  void SetupFeedback();
399  void StopFeedback();
400 
401 public:
402  TProofPlayerSlave(TSocket *socket = 0) : fSocket(socket), fFeedback(0) { }
403 
404  void HandleGetTreeHeader(TMessage *mess);
405 
406  ClassDef(TProofPlayerSlave,0) // PROOF player running on slave server
407 };
408 
409 
410 //------------------------------------------------------------------------
411 
413 
414 private:
427 
428 protected:
430  void SetupFeedback();
431 
432 public:
434  TProofPlayerRemote(proof), fReturnFeedback(kFALSE) { }
436 
437  Long64_t Process(TDSet *set, const char *selector,
438  Option_t *option = "", Long64_t nentries = -1,
439  Long64_t firstentry = 0);
440  Long64_t Process(TDSet *set, TSelector *selector,
441  Option_t *option = "", Long64_t nentries = -1,
442  Long64_t firstentry = 0)
443  { return TProofPlayerRemote::Process(set, selector, option,
444  nentries, firstentry); }
445  void Progress(Long64_t total, Long64_t processed)
446  { TProofPlayerRemote::Progress(total, processed); }
447  void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
448  Float_t initTime, Float_t procTime,
449  Float_t evtrti, Float_t mbrti)
450  { TProofPlayerRemote::Progress(total, processed, bytesread,
451  initTime, procTime, evtrti, mbrti); }
453  void Progress(TSlave *sl, Long64_t total, Long64_t processed);
454  void Progress(TSlave *sl, Long64_t total, Long64_t processed, Long64_t bytesread,
455  Float_t initTime, Float_t procTime,
456  Float_t evtrti, Float_t mbrti);
457  void Progress(TSlave *sl, TProofProgressInfo *pi);
458 
459  ClassDef(TProofPlayerSuperMaster,0) // PROOF player running on super master
460 };
461 
462 #endif
virtual void SetMerging(Bool_t=kTRUE)
Definition: TProofPlayer.h:232
Long64_t Process(const char *selector, Long64_t nentries=-1, Option_t *option="")
Process the specified TSelector file 'nentries' times.
TCleanup(TProofPlayer *p)
Definition: TProofPlayer.h:138
Definition: TMutex.h:37
void SetMerging(Bool_t on=kTRUE)
Switch on/off merge timer.
TProofProgressStatus * fProgressStatus
Definition: TProofPlayer.h:94
TProofPlayerSuperMaster(TProof *proof=0)
Definition: TProofPlayer.h:433
virtual ~TProofPlayerSuperMaster()
Definition: TProofPlayer.h:435
float xmin
Definition: THbookFile.cxx:93
long long Long64_t
Definition: RtypesCore.h:69
EExitStatus fExitStatus
status of query in progress
Definition: TProofPlayer.h:92
Int_t AssertSelector(const char *selector_file)
Make sure that a valid selector object Return -1 in case of problems, 0 otherwise.
void StoreOutput(TList *out)
Store output list (may not be used in this class).
Int_t GetLearnEntries()
Return the number of entries in the learning phase.
virtual ~TProofPlayerLocal()
Definition: TProofPlayer.h:262
Long64_t GetEventsProcessed() const
Definition: TProofPlayer.h:223
Long_t fFeedbackPeriod
timer for sending intermediate results
Definition: TProofPlayer.h:89
const double pi
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
float ymin
Definition: THbookFile.cxx:93
TList * GetInputList() const
Definition: TProofPlayer.h:178
TQueryResult * GetQueryResult(const char *ref)
Get query result instances referenced 'ref' from the list of results.
virtual Bool_t JoinProcess(TList *workers)
Not implemented: meaningful only in the remote player. Returns kFALSE.
Bool_t CheckMemUsage(Long64_t &mfreq, Bool_t &w80r, Bool_t &w80v, TString &wmsg)
Check the memory usage, if requested.
Definition: TDSet.h:153
virtual Long64_t Finalize(Bool_t force=kFALSE, Bool_t sync=kFALSE)
Finalize query (may not be used in this class).
Bool_t fSaveResultsPerPacket
Definition: TProofPlayer.h:118
TProofPlayer(TProof *proof=0)
#define BIT(n)
Definition: Rtypes.h:120
void StopProcess(Bool_t abort, Int_t timeout=-1)
Stop process after this event.
TQueryResult * fPreviousQuery
Definition: TProofPlayer.h:102
void AddOutput(TList *out)
Incorporate output list (may not be used in this class).
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:45
TString fSelectorFileName
Definition: TProofPlayer.h:310
void SetupFeedback()
Setup reporting of feedback objects.
virtual void MergeOutput(Bool_t savememvalues=kFALSE)
Merge objects in output the lists.
void RemoveQueryResult(const char *ref)
Remove all query result instances referenced 'ref' from the list of results.
TTimer * fProcTimeTimer
Definition: TProofPlayer.h:111
Bool_t HandleTimer(TTimer *timer)
Send progress and feedback to client.
TDSetElement * GetNextPacket(TSlave *slave, TMessage *r)
Get next packet for specified slave.
Basic string class.
Definition: TString.h:137
void Progress(TSlave *, TProofProgressInfo *pi)
Definition: TProofPlayer.h:372
Array of floats (32 bits per element).
Definition: TArrayF.h:29
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
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...
TQueryResult * fQuery
Definition: TProofPlayer.h:101
void SetDispatchTimer(Bool_t on=kTRUE)
Enable/disable the timer to dispatch pening events while processing.
void SetupFeedback()
Set up feedback (may not be used in this class).
Array of integers (32 bits per element).
Definition: TArrayI.h:29
void MapOutputListToDataMembers() const
TProof * GetProof() const
Definition: TProofPlayer.h:324
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.
TList * fInput
Definition: TProofPlayer.h:83
TMessage * fProcessMessage
Histogram with packets being processed (owned by TPerfStats)
Definition: TProofPlayer.h:309
TList * fAutoBins
Definition: TProofPlayer.h:80
void SetStopTimer(Bool_t on=kTRUE, Bool_t abort=kFALSE, Int_t timeout=0)
Enable/disable the timer to stop/abort processing.
TStopwatch timer
Definition: pirndm.C:37
TProofPlayerSlave(TSocket *socket=0)
Definition: TProofPlayer.h:402
TMutex * fStopTimerMtx
Definition: TProofPlayer.h:107
void Progress(TSlave *, Long64_t total, Long64_t processed)
Definition: TProofPlayer.h:192
#define ClassDef(name, id)
Definition: Rtypes.h:254
void AddEventsProcessed(Long64_t ev)
Definition: TProofPlayer.h:224
Long64_t fReadBytesRun
Definition: TProofPlayer.h:96
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
Definition: THashList.h:36
TEventIter * fEvIter
period (ms) for sending intermediate results
Definition: TProofPlayer.h:90
void * GetSender()
Definition: TProofPlayer.h:122
void IncEntries(Long64_t entries=1)
void StopFeedback()
Stop reporting of feedback objects.
void AddQueryResult(TQueryResult *q)
Add query result to the list, making sure that there are no duplicates.
void DeleteDrawFeedback(TDrawFeedback *f)
Delete draw feedback object.
void Progress(TSlave *, Long64_t total, Long64_t processed)
Definition: TProofPlayer.h:361
void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt)
Set draw feedback option.
TList * MergeFeedback()
Merge feedback lists.
Long64_t fProcessedRun
Read calls in this run.
Definition: TProofPlayer.h:98
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.
TProofProgressStatus * GetProgressStatus() const
Definition: TProofPlayer.h:241
Int_t fMaxDrawQueries
Definition: TProofPlayer.h:104
virtual void SetupFeedback()
Set up feedback (may not be used in this class).
TClass * fSelectorClass
kTRUE when fSelector has been created locally
Definition: TProofPlayer.h:87
TList * GetOutputList() const
Get 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)
Definition: TProofPlayer.h:197
void SetCurrentQuery(TQueryResult *q)
Set current query and save previous value.
TH1F * h1
Definition: legend1.C:5
void SetupFeedback()
Set up feedback (may not be used in this class).
Definition: TProofPlayer.h:257
A container class for query results.
Definition: TQueryResult.h:44
THashList * fOutput
Definition: TProofPlayer.h:84
char * out
Definition: TBase64.cxx:29
static THashList * fgDrawInputPars
Definition: TProofPlayer.h:120
void SetInitTime()
Set init time.
TTimer * fFeedbackTimer
class of the latest selector
Definition: TProofPlayer.h:88
void SetOutputFilePath(const char *fp)
Definition: TProofPlayer.h:237
virtual ~TProofPlayerRemote()
void Feedback(TList *objs)
Feedback signal.
A doubly linked list.
Definition: TList.h:47
TProofPlayerLocal(Bool_t client=kTRUE)
Definition: TProofPlayer.h:261
TStopwatch * fProcTime
Definition: TProofPlayer.h:112
void ClearInput()
Clear input list.
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".
void HandleGetTreeHeader(TMessage *mess)
Handle tree header request.
void Progress(TProofProgressInfo *pi)
Progress signal.
Definition: TProofPlayer.h:452
float ymax
Definition: THbookFile.cxx:93
TDSetElement * GetNextPacket(TSlave *slave, TMessage *r)
Get next packet (may not be used in this class).
ROOT::R::TRInterface & r
Definition: Object.C:4
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:267
Long64_t fReadCallsRun
Bytes read in this run.
Definition: TProofPlayer.h:97
void AddInput(TObject *inp)
Add object to input list.
virtual void StopFeedback()
Stop feedback (may not be used in this class).
void SetupFeedback()
Setup reporting of feedback objects and progress messages.
void AddOutput(TList *out)
Incorporate the content of the received output list 'out' into the final output list fOutput...
TList * GetListOfResults() const
Definition: TProofPlayer.h:179
Bool_t IsClient() const
Definition: TProofPlayer.h:264
Long_t fSaveMemThreshold
Definition: TProofPlayer.h:116
TVirtualPacketizer * GetPacketizer() const
Definition: TProofPlayer.h:161
virtual Bool_t JoinProcess(TList *workers)
Prepares the given list of new workers to join a progressing process.
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.
virtual void SetInitTime()
Definition: TProofPlayer.h:230
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:57
void SetLastMergingMsg(TObject *obj)
Set the message to be notified in case of exception.
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
virtual Bool_t HandleTimer(TTimer *timer)
Send feedback objects to client.
float xmax
Definition: THbookFile.cxx:93
Int_t ReinitSelector(TQueryResult *qr)
Reinitialize fSelector using the selector files in the query result.
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 HandleRecvHisto(TMessage *mess)
Receive histo from slave.
Long64_t GetEntries() const
TList * fQueryResults
Events processed in this run.
Definition: TProofPlayer.h:100
Long64_t Finalize(Bool_t force=kFALSE, Bool_t sync=kFALSE)
Finalize query (may not be used in this class).
TStatus * fSelStatus
iterator on events or objects
Definition: TProofPlayer.h:91
void FeedBackCanvas(const char *name, Bool_t create)
Create/destroy a named canvas for feedback.
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:366
Int_t AddOutputObject(TObject *obj)
Incorporate the received object 'obj' into the output list fOutput.
void UpdateProgressInfo()
Update fProgressStatus.
static unsigned int total
long Long_t
Definition: RtypesCore.h:50
Bool_t IsClient() const
Definition: TProofPlayer.h:219
void SetMaxDrawQueries(Int_t max)
Definition: TProofPlayer.h:185
Bool_t IsClient() const
Is the player running on the client?
TString fOutputFilePath
Definition: TProofPlayer.h:114
TFile * fOutputFile
Definition: TProofPlayer.h:115
virtual void MergeOutput(Bool_t savememvalues=kFALSE)
Merge output (may not be used in this class).
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:271
void RestorePreviousQuery()
Definition: TProofPlayer.h:186
double f(double x)
TSelector * fSelector
Definition: TProofPlayer.h:85
void StopFeedback()
Stop feedback (may not be used in this class).
Definition: TProofPlayer.h:258
double Double_t
Definition: RtypesCore.h:55
void RedirectOutput(Bool_t on=kTRUE)
Control output redirection to TProof::fLogFileW.
TTimer * fDispatchTimer
Definition: TProofPlayer.h:109
EStatusBits
Definition: TObject.h:76
void HandleGetTreeHeader(TMessage *mess)
Handle tree header request.
Definition: TProof.h:339
EExitStatus GetExitStatus() const
Definition: TProofPlayer.h:222
int nentries
Definition: THbookFile.cxx:89
ErrorHandlerFunc_t fErrorHandler
tdset for current processing
Definition: TProofPlayer.h:306
void(* ErrorHandlerFunc_t)(int level, Bool_t abort, const char *location, const char *msg)
Definition: TError.h:48
The TH1 histogram class.
Definition: TH1.h:80
Bool_t MergeOutputFiles()
Merge output in files.
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).
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 SetSelectorDataMembersFromOutputList()
Set the selector's data members: find the mapping of data members to otuput list entries in the outpu...
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Definition: vector.h:440
virtual Bool_t SendSelector(const char *selector_file)
Send the selector file(s) to master or worker nodes.
#define name(a, b)
Definition: linkTestLib0.cpp:5
Bool_t HandleTimer(TTimer *timer)
Handle timer event.
virtual Int_t DrawCanvas(TObject *obj)
Draw the object if it is a canvas.
Mother of all ROOT objects.
Definition: TObject.h:58
const char Int_t const char TProof * proof
Definition: TXSlave.cxx:46
void StopFeedback()
Stop feedback.
TObject * HandleHistogram(TObject *obj, Bool_t &merged)
Low statistic histograms need a special treatment when using autobin.
void Progress(Long64_t total, Long64_t processed)
Report progress (may not be used in this class).
Int_t AddOutputObject(TObject *obj)
Incorporate output object (may not be used in this class).
TProofPlayer * fPlayer
Definition: TProofPlayer.h:136
Int_t Incorporate(TObject *obj, TList *out, Bool_t &merged)
Incorporate object 'newobj' in the list 'outlist'.
void Progress(Long64_t total, Long64_t processed)
Progress signal.
Definition: TProofPlayer.h:445
Array of long64s (64 bits per element).
Definition: TArrayL64.h:29
void StopProcess(Bool_t abort, Int_t timeout=-1)
Stop the process after this event.
TVirtualPacketizer * fPacketizer
Definition: TProofPlayer.h:303
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.
virtual void StoreFeedback(TObject *slave, TList *out)
Store feedback results from the specified slave.
TObject * GetOutput(const char *name) const
Get output object by name.
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:440
TVirtualPacketizer * GetPacketizer() const
Definition: TProofPlayer.h:375
Long64_t fTotalEvents
Definition: TProofPlayer.h:93
void StoreFeedback(TObject *slave, TList *out)
Store feedback list (may not be used in this class).
Long64_t GetCacheSize()
Return the size in bytes of the cache.
TQueryResult * GetCurrentQuery() const
Definition: TProofPlayer.h:181
Bool_t fCreateSelObj
the latest selector
Definition: TProofPlayer.h:86
Int_t fDrawQueries
Definition: TProofPlayer.h:103
Definition: TSlave.h:50
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition: TSelector.h:39
const Bool_t kTRUE
Definition: Rtypes.h:91
float * q
Definition: THbookFile.cxx:87
TObject * obj
void Progress(TSlave *, TProofProgressInfo *pi)
Definition: TProofPlayer.h:203
TProofPlayerRemote(TProof *proof=0)
Definition: TProofPlayer.h:330
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 NotifyMemory(TObject *obj)
Printout the memory record after merging object 'obj' This record is used by the memory monitor...
void StoreOutput(TList *out)
Store received output list.
TStopwatch * fMergeSTW
Definition: TProofPlayer.h:312
void SetProcessing(Bool_t on=kTRUE)
Set processing bit according to 'on'.
void Progress(Long64_t total, Long64_t processed)
Progress signal.
virtual ~TProofPlayer()
Destructor.
TTimer * fStopTimer
Definition: TProofPlayer.h:106
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:447
void Feedback(TList *objs)
Set feedback list (may not be used in this class).
void SetExitStatus(EExitStatus st)
Definition: TProofPlayer.h:221
TDrawFeedback * CreateDrawFeedback(TProof *p)
Draw feedback creation proxy.
Bool_t fSavePartialResults
Definition: TProofPlayer.h:117
Stopwatch class.
Definition: TStopwatch.h:30