Logo ROOT   6.14/05
Reference Guide
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=""
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 
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="",
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
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:32
An array of TObjects.
Definition: TObjArray.h:37
TChain * fChain
Definition: TProofChain.h:42
long long Long64_t
Definition: RtypesCore.h:69
virtual Bool_t GetBranchStatus(const char *branchname) const
Forwards the execution to the dummy tree header.
const char Option_t
Definition: RtypesCore.h:62
Int_t GetMakeClass() const
Definition: TProofChain.h:72
virtual TObjArray * GetListOfLeaves()
Return a pointer to the list of leaves of the current tree.
Definition: TProofChain.h:66
This class implements a data set to be used for PROOF processing.
Definition: TDSet.h:153
#define BIT(n)
Definition: Rtypes.h:78
virtual void SetDebug(Int_t level=1, Long64_t min=0, Long64_t max=9999999)
See TTree::SetDebug.
Int_t fMakeClass
! not zero when processing code generated by MakeClass
Definition: TTree.h:106
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void ConnectProof()
Connects the proof "Progress" signal.
virtual Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=TTree::kMaxEntries, Long64_t firstentry=0)
Forwards the execution to the TDSet.
virtual TBranch * GetBranch(const char *name)
Forwards the execution to the dummy tree header.
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
Definition: TProofChain.h:57
TTree * fTree
! Pointer to current tree (Note: We do not own this tree.)
Definition: TChain.h:41
Bool_t HasTreeHeader() const
Definition: TProofChain.h:76
virtual void Progress(Long64_t total, Long64_t processed)
Changes the number of processed entries.
virtual void Browse(TBrowser *b)
Forwards the execution to the dummy tree header.
virtual TObjArray * GetListOfBranches()
Definition: TTree.h:409
#define ClassDef(name, id)
Definition: Rtypes.h:320
void FillDrawAttributes(TProof *p)
Communicate the drawing attributes for this chain to the input list so that the draw selectors can us...
virtual TList * GetListOfAliases() const
Definition: TProofChain.h:68
virtual void SetEventList(TEventList *evlist)
This function transfroms the given TEventList into a TEntryList.
Definition: TProofChain.h:83
virtual void ReleaseProof()
Releases PROOF. Disconnect the "progress" signal.
A specialized string object used for TTree selections.
Definition: TCut.h:25
A doubly linked list.
Definition: TList.h:44
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
TEntryList * fEntryList
! Pointer to event selection list (if one)
Definition: TTree.h:114
virtual Long64_t Draw(const char *varexp, const TCut &selection, Option_t *option="", Long64_t nentries=TTree::kMaxEntries, Long64_t firstentry=0)
Forwards the execution to the TDSet.
TProofChain()
Crates a new PROOF chain proxy.
Definition: TProofChain.cxx:35
virtual void SetEntryList(TEntryList *enlist, const Option_t *)
Definition: TProofChain.h:84
virtual void SetName(const char *name)
See TTree::GetName.
A TEventList object is a list of selected events (entries) in a TTree.
Definition: TEventList.h:31
virtual TList * GetListOfFriends() const
Definition: TProofChain.h:67
TEventList * fEventList
! Pointer to event selection list (if one)
Definition: TTree.h:113
const Bool_t kFALSE
Definition: RtypesCore.h:88
static unsigned int total
TVirtualTreePlayer * GetPlayer()
Forwards the execution to the dummy tree header.
Int_t Debug() const
Definition: TProofChain.h:52
virtual TList * GetListOfClones()
Definition: TProofChain.h:64
virtual ~TProofChain()
Destructor.
virtual TBranch * FindBranch(const char *name)
Forwards the execution to the dummy tree header.
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition: TProof.h:316
int nentries
Definition: THbookFile.cxx:89
Int_t fDebug
! Debug level
Definition: TTree.h:102
virtual Long64_t GetReadEntry() const
Returns the number of processed entries.
virtual TObjArray * GetListOfBranches()
Return a pointer to the list of branches of the current tree.
Definition: TProofChain.h:65
void AddAliases()
Aliases are added to the input list.
Abstract base class defining the interface for the plugins that implement Draw, Scan, Process, MakeProxy, etc.
A chain is a collection of files containing TTree objects.
Definition: TChain.h:33
virtual Long64_t GetEntries() const
Returns the total number of entries in the TProofChain, which is the number of entries in the TDSet t...
TDSet * fSet
Definition: TProofChain.h:43
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
A TTree is a list of TBranches.
Definition: TBranch.h:62
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition: TSelector.h:33
A List of entry numbers in a TTree or TChain.
Definition: TEntryList.h:25
const Bool_t kTRUE
Definition: RtypesCore.h:87
static constexpr Long64_t kMaxEntries
Definition: TTree.h:207
char name[80]
Definition: TGX11.cxx:109
virtual TLeaf * FindLeaf(const char *name)
Forwards the execution to the dummy tree header.
virtual TObjArray * GetListOfLeaves()
Definition: TTree.h:410