Logo ROOT   6.08/07
Reference Guide
THbookBranch.h
Go to the documentation of this file.
1 // @(#)root/hbook:$Id$
2 // Author: Rene Brun 18/02/2002
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2002, 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_THbookBranch
13 #define ROOT_THbookBranch
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // THbookBranch //
19 // //
20 // A branch for a THbookTree //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TBranch
25 #include "TBranch.h"
26 #endif
27 
28 class THbookBranch : public TBranch {
29 
30 protected:
31  TString fBlockName; //Hbook block name
32 
33 public:
35  THbookBranch(TTree *tree, const char *name, void *address, const char *leaflist, Int_t basketsize=32000, Int_t compress=-1);
36  THbookBranch(TBranch *branch, const char *name, void *address, const char *leaflist, Int_t basketsize=32000, Int_t compress=-1);
37  virtual ~THbookBranch();
38  virtual void Browse(TBrowser *b);
39  virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0);
40  const char *GetBlockName() const {return fBlockName.Data();}
41  virtual void SetAddress(void *addobj);
42  void SetBlockName(const char *name) {fBlockName=name;}
43  virtual void SetEntries(Long64_t n) {fEntries=n;}
44 
45  ClassDef(THbookBranch,1) //A branch for a THbookTree
46 };
47 
48 #endif
long long Long64_t
Definition: RtypesCore.h:69
Long64_t fEntries
Number of entries.
Definition: TBranch.h:84
virtual void Browse(TBrowser *b)
Browser interface.
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
get one entry from hbook ntuple
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void SetAddress(void *addobj)
Set address of this branch See important remark in the header of THbookTree.
HBOOK Branch.
Definition: THbookBranch.h:28
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
const char * GetBlockName() const
Definition: THbookBranch.h:40
void SetBlockName(const char *name)
Definition: THbookBranch.h:42
virtual void SetEntries(Long64_t n)
Set the number of entries in this branch.
Definition: THbookBranch.h:43
virtual ~THbookBranch()
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
Definition: tree.py:1
A TTree object has a header with a name and a title.
Definition: TTree.h:98
A TTree is a list of TBranches.
Definition: TBranch.h:58
const Int_t n
Definition: legend1.C:16
char name[80]
Definition: TGX11.cxx:109
TString fBlockName
Definition: THbookBranch.h:31
const char * Data() const
Definition: TString.h:349