17 #include "TDirectory.h" 34 fbBranchExists(kFALSE),
40 GO4TRACE((15,
"TGo4BackStore::TGo4BackStore()", __LINE__, __FILE__));
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,
"/");
68 while (lastname !=
nullptr) {
69 oldname = lastname + 1;
70 lastname = strstr(oldname,
"/");
72 TString buffer = oldname;
74 TDirectory *dirsav = gDirectory;
76 fxTree =
new TTree(buffer.Data(),
"Go4BackStore");
79 TGo4Log::Debug(
" Tree %s has been created in memory ",buffer.Data());
85 GO4TRACE((15,
"TGo4BackStore::~TGo4BackStore()", __LINE__, __FILE__));
125 GO4TRACE((12,
"TGo4BackStore::Store(TGo4EventElement *)", __LINE__, __FILE__));
131 TString topbranchname(
fxEvent->GetName());
132 topbranchname +=
".";
133 TBranch *go4branch =
fxTree->GetBranch(topbranchname.Data());
136 TGo4Log::Debug(
" BackStore: Found existing branch %s, continue filling ", topbranchname.Data());
138 go4branch->SetAddress(&
fxEvent);
145 TGo4Log::Debug(
" BackStore: Created new branch %s ", topbranchname.Data());
155 Double_t totbytes =
fxTree->GetTotBytes();
virtual void makeBranch(TBranch *parent)
TGo4EventElement * fxEvent
void Reset(Bool_t onlyclearflag=kFALSE)
static const char * fgcTREESUF
static const Int_t fgiMAXAUTOBYTES
static void Debug(const char *text,...) GO4_PRINTF_ARGS
static const char * fgcEVBRANCHNAME
Int_t Store(TGo4EventElement *event) override
Int_t GetSplitlevel() const
static void Error(const char *text,...) GO4_PRINTF_ARGS