37 GO4TRACE((15,
"TGo4TreeStore::TGo4TreeStore(const char *,...)", __LINE__, __FILE__));
39 TString buffer = TString::Format(
"%s.", name);
47 TGo4Log::Debug(
" TreeStore: Found existing branch %s, reset it ", name);
55 buffer = TString::Format(
"%s%s", filename,
fgcFILESUF);
56 fxFile = TFile::Open(buffer.Data(),
"UPDATE",
"Go4 tree store", compression);
59 TGo4Log::Info(
"TGo4TreeStore: Open file tree %s UPDATE", buffer.Data());
66 TGo4Log::Debug(
" !!! TreeStore creation ERROR: no event structure !!! ");
73 GO4TRACE((15,
"TGo4TreeStore::TGo4TreeStore(const char *,...)", __LINE__, __FILE__));
75 SetName(par->GetName());
76 TString buffer = TString::Format(
"%s.", par->GetName());
84 TGo4Log::Debug(
" TreeStore: Found existing branch %s, reset it ", buffer.Data());
89 TGo4Log::Debug(
" TreeStore: Created new branch %s ", buffer.Data());
95 TGo4Log::Debug(
" TreeStore: Set branch to file %s ", buffer.Data());
96 TGo4Log::Info(
"TGo4TreeStore: Open file tree %s UPDATE", buffer.Data());
106 TGo4Log::Debug(
" !!! TreeStore creation ERROR: no event structure !!! ");
112 GO4TRACE((15,
"TGo4TreeStore::TGo4TreeStore()", __LINE__, __FILE__));
118 GO4TRACE((15,
"TGo4TreeStore::~TGo4TreeStore()", __LINE__, __FILE__));
124 GO4TRACE((12,
"TGo4TreeStore::Store(TGo4EventElement *)", __LINE__, __FILE__));
136 TGo4Log::Debug(
" !!! TreeStore::Store ERROR: this event does not match !!! ");
150 GO4TRACE((12,
"TGo4TreeStore::Store(TGo4Parameter*)", __LINE__, __FILE__));
152 TString oldname = cali->GetName();
153 cali->SetName(TString::Format(
"%s_%d", oldname.Data(),
fxSingletonTree->GetCurrentIndex()).Data());
155 cali->Write(
nullptr, TObject::kOverwrite);
156 cali->SetName(oldname.Data());
164 GO4TRACE((12,
"TGo4TreeStore::SetCompression(Int_t)", __LINE__, __FILE__));
165 fxFile->SetCompressionLevel(comp);
The abstract base class for the data elements of which the unpacked events (or detector structure dat...
static void Info(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 1.
static void Debug(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 0.
static TGo4MainTree * Instance()
Base class for all parameter aggregations, e.g.
TString fxBranchFile
Filename for branch file.
void SetCompression(Int_t comp)
Set the file compression level.
TString fcEventClass
Class name of the event associated with this store.
TFile * fxFile
Optional file where our branches are located.
TBranch * fxBranch
The branch representing our store.
Int_t Store(TGo4EventElement *event) override
Stores eventelement event into the storage implementation.
static const char * fgcFILESUF
Standard suffix for file name.
Int_t fiSplit
TBranch splitlevel.
TGo4MainTree * fxSingletonTree
Reference to external tree singleton wrapper instance.
TTree * fxTree
Reference to the external main tree.
Int_t fiBufsize
buffer size for tree branch.
TGo4EventElement * fxEvent
Points to event structure to be filled into branch.