// @(#)root/proof:$Id$
// Author: G. Ganis Nov 2006

/*************************************************************************
 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TProofChain
#define ROOT_TProofChain


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TProofChain                                                          //
//                                                                      //
// A TChain proxy on PROOF.                                             //
// Uses an internal TDSet to handle processing.                         //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TChain
#include "TChain.h"
#endif

class TDSet;
class TList;
class TProof;

class TProofChain : public TChain {

public:
   // TProofChain constants
   enum { kOwnsChain   = BIT(19) };

private:
   void           FillDrawAttributes(TProof *p);

protected:
   TChain        *fChain;            // mother chain: needed for the browsing list
   TDSet         *fSet;              // TDSet

public:
   TProofChain();
   TProofChain(TChain *chain, Bool_t gettreeheader);
   TProofChain(TDSet *dset, Bool_t gettreeheader);
   virtual ~TProofChain();

   virtual void         Browse(TBrowser *b);
   Int_t                Debug() const {return fDebug;}
   virtual Long64_t     Draw(const char *varexp, const TCut &selection, Option_t *option=""
                             ,Long64_t nentries=1000000000, Long64_t firstentry=0);
   virtual Long64_t     Draw(const char *varexp, const char *selection, Option_t *option=""
                             ,Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
   virtual void         Draw(Option_t *opt) { Draw(opt, "", "", 1000000000, 0); }
   virtual TBranch     *FindBranch(const char *name);
   virtual TLeaf       *FindLeaf(const char *name);
   virtual TBranch     *GetBranch(const char *name);
   virtual Bool_t       GetBranchStatus(const char *branchname) const;
   virtual Long64_t     GetEntries() const;
   virtual Long64_t     GetEntries(const char *sel);
   virtual TList       *GetListOfClones() { return 0; }
   virtual TObjArray   *GetListOfBranches() {return (fTree ? fTree->GetListOfBranches() : (TObjArray *)0); }
   virtual TObjArray   *GetListOfLeaves()   {return (fTree ? fTree->GetListOfLeaves() : (TObjArray *)0);}
   virtual TList       *GetListOfFriends()    const {return 0;}
   virtual TList       *GetListOfAliases() const {return 0;}

    // GetMakeClass is left non-virtual for efficiency reason.
    // Making it virtual affects the performance of the I/O
           Int_t        GetMakeClass() const {return fMakeClass;}

   TVirtualTreePlayer  *GetPlayer();
   virtual Long64_t     GetReadEntry()  const;
   Bool_t               HasTreeHeader() const { return (fTree ? kTRUE : kFALSE); }
   virtual Long64_t     Process(const char *filename, Option_t *option="",
                                Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
   virtual void         Progress(Long64_t total, Long64_t processed);
   virtual Long64_t     Process(TSelector *selector, Option_t *option="",
                                Long64_t nentries=1000000000, Long64_t firstentry=0);
   virtual void         SetDebug(Int_t level=1, Long64_t min=0, Long64_t max=9999999); // *MENU*
   virtual void         SetEventList(TEventList *evlist) { fEventList = evlist; }
   virtual void         SetEntryList(TEntryList *enlist, const Option_t *) { fEntryList = enlist; }
   virtual void         SetName(const char *name); // *MENU*
   virtual void         ConnectProof();
   virtual void         ReleaseProof();

   ClassDef(TProofChain,0)  //TChain proxy for running chains on PROOF
};

#endif
 TProofChain.h:1
 TProofChain.h:2
 TProofChain.h:3
 TProofChain.h:4
 TProofChain.h:5
 TProofChain.h:6
 TProofChain.h:7
 TProofChain.h:8
 TProofChain.h:9
 TProofChain.h:10
 TProofChain.h:11
 TProofChain.h:12
 TProofChain.h:13
 TProofChain.h:14
 TProofChain.h:15
 TProofChain.h:16
 TProofChain.h:17
 TProofChain.h:18
 TProofChain.h:19
 TProofChain.h:20
 TProofChain.h:21
 TProofChain.h:22
 TProofChain.h:23
 TProofChain.h:24
 TProofChain.h:25
 TProofChain.h:26
 TProofChain.h:27
 TProofChain.h:28
 TProofChain.h:29
 TProofChain.h:30
 TProofChain.h:31
 TProofChain.h:32
 TProofChain.h:33
 TProofChain.h:34
 TProofChain.h:35
 TProofChain.h:36
 TProofChain.h:37
 TProofChain.h:38
 TProofChain.h:39
 TProofChain.h:40
 TProofChain.h:41
 TProofChain.h:42
 TProofChain.h:43
 TProofChain.h:44
 TProofChain.h:45
 TProofChain.h:46
 TProofChain.h:47
 TProofChain.h:48
 TProofChain.h:49
 TProofChain.h:50
 TProofChain.h:51
 TProofChain.h:52
 TProofChain.h:53
 TProofChain.h:54
 TProofChain.h:55
 TProofChain.h:56
 TProofChain.h:57
 TProofChain.h:58
 TProofChain.h:59
 TProofChain.h:60
 TProofChain.h:61
 TProofChain.h:62
 TProofChain.h:63
 TProofChain.h:64
 TProofChain.h:65
 TProofChain.h:66
 TProofChain.h:67
 TProofChain.h:68
 TProofChain.h:69
 TProofChain.h:70
 TProofChain.h:71
 TProofChain.h:72
 TProofChain.h:73
 TProofChain.h:74
 TProofChain.h:75
 TProofChain.h:76
 TProofChain.h:77
 TProofChain.h:78
 TProofChain.h:79
 TProofChain.h:80
 TProofChain.h:81
 TProofChain.h:82
 TProofChain.h:83
 TProofChain.h:84
 TProofChain.h:85
 TProofChain.h:86
 TProofChain.h:87
 TProofChain.h:88
 TProofChain.h:89
 TProofChain.h:90
 TProofChain.h:91
 TProofChain.h:92
 TProofChain.h:93