Logo ROOT   6.08/07
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 #ifndef ROOT_TChain
26 #include "TChain.h"
27 #endif
28 
29 class TDSet;
30 class TList;
31 class TProof;
32 
33 class TProofChain : public TChain {
34 
35 public:
36  // TProofChain constants
37  enum { kOwnsChain = BIT(19) };
38 
39 private:
40  void AddAliases();
41  void FillDrawAttributes(TProof *p);
42 
43 protected:
44  TChain *fChain; // mother chain: needed for the browsing list
45  TDSet *fSet; // TDSet
46 
47 public:
48  TProofChain();
49  TProofChain(TChain *chain, Bool_t gettreeheader);
50  TProofChain(TDSet *dset, Bool_t gettreeheader);
51  virtual ~TProofChain();
52 
53  virtual void Browse(TBrowser *b);
54  Int_t Debug() const {return fDebug;}
55  virtual Long64_t Draw(const char *varexp, const TCut &selection, Option_t *option=""
57  virtual Long64_t Draw(const char *varexp, const char *selection, Option_t *option=""
58  ,Long64_t nentries=TTree::kMaxEntries, Long64_t firstentry=0); // *MENU*
59  virtual void Draw(Option_t *opt) { Draw(opt, "", "", TTree::kMaxEntries, 0); }
60  virtual TBranch *FindBranch(const char *name);
61  virtual TLeaf *FindLeaf(const char *name);
62  virtual TBranch *GetBranch(const char *name);
63  virtual Bool_t GetBranchStatus(const char *branchname) const;
64  virtual Long64_t GetEntries() const;
65  virtual Long64_t GetEntries(const char *sel);
66  virtual TList *GetListOfClones() { return 0; }
67  virtual TObjArray *GetListOfBranches() {return (fTree ? fTree->GetListOfBranches() : (TObjArray *)0); }
68  virtual TObjArray *GetListOfLeaves() {return (fTree ? fTree->GetListOfLeaves() : (TObjArray *)0);}
69  virtual TList *GetListOfFriends() const {return 0;}
70  virtual TList *GetListOfAliases() const {return 0;}
71 
72  // GetMakeClass is left non-virtual for efficiency reason.
73  // Making it virtual affects the performance of the I/O
74  Int_t GetMakeClass() const {return fMakeClass;}
75 
77  virtual Long64_t GetReadEntry() const;
78  Bool_t HasTreeHeader() const { return (fTree ? kTRUE : kFALSE); }
79  virtual Long64_t Process(const char *filename, Option_t *option="",
80  Long64_t nentries=TTree::kMaxEntries, Long64_t firstentry=0); // *MENU*
81  virtual void Progress(Long64_t total, Long64_t processed);
82  virtual Long64_t Process(TSelector *selector, Option_t *option="",
84  virtual void SetDebug(Int_t level=1, Long64_t min=0, Long64_t max=9999999); // *MENU*
85  virtual void SetEventList(TEventList *evlist) { fEventList = evlist; }
86  virtual void SetEntryList(TEntryList *enlist, const Option_t *) { fEntryList = enlist; }
87  virtual void SetName(const char *name); // *MENU*
88  virtual void ConnectProof();
89  virtual void ReleaseProof();
90 
91  ClassDef(TProofChain,0) //TChain proxy for running chains on PROOF
92 };
93 
94 #endif
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:37
An array of TObjects.
Definition: TObjArray.h:39
TChain * fChain
Definition: TProofChain.h:44
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:74
virtual TObjArray * GetListOfLeaves()
Return a pointer to the list of leaves of the current tree.
Definition: TProofChain.h:68
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 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:130
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void ConnectProof()
Connects the proof "Progress" signal.
const Bool_t kFALSE
Definition: Rtypes.h:92
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:59
TTree * fTree
! Pointer to current tree (Note: We do not own this tree.)
Definition: TChain.h:43
Bool_t HasTreeHeader() const
Definition: TProofChain.h:78
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:417
#define ClassDef(name, id)
Definition: Rtypes.h:254
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:70
virtual void SetEventList(TEventList *evlist)
This function transfroms the given TEventList into a TEntryList.
Definition: TProofChain.h:85
virtual void ReleaseProof()
Releases PROOF. Disconnect the "progress" signal.
A specialized string object used for TTree selections.
Definition: TCut.h:27
A doubly linked list.
Definition: TList.h:47
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
TEntryList * fEntryList
! Pointer to event selection list (if one)
Definition: TTree.h:138
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:86
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:33
virtual TList * GetListOfFriends() const
Definition: TProofChain.h:69
TEventList * fEventList
! Pointer to event selection list (if one)
Definition: TTree.h:137
static unsigned int total
TVirtualTreePlayer * GetPlayer()
Forwards the execution to the dummy tree header.
Int_t Debug() const
Definition: TProofChain.h:54
virtual TList * GetListOfClones()
Definition: TProofChain.h:66
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:346
int nentries
Definition: THbookFile.cxx:89
Int_t fDebug
! Debug level
Definition: TTree.h:127
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:67
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 containg TTree objects.
Definition: TChain.h:35
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:45
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:58
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
A List of entry numbers in a TTree or TChain.
Definition: TEntryList.h:27
static constexpr Long64_t kMaxEntries
Definition: TTree.h:228
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:418