#include "THbookKey.h"
#include "THbookTree.h"
#include "TBrowser.h"
ClassImp(THbookKey)
THbookKey::THbookKey(Int_t id, THbookFile *file)
{
fDirectory = file;
fID = id;
char name[10];
sprintf(name,"h%d",id);
SetName(name);
}
THbookKey::~THbookKey()
{
}
void THbookKey::Browse(TBrowser *b)
{
fDirectory->cd();
TObject *obj = fDirectory->GetList()->FindObject(GetName());
if (obj && !obj->IsFolder()) {
if (obj->InheritsFrom(TCollection::Class()))
obj->Delete();
delete obj;
obj = 0;
}
if (!obj)
obj = fDirectory->Get(fID);
if (b && obj) {
obj->Browse(b);
b->SetRefreshFlag(kTRUE);
}
}
Bool_t THbookKey::IsFolder() const
{
Bool_t ret = kFALSE;
return( ret );
}
ROOT page - Class index - Class Hierarchy - Top of the page
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.