Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TProofChain.h
Go to the documentation of this file.
1 // @(#)root/proof:$Id$
2 // Author: G. Ganis Nov 2006
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, 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_TProofChain
13 #define ROOT_TProofChain
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TProofChain //
19 // //
20 // A TChain proxy on PROOF. //
21 // Uses an internal TDSet to handle processing. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "TChain.h"
26 
27 class TDSet;
28 class TList;
29 class TProof;
30 
31 class TProofChain : public TChain {
32 
33 public:
34  // TProofChain constants
35  enum { kOwnsChain = BIT(19) };
36 
37 private:
38  void AddAliases();
39  void FillDrawAttributes(TProof *p);
40 
41 protected:
42  TChain *fChain; // mother chain: needed for the browsing list
43  TDSet *fSet; // TDSet
44 
45 public:
46  TProofChain();
47  TProofChain(TChain *chain, Bool_t gettreeheader);
48  TProofChain(TDSet *dset, Bool_t gettreeheader);
49  virtual ~TProofChain();
50 
51  virtual void Browse(TBrowser *b);
52  Int_t Debug() const {return fDebug;}
53  virtual Long64_t Draw(const char *varexp, const TCut &selection, Option_t *option=""
54  ,Long64_t nentries=TTree::kMaxEntries, Long64_t firstentry=0);
55  virtual Long64_t Draw(const char *varexp, const char *selection, Option_t *option=""
56  ,Long64_t nentries=TTree::kMaxEntries, Long64_t firstentry=0); // *MENU*
57  virtual void Draw(Option_t *opt) { Draw(opt, "", "", TTree::kMaxEntries, 0); }
58  virtual TBranch *FindBranch(const char *name);
59  virtual TLeaf *FindLeaf(const char *name);
60  virtual TBranch *GetBranch(const char *name);
61  virtual Bool_t GetBranchStatus(const char *branchname) const;
62  virtual Long64_t GetEntries() const;
63  virtual Long64_t GetEntries(const char *sel);
64  virtual TList *GetListOfClones() { return 0; }
65  virtual TObjArray *GetListOfBranches() {return (fTree ? fTree->GetListOfBranches() : (TObjArray *)0); }
66  virtual TObjArray *GetListOfLeaves() {return (fTree ? fTree->GetListOfLeaves() : (TObjArray *)0);}
67  virtual TList *GetListOfFriends() const {return 0;}
68  virtual TList *GetListOfAliases() const {return 0;}
69 
70  // GetMakeClass is left non-virtual for efficiency reason.
71  // Making it virtual affects the performance of the I/O
72  Int_t GetMakeClass() const {return fMakeClass;}
73 
74  TVirtualTreePlayer *GetPlayer();
75  virtual Long64_t GetReadEntry() const;
76  Bool_t HasTreeHeader() const { return (fTree ? kTRUE : kFALSE); }
77  virtual Long64_t Process(const char *filename, Option_t *option="",
78  Long64_t nentries=TTree::kMaxEntries, Long64_t firstentry=0); // *MENU*
79  virtual void Progress(Long64_t total, Long64_t processed);
80  virtual Long64_t Process(TSelector *selector, Option_t *option="",
81  Long64_t nentries=TTree::kMaxEntries, Long64_t firstentry=0);
82  virtual void SetDebug(Int_t level=1, Long64_t min=0, Long64_t max=9999999); // *MENU*
83  virtual void SetEventList(TEventList *evlist) { fEventList = evlist; }
84  virtual void SetEntryList(TEntryList *enlist, const Option_t *) { fEntryList = enlist; }
85  virtual void SetName(const char *name); // *MENU*
86  virtual void ConnectProof();
87  virtual void ReleaseProof();
88 
89  ClassDef(TProofChain,0) //TChain proxy for running chains on PROOF
90 };
91 
92 #endif