Logo ROOT   6.12/07
Reference Guide
TVirtualProofPlayer.h
Go to the documentation of this file.
1 // @(#)root/proof:$Id$
2 // Author: Fons Rademakers 15/03/07
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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_TVirtualProofPlayer
13 #define ROOT_TVirtualProofPlayer
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TVirtualProofPlayer //
19 // //
20 // Abstract interface for the PROOF player. //
21 // See the concrete implementations under 'proofplayer' for details. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "TObject.h"
26 #include "TQObject.h"
27 
28 class TDSet;
29 class TDSetElement;
30 class TEventList;
31 class TQueryResult;
32 class TDrawFeedback;
33 class TList;
34 class TSlave;
35 class TMessage;
36 class TProof;
37 class TSocket;
38 class TVirtualPacketizer;
40 class TProofProgressInfo;
41 class TSelector;
42 
43 class TVirtualProofPlayer : public TObject, public TQObject {
44 
45 public:
46  enum EStatusBits { kIsSubmerger = BIT(14) };
47  // TDSet status bits
49 
51  virtual ~TVirtualProofPlayer() { }
52 
53  virtual Long64_t Process(TDSet *set,
54  const char *selector, Option_t *option = "",
55  Long64_t nentries = -1, Long64_t firstentry = 0) = 0;
56  virtual Long64_t Process(TDSet *set,
57  TSelector *selector, Option_t *option = "",
58  Long64_t nentries = -1, Long64_t firstentry = 0) = 0;
59  virtual Bool_t JoinProcess(TList *workers) = 0;
60  virtual Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE) = 0;
61  virtual Long64_t Finalize(TQueryResult *qr) = 0;
62  virtual Long64_t DrawSelect(TDSet *set, const char *varexp,
63  const char *selection, Option_t *option = "",
64  Long64_t nentries = -1, Long64_t firstentry = 0) = 0;
65  virtual Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt,
66  TString &selector, TString &objname) = 0;
67  virtual void HandleGetTreeHeader(TMessage *mess) = 0;
68  virtual void HandleRecvHisto(TMessage *mess) = 0;
69 
70  virtual void StopProcess(Bool_t abort, Int_t timeout = -1) = 0;
71  virtual void AddInput(TObject *inp) = 0;
72  virtual void ClearInput() = 0;
73  virtual TObject *GetOutput(const char *name) const = 0;
74  virtual TList *GetOutputList() const = 0;
75  virtual TList *GetInputList() const = 0;
76  virtual TList *GetListOfResults() const = 0;
77  virtual void AddQueryResult(TQueryResult *q) = 0;
78  virtual TQueryResult *GetCurrentQuery() const = 0;
79  virtual TQueryResult *GetQueryResult(const char *ref) = 0;
80  virtual void RemoveQueryResult(const char *ref) = 0;
81  virtual void SetCurrentQuery(TQueryResult *q) = 0;
82  virtual void SetMaxDrawQueries(Int_t max) = 0;
83  virtual void RestorePreviousQuery() =0 ;
84  virtual Int_t AddOutputObject(TObject *obj) = 0;
85  virtual void AddOutput(TList *out) = 0; // Incorporate a list
86  virtual void StoreOutput(TList *out) = 0; // Adopts the list
87  virtual void StoreFeedback(TObject *slave, TList *out) = 0; // Adopts the list
88  virtual void Progress(Long64_t total, Long64_t processed) = 0; // *SIGNAL*
89  virtual void Progress(TSlave *, Long64_t total, Long64_t processed) = 0;
90  virtual void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
91  Float_t initTime, Float_t procTime,
92  Float_t evtrti, Float_t mbrti) = 0; // *SIGNAL*
93  virtual void Progress(TSlave *, Long64_t total, Long64_t processed,
94  Long64_t bytesread, Float_t initTime, Float_t procTime,
95  Float_t evtrti, Float_t mbrti) = 0; // *SIGNAL*
96  virtual void Progress(TProofProgressInfo *) = 0; // *SIGNAL*
97  virtual void Progress(TSlave *, TProofProgressInfo *) = 0; // *SIGNAL*
98  virtual void Feedback(TList *objs) = 0; // *SIGNAL*
99 
100  virtual TDrawFeedback *CreateDrawFeedback(TProof *p) = 0;
101  virtual void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt) = 0;
102  virtual void DeleteDrawFeedback(TDrawFeedback *f) = 0;
103 
104  virtual TDSetElement *GetNextPacket(TSlave *slave, TMessage *r) = 0;
105 
106  virtual Int_t ReinitSelector(TQueryResult *qr) = 0;
107 
108  virtual void UpdateAutoBin(const char *name,
111  Double_t& zmin, Double_t& zmax) = 0;
112 
113  virtual void MergeOutput(Bool_t = kFALSE) = 0;
114 
115  virtual Bool_t IsClient() const = 0;
116 
117  virtual EExitStatus GetExitStatus() const = 0;
118  virtual void SetExitStatus(EExitStatus) = 0;
119  virtual Long64_t GetEventsProcessed() const = 0;
120  virtual void AddEventsProcessed(Long64_t ev) = 0;
121  virtual TProofProgressStatus* GetProgressStatus() const = 0;
122 
123  virtual void SetDispatchTimer(Bool_t on = kTRUE) = 0;
124  virtual void SetStopTimer(Bool_t on = kTRUE,
125  Bool_t abort = kFALSE, Int_t timeout = 0) = 0;
126  virtual void SetInitTime() = 0;
127 
128  virtual void SetMerging(Bool_t on = kTRUE) = 0;
129 
130  virtual Long64_t GetCacheSize() = 0;
131  virtual Int_t GetLearnEntries() = 0;
132 
133  virtual void UpdateProgressInfo() = 0;
134 
135  virtual TVirtualPacketizer *GetPacketizer() const { return 0; }
136 
137  virtual void SetOutputFilePath(const char *fp) = 0;
138  virtual Int_t SavePartialResults(Bool_t queryend = kFALSE, Bool_t force = kFALSE) = 0;
139 
140  static TVirtualProofPlayer *Create(const char *player, TProof *p, TSocket *s = 0);
141 
142  ClassDef(TVirtualProofPlayer,0) // Abstract PROOF player
143 };
144 
145 #endif
virtual TQueryResult * GetQueryResult(const char *ref)=0
virtual void DeleteDrawFeedback(TDrawFeedback *f)=0
virtual Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt, TString &selector, TString &objname)=0
virtual TList * GetInputList() const =0
virtual void AddOutput(TList *out)=0
virtual Int_t GetLearnEntries()=0
float xmin
Definition: THbookFile.cxx:93
virtual void AddInput(TObject *inp)=0
long long Long64_t
Definition: RtypesCore.h:69
virtual void SetDispatchTimer(Bool_t on=kTRUE)=0
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
float ymin
Definition: THbookFile.cxx:93
virtual void SetMaxDrawQueries(Int_t max)=0
virtual Long64_t DrawSelect(TDSet *set, const char *varexp, const char *selection, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)=0
This class implements a data set to be used for PROOF processing.
Definition: TDSet.h:151
#define BIT(n)
Definition: Rtypes.h:78
virtual void StoreFeedback(TObject *slave, TList *out)=0
virtual EExitStatus GetExitStatus() const =0
This is the ROOT implementation of the Qt object communication mechanism (see also http://www...
Definition: TQObject.h:49
virtual void SetCurrentQuery(TQueryResult *q)=0
Basic string class.
Definition: TString.h:125
virtual void Progress(Long64_t total, Long64_t processed)=0
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Int_t ReinitSelector(TQueryResult *qr)=0
virtual Bool_t JoinProcess(TList *workers)=0
virtual void UpdateProgressInfo()=0
virtual Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)=0
virtual void SetExitStatus(EExitStatus)=0
Manages an element of a TDSet.
Definition: TDSet.h:66
virtual TVirtualPacketizer * GetPacketizer() const
virtual TList * GetOutputList() const =0
#define ClassDef(name, id)
Definition: Rtypes.h:320
virtual void MergeOutput(Bool_t=kFALSE)=0
virtual TDSetElement * GetNextPacket(TSlave *slave, TMessage *r)=0
virtual void AddEventsProcessed(Long64_t ev)=0
A container class for query results.
Definition: TQueryResult.h:36
static TVirtualProofPlayer * Create(const char *player, TProof *p, TSocket *s=0)
Create a PROOF player.
virtual void ClearInput()=0
A doubly linked list.
Definition: TList.h:44
virtual void AddQueryResult(TQueryResult *q)=0
float ymax
Definition: THbookFile.cxx:93
virtual void HandleRecvHisto(TMessage *mess)=0
virtual Long64_t Finalize(Bool_t force=kFALSE, Bool_t sync=kFALSE)=0
virtual TObject * GetOutput(const char *name) const =0
ROOT::R::TRInterface & r
Definition: Object.C:4
virtual void RestorePreviousQuery()=0
virtual void SetInitTime()=0
virtual void SetMerging(Bool_t on=kTRUE)=0
A TEventList object is a list of selected events (entries) in a TTree.
Definition: TEventList.h:31
float xmax
Definition: THbookFile.cxx:93
virtual Bool_t IsClient() const =0
const Bool_t kFALSE
Definition: RtypesCore.h:88
virtual void RemoveQueryResult(const char *ref)=0
static unsigned int total
The packetizer is a load balancing object created for each query.
virtual Long64_t GetEventsProcessed() const =0
double Double_t
Definition: RtypesCore.h:55
virtual void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt)=0
EStatusBits
Definition: TObject.h:57
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition: TProof.h:316
int nentries
Definition: THbookFile.cxx:89
static constexpr double s
virtual TQueryResult * GetCurrentQuery() const =0
virtual void Feedback(TList *objs)=0
virtual void StopProcess(Bool_t abort, Int_t timeout=-1)=0
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void StoreOutput(TList *out)=0
virtual void HandleGetTreeHeader(TMessage *mess)=0
virtual Long64_t GetCacheSize()=0
Utility class to draw objects in the feedback list during queries.
Definition: TDrawFeedback.h:35
virtual void SetOutputFilePath(const char *fp)=0
virtual TProofProgressStatus * GetProgressStatus() const =0
virtual Int_t AddOutputObject(TObject *obj)=0
void ResetBit(UInt_t f)
Definition: TObject.h:171
Abstract interface for the PROOF player.
virtual Int_t SavePartialResults(Bool_t queryend=kFALSE, Bool_t force=kFALSE)=0
Class describing a PROOF worker server.
Definition: TSlave.h:46
Container class for processing statistics.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition: TSelector.h:33
float * q
Definition: THbookFile.cxx:87
const Bool_t kTRUE
Definition: RtypesCore.h:87
virtual TList * GetListOfResults() const =0
char name[80]
Definition: TGX11.cxx:109
virtual void UpdateAutoBin(const char *name, Double_t &xmin, Double_t &xmax, Double_t &ymin, Double_t &ymax, Double_t &zmin, Double_t &zmax)=0
virtual TDrawFeedback * CreateDrawFeedback(TProof *p)=0
virtual void SetStopTimer(Bool_t on=kTRUE, Bool_t abort=kFALSE, Int_t timeout=0)=0