TVirtualProofPlayer.h

Go to the documentation of this file.
00001 // @(#)root/proof:$Id: TVirtualProofPlayer.h 36592 2010-11-11 10:43:17Z ganis $
00002 // Author: Fons Rademakers   15/03/07
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TVirtualProofPlayer
00013 #define ROOT_TVirtualProofPlayer
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TVirtualProofPlayer                                                  //
00019 //                                                                      //
00020 // Abstract interface for the PROOF player.                             //
00021 // See the concrete implementations under 'proofplayer' for details.    //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TObject
00026 #include "TObject.h"
00027 #endif
00028 #ifndef ROOT_TQObject
00029 #include "TQObject.h"
00030 #endif
00031 
00032 class TDSet;
00033 class TDSetElement;
00034 class TEventList;
00035 class TQueryResult;
00036 class TDrawFeedback;
00037 class TList;
00038 class TSlave;
00039 class TMessage;
00040 class TProof;
00041 class TSocket;
00042 class TVirtualPacketizer;
00043 class TProofProgressStatus;
00044 class TProofProgressInfo;
00045 
00046 
00047 class TVirtualProofPlayer : public TObject, public TQObject {
00048 
00049 public:
00050    // TDSet status bits
00051    enum EExitStatus { kFinished, kStopped, kAborted };
00052 
00053    TVirtualProofPlayer() { }
00054    virtual ~TVirtualProofPlayer() { }
00055 
00056    virtual Long64_t  Process(TDSet *set,
00057                              const char *selector, Option_t *option = "",
00058                              Long64_t nentries = -1, Long64_t firstentry = 0) = 0;
00059    virtual Long64_t  Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE) = 0;
00060    virtual Long64_t  Finalize(TQueryResult *qr) = 0;
00061    virtual Long64_t  DrawSelect(TDSet *set, const char *varexp,
00062                                 const char *selection, Option_t *option = "",
00063                                 Long64_t nentries = -1, Long64_t firstentry = 0) = 0;
00064    virtual Int_t     GetDrawArgs(const char *var, const char *sel, Option_t *opt,
00065                                  TString &selector, TString &objname) = 0;
00066    virtual void      HandleGetTreeHeader(TMessage *mess) = 0;
00067    virtual void      HandleRecvHisto(TMessage *mess) = 0;
00068 
00069    virtual void      StopProcess(Bool_t abort, Int_t timeout = -1) = 0;
00070    virtual void      AddInput(TObject *inp) = 0;
00071    virtual void      ClearInput() = 0;
00072    virtual TObject  *GetOutput(const char *name) const = 0;
00073    virtual TList    *GetOutputList() const = 0;
00074    virtual TList    *GetInputList() const = 0;
00075    virtual TList    *GetListOfResults() const = 0;
00076    virtual void      AddQueryResult(TQueryResult *q) = 0;
00077    virtual TQueryResult *GetCurrentQuery() const = 0;
00078    virtual TQueryResult *GetQueryResult(const char *ref) = 0;
00079    virtual void      RemoveQueryResult(const char *ref) = 0;
00080    virtual void      SetCurrentQuery(TQueryResult *q) = 0;
00081    virtual void      SetMaxDrawQueries(Int_t max) = 0;
00082    virtual void      RestorePreviousQuery() =0 ;
00083    virtual Int_t     AddOutputObject(TObject *obj) = 0;
00084    virtual void      AddOutput(TList *out) = 0;   // Incorporate a list
00085    virtual void      StoreOutput(TList *out) = 0;   // Adopts the list
00086    virtual void      StoreFeedback(TObject *slave, TList *out) = 0; // Adopts the list
00087    virtual void      Progress(Long64_t total, Long64_t processed) = 0; // *SIGNAL*
00088    virtual void      Progress(TSlave *, Long64_t total, Long64_t processed) = 0;
00089    virtual void      Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
00090                               Float_t initTime, Float_t procTime,
00091                               Float_t evtrti, Float_t mbrti) = 0; // *SIGNAL*
00092    virtual void      Progress(TSlave *, Long64_t total, Long64_t processed,
00093                               Long64_t bytesread, Float_t initTime, Float_t procTime,
00094                               Float_t evtrti, Float_t mbrti) = 0; // *SIGNAL*
00095    virtual void      Progress(TProofProgressInfo *) = 0; // *SIGNAL*
00096    virtual void      Progress(TSlave *, TProofProgressInfo *) = 0; // *SIGNAL*
00097    virtual void      Feedback(TList *objs) = 0; // *SIGNAL*
00098 
00099    virtual TDrawFeedback *CreateDrawFeedback(TProof *p) = 0;
00100    virtual void           SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt) = 0;
00101    virtual void           DeleteDrawFeedback(TDrawFeedback *f) = 0;
00102 
00103    virtual TDSetElement *GetNextPacket(TSlave *slave, TMessage *r) = 0;
00104 
00105    virtual Int_t     ReinitSelector(TQueryResult *qr) = 0;
00106 
00107    virtual void      UpdateAutoBin(const char *name,
00108                                    Double_t& xmin, Double_t& xmax,
00109                                    Double_t& ymin, Double_t& ymax,
00110                                    Double_t& zmin, Double_t& zmax) = 0;
00111 
00112    virtual void MergeOutput() = 0;
00113 
00114    virtual Bool_t    IsClient() const = 0;
00115 
00116    virtual EExitStatus GetExitStatus() const = 0;
00117    virtual Long64_t    GetEventsProcessed() const = 0;
00118    virtual void        AddEventsProcessed(Long64_t ev) = 0;
00119    virtual TProofProgressStatus*  GetProgressStatus() const = 0;
00120 
00121    virtual void      SetDispatchTimer(Bool_t on = kTRUE) = 0;
00122    virtual void      SetStopTimer(Bool_t on = kTRUE,
00123                                   Bool_t abort = kFALSE, Int_t timeout = 0) = 0;
00124    virtual void      SetInitTime() = 0;
00125    virtual Long64_t  GetCacheSize() = 0;
00126    virtual Int_t     GetLearnEntries() = 0;
00127 
00128    virtual TVirtualPacketizer *GetPacketizer() const { return 0; }
00129 
00130    static TVirtualProofPlayer *Create(const char *player, TProof *p, TSocket *s = 0);
00131 
00132    ClassDef(TVirtualProofPlayer,0)  // Abstract PROOF player
00133 };
00134 
00135 #endif

Generated on Tue Jul 5 14:28:29 2011 for ROOT_528-00b_version by  doxygen 1.5.1