#include "THbookBranch.h"
#include "THbookTree.h"
ClassImp(THbookBranch)
THbookBranch::THbookBranch(TTree *tree, const char *name, void *address, const char *leaflist, Int_t basketsize, Int_t compress)
            :TBranch(tree, name,address,leaflist,basketsize,compress)
{
}
THbookBranch::THbookBranch(TBranch *branch, const char *name, void *address, const char *leaflist, Int_t basketsize, Int_t compress)
            :TBranch(branch,name,address,leaflist,basketsize,compress)
{
}
THbookBranch::~THbookBranch()
{
}
void THbookBranch::Browse(TBrowser *b)
{
   
   THbookTree *tree = (THbookTree*)GetTree();
   THbookFile *file = tree->GetHbookFile();
   file->cd();
   TBranch::Browse(b);
}
Int_t THbookBranch::GetEntry(Long64_t entry, Int_t )
{
   
   THbookTree *tree = (THbookTree*)GetTree();
   THbookFile *file = tree->GetHbookFile();
   if (tree->GetType() == 0) {
      return file->GetEntry(entry,tree->GetID(),0,tree->GetX());
   } else {
      tree->InitBranches(entry);
      return file->GetEntryBranch(entry,tree->GetID());
   }
}
void THbookBranch::SetAddress(void *add)
{
   TBranch::SetAddress(add);
   if (GetUniqueID() != 0) return; 
   THbookTree *tree = (THbookTree*)GetTree();
   THbookFile *file = tree->GetHbookFile();
   if (tree->GetType() != 0) {
      file->SetBranchAddress(tree->GetID(),GetBlockName(),add);
   }
}
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.