17 #include "TDirectory.h"
34 fbBranchExists(kFALSE),
40 GO4TRACE((15,
"TGo4BackStore::TGo4BackStore()", __LINE__, __FILE__));
47 fbBranchExists(kFALSE),
53 GO4TRACE((15,
"TGo4BackStore::TGo4BackStore(TGo4BackStoreParameter* par)", __LINE__, __FILE__));
56 TGo4Log::Error(
"TGo4BackStoreParameter is not specified in TGo4BackStore constructor");
63 SetName(par->GetName());
65 const char* lastname = par->GetTitle();
66 const char* oldname = lastname;
67 lastname=strstr(oldname,
"/");
71 lastname=strstr(oldname,
"/");
73 TString buffer = oldname;
75 TDirectory *dirsav = gDirectory;
77 fxTree =
new TTree(buffer.Data(),
"Go4BackStore");
80 TGo4Log::Debug(
" Tree %s has been created in memory ",buffer.Data());
86 GO4TRACE((15,
"TGo4BackStore::~TGo4BackStore()", __LINE__, __FILE__));
130 GO4TRACE((12,
"TGo4BackStore::Store(TGo4EventElement*)", __LINE__, __FILE__));
139 TString topbranchname(
fxEvent->GetName());
141 TBranch* go4branch=
fxTree->GetBranch(topbranchname.Data());
145 TGo4Log::Debug(
" BackStore: Found existing branch %s , continue filling ",topbranchname.Data() );
147 go4branch->SetAddress(&
fxEvent);
156 TGo4Log::Debug(
" BackStore: Created new branch %s ", topbranchname.Data());
172 Double_t totbytes=
fxTree->GetTotBytes();
177 fxTree->GetName(), totbytes);
virtual void makeBranch(TBranch *parent)
TGo4EventElement * fxEvent
void Reset(Bool_t onlyclearflag=kFALSE)
static const char * fgcTREESUF
static const Int_t fgiMAXAUTOBYTES
static const char * fgcEVBRANCHNAME
Int_t GetSplitlevel() const
virtual Int_t Store(TGo4EventElement *event)
static void Error(const char *text,...)
static void Debug(const char *text,...)