Logo ROOT   6.08/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 #ifndef ROOT_TObject
26 #include "TObject.h"
27 #endif
28 #ifndef ROOT_TQObject
29 #include "TQObject.h"
30 #endif
31 
32 class TDSet;
33 class TDSetElement;
34 class TEventList;
35 class TQueryResult;
36 class TDrawFeedback;
37 class TList;
38 class TSlave;
39 class TMessage;
40 class TProof;
41 class TSocket;
42 class TVirtualPacketizer;
44 class TProofProgressInfo;
45 class TSelector;
46 
47 class TVirtualProofPlayer : public TObject, public TQObject {
48 
49 public:
50  enum EStatusBits { kIsSubmerger = BIT(16) };
51  // TDSet status bits
53 
55  virtual ~TVirtualProofPlayer() { }
56 
57  virtual Long64_t Process(TDSet *set,
58  const char *selector, Option_t *option = "",
59  Long64_t nentries = -1, Long64_t firstentry = 0) = 0;
60  virtual Long64_t Process(TDSet *set,
61  TSelector *selector, Option_t *option = "",
62  Long64_t nentries = -1, Long64_t firstentry = 0) = 0;
63  virtual Bool_t JoinProcess(TList *workers) = 0;
64  virtual Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE) = 0;
65  virtual Long64_t Finalize(TQueryResult *qr) = 0;
66  virtual Long64_t DrawSelect(TDSet *set, const char *varexp,
67  const char *selection, Option_t *option = "",
68  Long64_t nentries = -1, Long64_t firstentry = 0) = 0;
69  virtual Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt,
70  TString &selector, TString &objname) = 0;
71  virtual void HandleGetTreeHeader(TMessage *mess) = 0;
72  virtual void HandleRecvHisto(TMessage *mess) = 0;
73 
74  virtual void StopProcess(Bool_t abort, Int_t timeout = -1) = 0;
75  virtual void AddInput(TObject *inp) = 0;
76  virtual void ClearInput() = 0;
77  virtual TObject *GetOutput(const char *name) const = 0;
78  virtual TList *GetOutputList() const = 0;
79  virtual TList *GetInputList() const = 0;
80  virtual TList *GetListOfResults() const = 0;
81  virtual void AddQueryResult(TQueryResult *q) = 0;
82  virtual TQueryResult *GetCurrentQuery() const = 0;
83  virtual TQueryResult *GetQueryResult(const char *ref) = 0;
84  virtual void RemoveQueryResult(const char *ref) = 0;
85  virtual void SetCurrentQuery(TQueryResult *q) = 0;
86  virtual void SetMaxDrawQueries(Int_t max) = 0;
87  virtual void RestorePreviousQuery() =0 ;
88  virtual Int_t AddOutputObject(TObject *obj) = 0;
89  virtual void AddOutput(TList *out) = 0; // Incorporate a list
90  virtual void StoreOutput(TList *out) = 0; // Adopts the list
91  virtual void StoreFeedback(TObject *slave, TList *out) = 0; // Adopts the list
92  virtual void Progress(Long64_t total, Long64_t processed) = 0; // *SIGNAL*
93  virtual void Progress(TSlave *, Long64_t total, Long64_t processed) = 0;
94  virtual void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
95  Float_t initTime, Float_t procTime,
96  Float_t evtrti, Float_t mbrti) = 0; // *SIGNAL*
97  virtual void Progress(TSlave *, Long64_t total, Long64_t processed,
98  Long64_t bytesread, Float_t initTime, Float_t procTime,
99  Float_t evtrti, Float_t mbrti) = 0; // *SIGNAL*
100  virtual void Progress(TProofProgressInfo *) = 0; // *SIGNAL*
101  virtual void Progress(TSlave *, TProofProgressInfo *) = 0; // *SIGNAL*
102  virtual void Feedback(TList *objs) = 0; // *SIGNAL*
103 
104  virtual TDrawFeedback *CreateDrawFeedback(TProof *p) = 0;
105  virtual void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt) = 0;
106  virtual void DeleteDrawFeedback(TDrawFeedback *f) = 0;
107 
108  virtual TDSetElement *GetNextPacket(TSlave *slave, TMessage *r) = 0;
109 
110  virtual Int_t ReinitSelector(TQueryResult *qr) = 0;
111 
112  virtual void UpdateAutoBin(const char *name,
115  Double_t& zmin, Double_t& zmax) = 0;
116 
117  virtual void MergeOutput(Bool_t = kFALSE) = 0;
118 
119  virtual Bool_t IsClient() const = 0;
120 
121  virtual EExitStatus GetExitStatus() const = 0;
122  virtual void SetExitStatus(EExitStatus) = 0;
123  virtual Long64_t GetEventsProcessed() const = 0;
124  virtual void AddEventsProcessed(Long64_t ev) = 0;
125  virtual TProofProgressStatus* GetProgressStatus() const = 0;
126 
127  virtual void SetDispatchTimer(Bool_t on = kTRUE) = 0;
128  virtual void SetStopTimer(Bool_t on = kTRUE,
129  Bool_t abort = kFALSE, Int_t timeout = 0) = 0;
130  virtual void SetInitTime() = 0;
131 
132  virtual void SetMerging(Bool_t on = kTRUE) = 0;
133 
134  virtual Long64_t GetCacheSize() = 0;
135  virtual Int_t GetLearnEntries() = 0;
136 
137  virtual void UpdateProgressInfo() = 0;
138 
139  virtual TVirtualPacketizer *GetPacketizer() const { return 0; }
140 
141  virtual void SetOutputFilePath(const char *fp) = 0;
142  virtual Int_t SavePartialResults(Bool_t queryend = kFALSE, Bool_t force = kFALSE) = 0;
143 
144  static TVirtualProofPlayer *Create(const char *player, TProof *p, TSocket *s = 0);
145 
146  ClassDef(TVirtualProofPlayer,0) // Abstract PROOF player
147 };
148 
149 #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:153
#define BIT(n)
Definition: Rtypes.h:120
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:53
virtual void SetCurrentQuery(TQueryResult *q)=0
Basic string class.
Definition: TString.h:137
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
const Bool_t kFALSE
Definition: Rtypes.h:92
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:68
virtual TVirtualPacketizer * GetPacketizer() const
virtual TList * GetOutputList() const =0
#define ClassDef(name, id)
Definition: Rtypes.h:254
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:44
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:47
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
TRandom2 r(17)
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:33
float xmax
Definition: THbookFile.cxx:93
virtual Bool_t IsClient() const =0
virtual void RemoveQueryResult(const char *ref)=0
static unsigned int total
The packetizer is a load balancing object created for each query.
double f(double x)
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:55
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition: TProof.h:346
int nentries
Definition: THbookFile.cxx:89
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:39
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:156
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:50
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:39
const Bool_t kTRUE
Definition: Rtypes.h:91
float * q
Definition: THbookFile.cxx: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