20 #include "TDataMember.h" 21 #include "TDataType.h" 22 #include "TBaseClass.h" 38 TIter iter(folder->GetListOfFolders());
39 while(
auto obj = iter()) {
41 if (entry) entry->
Reset();
49 TIter iter(folder->GetListOfFolders());
50 while(
auto obj = iter()) {
52 if (entry) entry->Print(
"*");
60 TIter iter(folder->GetListOfFolders());
61 while(
auto obj = iter()) {
63 if (entry) entry->RecursiveRemove(objtoremove);
73 TIter iter(folder->GetListOfFolders());
76 while(
auto obj = iter()) {
83 if (!
ProcessHEntry(dynamic_cast<TGo4HistogramEntry*> (entry))) {
88 if (!
ProcessTEntry(dynamic_cast<TGo4TreeHistogramEntry*> (entry), processtrees, interval)) {
103 catch(std::exception& ex) {
105 TString::Format(
"!!!STD exception %s was raised processing dynamic entry!!!", ex.what()).Data());
113 if(!eventclass)
return nullptr;
118 Long_t indexoffset = 0;
119 const char *ixbegin = strchr(memname,
'[');
124 const char *ixend = strchr(ixbegin,
']');
126 TString buf(ixbegin, ixend-ixbegin);
127 indexoffset = buf.Atoll();
128 if(indexoffset < 0) indexoffset = 0;
133 TDataMember *eventmember = eventclass->GetDataMember(memname);
135 *totaloffset+=eventmember->GetOffset();
138 TIter baseiter(eventclass->GetListOfBases());
139 while(
auto ob = baseiter()) {
140 TBaseClass* baseclass =
dynamic_cast<TBaseClass*
>(ob);
144 TClass *bclass = baseclass->GetClassPointer();
149 *totaloffset+=baseclass->GetDelta();
162 const char *tname = eventmember->GetFullTypeName();
164 Int_t maxindex = eventmember->GetMaxIndex(0);
165 if(maxindex < 0) maxindex = 1;
166 if(indexoffset<maxindex)
168 Int_t datasize = eventmember->GetDataType()->Size();
169 *totaloffset += indexoffset*datasize;
174 TString::Format(
"Index %ld for array member:%s out of range %s[%d]", indexoffset, memname, tname, maxindex).Data());
183 if (!hentry)
return true;
192 TDataMember *eventmember =
nullptr;
212 TDataMember *eventmember =
nullptr;
236 evvalid[n] =
event->IsValid();
246 if (!tentry)
return true;
250 if(!processtrees)
return true;
257 TString::Format(
"Tree Histogram Entry: !!! Could not find Tree %s ",tentry->
GetTreeName()).Data());
264 TString::Format(
"Tree Histogram Entry: !!! Could not find Histogram %s ",hname).Data());
273 histo =
dynamic_cast<TH1 *
>(gROOT->FindObject(hname));
275 histo =
dynamic_cast<TH1 *
>(gROOT->FindObjectAny(hname));
void SetNeedInitialisation(Bool_t on=kTRUE)
static void CleanupPointerInEntries(TFolder *folder, TObject *obj)
const char * GetConEventName(Int_t ix) const
const char * GetTreeName() const
const char * GetHistEventName(Int_t ix) const
const char * GetConVarName(Int_t ix) const
void ProcessTreeNew(TTree *tree, Int_t times)
void SetDynListInterval(Int_t value)
TGo4Condition * GetAnalysisCondition(const char *name, const char *cond_cl=nullptr)
const char * GetHistogramName() const
void InitCondPointer(Int_t ix, TObject *event, TDataMember *member, Long_t offset)
Bool_t IsEnabledProcessing() const
static void ResetEntries(TFolder *folder)
static bool ProcessHEntry(TGo4HistogramEntry *hentry)
TH1 * GetHistogram(const char *name)
Bool_t NeedInitialisation() const
static bool ProcessTEntry(TGo4TreeHistogramEntry *tentry, Bool_t processtrees, Int_t interval)
TTree * GetTree(const char *name)
Bool_t AddHistogram(TH1 *his, const char *subfolder=nullptr, Bool_t replace=kTRUE)
static void PrintEntries(TFolder *folder)
static const char * Get_fgcNODATA()
TDataMember * FindDataMember(TClass *eventclass, const char *memname, Long_t *totaloffset)
TObject * fxHisEvents[__MAXHISDIM__]
void InitHistPointer(Int_t ix, TObject *event, TDataMember *member, Long_t offset)
TGo4EventElement * GetEventStructure(const char *name) const
const char * GetConditionName() const
Int_t GetDynListInterval() const
void ProcessNew(Bool_t *evvalid)
static TGo4Analysis * Instance()
static const char * Get_fgcNOEVENT()
TGo4Condition * fxCondition
const char * GetHistVarName(Int_t ix) const
const char * GetHistogramName() const
static void ProcessEntries(TFolder *folder, Bool_t processtrees, Int_t interval)