17#include "TDirectory.h"
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());
147 fxEvent->makeBranch(topbranch);
155 Double_t totbytes =
fxTree->GetTotBytes();
Int_t GetSplitlevel() const
Int_t Store(TGo4EventElement *event) override
Stores eventelement event into the storage implementation.
Int_t fiSplit
TBranch splitlevel.
static const char * fgcEVBRANCHNAME
Standard go4 name of the branch used in all treestore and treesource implementations.
Bool_t fbBranchExists
True if branch already exists.
static const char * fgcTREESUF
Standard go4 suffix for tree name.
TGo4EventElement * fxEvent
Points to event structure to be filled into branch.
Int_t fiBufsize
buffer size for tree branch.
Int_t fiFillCount
counter of filled events.
static const Int_t fgiMAXAUTOBYTES
Number of bytes for autosave attempt of tree.
void Reset(Bool_t onlyclearflag=kFALSE)
Dynamic list might reset backstore after processing.
The abstract base class for the data elements of which the unpacked events (or detector structure dat...
Central class of Go4Fit package.
static void Debug(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 0.
static void Error(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 3.
Base class for all parameter aggregations, e.g.