17#include "TMultiGraph.h"
32#include "TDataMember.h"
33#include "TBaseClass.h"
36#include "TGo4LockGuard.h"
37#include "TGo4ObjectStatus.h"
38#include "TGo4BranchStatus.h"
39#include "TGo4Parameter.h"
40#include "TGo4Condition.h"
41#include "TGo4WinCond.h"
42#include "TGo4PolyCond.h"
43#include "TGo4HistogramEntry.h"
44#include "TGo4TreeHistogramEntry.h"
46#include "TGo4AnalysisObjectNames.h"
47#include "TGo4HistogramStatus.h"
48#include "TGo4TreeStructure.h"
50#include "TGo4EventStore.h"
51#include "TGo4EventSource.h"
52#include "TGo4EventProcessor.h"
53#include "TGo4BackStore.h"
55#include "TGo4Picture.h"
56#include "TGo4CompositeEvent.h"
57#include "TGo4ParameterStatus.h"
58#include "TGo4MemberStatus.h"
103#define fguSUBFOLDERMAXLEN 1024
106 TNamed(name,
"The Go4 Analysis Object Manager")
144 gROOT->GetListOfCleanups()->Add(
this);
150 gROOT->GetListOfCleanups()->Add(
this);
156 gROOT->GetListOfCleanups()->Remove(
this);
160 gROOT->GetListOfBrowsables()->Remove(
fxGo4Dir);
163 gROOT->GetRootFolder()->Remove(
fxGo4Dir);
190 if (obj && (obj !=
this)) {
199 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddObject(TNamed *)",__LINE__, __FILE__));
212 GO4TRACE((11,
"TGo4AnalysisObjectManager::GetAsTObject(const char *, const char *)",__LINE__, __FILE__));
214 TObject *ob =
nullptr;
220 if(ob && ob->InheritsFrom(TTree::Class())) ob =
nullptr;
221 if(ob && ob->InheritsFrom(TFolder::Class())) ob =
nullptr;
222 if(ob && ob->InheritsFrom(TGo4EventElement::Class())) ob =
nullptr;
223 if(ob && ob->InheritsFrom(TGo4EventSource::Class())) ob =
nullptr;
224 if(ob && ob->InheritsFrom(TGo4EventStore::Class())) ob =
nullptr;
225 if(ob && ob->InheritsFrom(TGo4EventProcessor::Class())) ob =
nullptr;
229 ob->GetName(), ob->ClassName());
240 return dynamic_cast<TNamed*
> (
GetAsTObject(name, folder));
246 GO4TRACE((11,
"TGo4AnalysisObjectManager::ClearObject(char *)", __LINE__, __FILE__));
249 TObject *ob =
fxGo4Dir->FindObjectAny(name);
251 if (ob->InheritsFrom(TFolder::Class()))
263 TObject *ob =
fxGo4Dir->FindObjectAny(name);
265 if (ob->InheritsFrom(TFolder::Class()))
277 TObject *ob =
fxGo4Dir->FindObjectAny(name);
279 if (ob->InheritsFrom(TFolder::Class()))
288 Int_t startindex, Int_t *skip,
const char *name,
291 GO4TRACE((11,
"TGo4AnalysisObjectManager::CreateCompositeBranchFolder(TObjArray *,...)",__LINE__, __FILE__));
292 if (!branchlist)
return nullptr;
299 lastindex = startindex + branchlist->GetLast();
304 TFolder *subnames =
nullptr;
305 TList *nameslist =
new TList;
309 Int_t skippedentries = 0;
311 for(Int_t i=startindex; i<lastindex;i++) {
312 TClass *cl =
nullptr;
313 TObject *entry = branchlist->At(i+offset);
314 if(entry && entry->InheritsFrom(TBranch::Class())) {
316 TBranch *currentbranch =
dynamic_cast<TBranch *
> (entry);
317 TObjArray *currentbranchlist =
nullptr;
319 currentbranchlist = currentbranch->GetListOfBranches();
320 cl = gROOT->GetClass(currentbranch->GetClassName());
322 if(cl && cl->InheritsFrom(TGo4CompositeEvent::Class())) {
325 TString branchname(currentbranch->GetName());
326 Ssiz_t leng = branchname.Length();
327 branchname.Resize(leng-1);
329 subevent =
dynamic_cast<TGo4CompositeEvent *
>(csubevents->FindObject(branchname.Data()));
335 subevent->GetName(), subevent->GetTitle());
336 nameslist->AddLast(subnames);
337 offset+=skippedentries;
341 subnames->GetListOfFolders()->AddAll(temp->GetListOfFolders());
348 if(currentbranchlist)
350 if(currentbranchlist->IsEmpty())
354 nameslist->AddLast(state);
359 CreateBranchFolder(currentbranchlist, currentbranch->GetName(), currentbranch->GetTitle());
360 nameslist->AddLast(subnames);
370 if(currentbranchlist)
372 if(currentbranchlist->IsEmpty())
376 nameslist->AddLast(state);
380 subnames =
CreateBranchFolder(currentbranchlist, currentbranch->GetName(), currentbranch->GetTitle());
381 nameslist->AddLast(subnames);
392 *skip = lastindex+offset-startindex;
393 TFolder *fold =
fxTempFolder->AddFolder(name,title,nameslist);
394 fold->SetOwner(kTRUE);
401 GO4TRACE((11,
"TGo4AnalysisObjectManager::CreateTreeStructure(TTree *)",__LINE__, __FILE__));
405 const char *treename=thetree->GetName();
406 const char *treetitle=thetree->GetTitle();
409 TObjArray *branchlist=thetree->GetListOfBranches();
418 GO4TRACE((11,
"TGo4AnalysisObjectManager::CreateTreeStructure(const char *)",__LINE__, __FILE__));
419 TTree *thetree =
nullptr;
421 thetree =
dynamic_cast<TTree *
> (
fxTreeDir->FindObjectAny(treename));
428 if(!cl)
return nullptr;
429 auto nameslist =
new TList;
432 TIter biter(cl->GetListOfBases());
433 while(
auto bob = biter()) {
434 auto baseclass =
dynamic_cast<TBaseClass*
>(bob);
435 if(!baseclass)
continue;
438 auto bclass = baseclass->GetClassPointer();
439 if(!bclass)
continue;
441 if(!strcmp(bclass->GetName(),
"TNamed"))
continue;
446 nameslist->AddLast(subfold);
449 TIter miter(cl->GetListOfDataMembers());
451 while(
auto nob = miter()) {
452 auto mem =
dynamic_cast<TDataMember *
>(nob);
453 if(!mem || mem->IsaPointer())
continue;
458 switch(mem->GetArrayDim()) {
460 sbuf.Form(
"%s[%d]", mem->GetName(), mem->GetMaxIndex(0));
464 sbuf.Form(
"%s[%d][%d]", mem->GetName(), mem->GetMaxIndex(0), mem->GetMaxIndex(1));
468 sbuf = mem->GetName();
472 nameslist->AddLast(state);
476 if (obj && obj->InheritsFrom(TGo4CompositeEvent::Class())) {
481 for (Int_t n = 0; n <= arr->GetLast(); n++) {
486 nameslist->AddLast(subfold);
490 auto memberfolder =
fxTempFolder->AddFolder(membrfoldername, TString(
"Object of class ") + cl->GetName(), nameslist);
492 memberfolder->SetOwner(kTRUE);
498 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddHistogram(TH1 *)",__LINE__, __FILE__));
502 if(rev && his) his->SetDirectory(gROOT);
507 const char *foldername,
508 const char *histoname,
514 const char *ytitle) {
516 TString htype(histotype);
518 if (htype.IsNull()) htype =
"I";
519 TClass *cl =
nullptr;
522 case 'C' : cl = TH1C::Class();
break;
523 case 'D' : cl = TH1D::Class();
break;
524 case 'F' : cl = TH1F::Class();
break;
525 case 'I' : cl = TH1I::Class();
break;
526 case 'S' : cl = TH1S::Class();
break;
527 default : cl = TH1I::Class();
532 if (histo)
return histo;
535 case 'C' : histo =
new TH1C(histoname, histoname, nbinsx, xlow, xup);
break;
536 case 'D' : histo =
new TH1D(histoname, histoname, nbinsx, xlow, xup);
break;
537 case 'F' : histo =
new TH1F(histoname, histoname, nbinsx, xlow, xup);
break;
538 case 'I' : histo =
new TH1I(histoname, histoname, nbinsx, xlow, xup);
break;
539 case 'S' : histo =
new TH1S(histoname, histoname, nbinsx, xlow, xup);
break;
540 default : histo =
new TH1I(histoname, histoname, nbinsx, xlow, xup);
543 if (title) histo->SetTitle(title);
544 if (xtitle) histo->SetXTitle(xtitle);
545 if (ytitle) histo->SetYTitle(ytitle);
551 const char *foldername,
552 const char *histoname,
561 const char *ytitle) {
562 TString htype(histotype);
564 if (htype.IsNull()) htype =
"I";
566 TClass *cl =
nullptr;
569 case 'C' : cl = TH2C::Class();
break;
570 case 'D' : cl = TH2D::Class();
break;
571 case 'F' : cl = TH2F::Class();
break;
572 case 'I' : cl = TH2I::Class();
break;
573 case 'S' : cl = TH2S::Class();
break;
574 default : cl = TH2I::Class();
579 if (histo)
return histo;
582 case 'C' : histo =
new TH2C(histoname, histoname, nbinsx, xlow, xup, nbinsy, ylow, yup);
break;
583 case 'D' : histo =
new TH2D(histoname, histoname, nbinsx, xlow, xup, nbinsy, ylow, yup);
break;
584 case 'F' : histo =
new TH2F(histoname, histoname, nbinsx, xlow, xup, nbinsy, ylow, yup);
break;
585 case 'I' : histo =
new TH2I(histoname, histoname, nbinsx, xlow, xup, nbinsy, ylow, yup);
break;
586 case 'S' : histo =
new TH2S(histoname, histoname, nbinsx, xlow, xup, nbinsy, ylow, yup);
break;
587 default : histo =
new TH2I(histoname, histoname, nbinsx, xlow, xup, nbinsy, ylow, yup);
590 if (title) histo->SetTitle(title);
591 if (xtitle) histo->SetXTitle(xtitle);
592 if (ytitle) histo->SetYTitle(ytitle);
602 GO4TRACE((11,
"TGo4AnalysisObjectManager::CreateBranchFolder(TObjArray *)",__LINE__, __FILE__));
603 if (!branchlist)
return nullptr;
605 TList *nameslist =
new TList;
608 TIter iter(branchlist);
609 while(
auto entry = iter()) {
610 if(entry->InheritsFrom(TBranch::Class())) {
612 TBranch *subbranch =
dynamic_cast<TBranch*
> (entry);
613 TObjArray *subbranchlist = subbranch->GetListOfBranches();
615 if(subbranchlist->IsEmpty()) {
618 nameslist->AddLast(state);
623 TFolder *subnames =
nullptr;
625 TClass *cl = gROOT->GetClass(subbranch->GetClassName());
626 if(cl && cl->InheritsFrom(TGo4CompositeEvent::Class()) && istopbranch) {
628 TString branchname(subbranch->GetName());
629 Ssiz_t leng = branchname.Length();
630 branchname.Resize(leng-1);
633 Int_t skippedentries = 0;
636 &skippedentries, cevent->GetName(), cevent->GetTitle());
641 subnames->GetListOfFolders()->AddAll(temp->GetListOfFolders());
642 for (Int_t t = 0; t < skippedentries; ++t) {
647 subnames =
CreateBranchFolder(subbranchlist, subbranch->GetName(), subbranch->GetTitle());
650 subnames =
CreateBranchFolder(subbranchlist, subbranch->GetName(), subbranch->GetTitle());
652 nameslist->AddLast(subnames);
658 nameslist->AddLast(state);
664 TFolder *fold =
fxTempFolder->AddFolder(name,title,nameslist);
665 fold->SetOwner(kTRUE);
672 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddTree(TTree *, const char *)",__LINE__, __FILE__));
678 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemoveTree(TTree *, const char *)",__LINE__, __FILE__));
679 if (!tree)
return kFALSE;
688 GO4TRACE((11,
"TGo4AnalysisObjectManager::GetHistogram(const char *)",__LINE__, __FILE__));
696 GO4TRACE((11,
"TGo4AnalysisObjectManager::GetTree(char *)",__LINE__, __FILE__));
702 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemoveHistogram(char*)",__LINE__, __FILE__));
708 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddAnalysisCondition(TGo4Condition *)",__LINE__, __FILE__));
713 Bool_t counter, TFolder *parent)
715 GO4TRACE((11,
"TGo4AnalysisObjectManager::SetAnalysisCondition(char*, TGo4Condition *, Bool_t)",__LINE__, __FILE__));
717 if(!con)
return kFALSE;
721 TFolder *topfolder =
nullptr;
727 TObject *searchresult=topfolder->FindObjectAny(name);
729 searchresult=
fxUserDir->FindObjectAny(name);
732 if(searchresult && searchresult->InheritsFrom(TGo4Condition::Class())) {
735 if (searchresult && searchresult->InheritsFrom(TFolder::Class())) {
737 auto subf =
dynamic_cast<TFolder *
>(searchresult);
738 searchresult = subf->FindObjectAny(name);
750 const char *separ = strrchr(name,
'/');
752 TString fname(name, separ-name);
763 GO4TRACE((11,
"TGo4AnalysisObjectManager::GetAnalysisCondition(char*)",__LINE__, __FILE__));
769 if(!cond->InheritsFrom(cond_cl)) cond =
nullptr;
775 const char *conditionname,
778 const char *bindhistogram,
784 if (wcond)
return wcond;
790 if (invert) wcond->
Invert(invert);
796 const char *conditionname,
801 const char *bindhistogram,
807 if (wcond)
return wcond;
813 if (invert) wcond->
Invert(invert);
819 const char *conditionname,
821 Float_t (*points)[2],
822 const char *bindhistogram,
828 if (pcond)
return pcond;
830 TArrayF fullx(size+1), fully(size+1);
831 int numpoints = size;
833 for (
int i = 0; i < numpoints; i++) {
834 fullx[i] = points[i][0];
835 fully[i] = points[i][1];
839 if ((fullx[0]!=fullx[numpoints-1]) || (fully[0]!=fully[numpoints-1])) {
840 fullx[numpoints] = fullx[0];
841 fully[numpoints] = fully[0];
845 TCutG mycat(
"initialcut", numpoints, fullx.GetArray(), fully.GetArray());
850 if (invert) pcond->
Invert(invert);
858 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemoveAnalysisCondition(char*)",__LINE__, __FILE__));
864 TNamed *
object =
GetObject(name, folder);
870 if(!obj)
return nullptr;
872 if(obj->InheritsFrom(TH1::Class()))
875 if(obj->InheritsFrom(TGo4Parameter::Class()))
883 GO4TRACE((11,
"TGo4AnalysisObjectManager::CreateNamesList()",__LINE__, __FILE__));
888 if (!name || (strlen(name) == 0)) name =
"Go4NamesList";
897 GO4TRACE((11,
"TGo4AnalysisObjectManager::CreateNamesFolder(TFolder *)",__LINE__, __FILE__));
898 if (!objectfolder)
return nullptr;
900 auto nameslist =
new TList;
901 TIter listiter(objectfolder->GetListOfFolders());
902 while(
auto entry = listiter()) {
903 if(entry->InheritsFrom(TFolder::Class())) {
905 auto subobj=
dynamic_cast<TFolder *
>(entry);
907 nameslist->AddLast(subnames);
908 }
else if (entry->InheritsFrom(TTree::Class())) {
910 auto subobj =
dynamic_cast<TTree *
> (entry);
912 nameslist->AddLast(treestruct);
913 }
else if(entry->InheritsFrom(TGo4EventElement::Class())) {
916 nameslist->AddLast(evfolder);
920 nameslist->AddLast(state);
924 auto namesfolder =
fxTempFolder->AddFolder(objectfolder->GetName(),objectfolder->GetTitle(),nameslist);
926 namesfolder->SetOwner(kTRUE);
938 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddEventStore(TGo4EventStore *)",__LINE__, __FILE__));
944 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemoveEventStore(TGo4EventStore *)",__LINE__, __FILE__));
958 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddEventSource(TGo4EventSource *)",__LINE__, __FILE__));
964 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemoveEventSource(TGo4EventSource *)",__LINE__, __FILE__));
975 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddEventProcessor(TGo4EventProcessor *)",__LINE__, __FILE__));
981 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemoveEventProcessor(TGo4EventProcessor *)",__LINE__, __FILE__));
993 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddEventStructure(TGo4EventElement *)",__LINE__, __FILE__));
999 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemoveEventStructure(TGo4EventElement *)",__LINE__, __FILE__));
1013 GO4TRACE((11,
"TGo4AnalysisObjectManager::GetEvenStructure(const char *)",__LINE__, __FILE__));
1015 if (!name || (strlen(name) == 0))
return nullptr;
1017 TString path = name;
1020 while (path.Length()>0) {
1021 Int_t pos = path.Index(
"/");
1022 if (pos == 0) { path.Remove(0, 1);
continue; }
1025 if (pos > 0) { sub.Resize(pos); path.Remove(0, pos+1); }
1026 else { path.Clear(); }
1036 if (!chld && curr->InheritsFrom(sub.Data()))
return curr;
1040 if (!curr)
return nullptr;
1048 if (entry) entry->
Reset();
1054 GO4TRACE((11,
"TGo4AnalysisObjectManager::ResetBackStores()",__LINE__, __FILE__));
1057 while(
auto entry = iter()) {
1059 if(bs) bs->
Reset(clearflag);
1066 GO4TRACE((14,
"TGo4AnalysisObjectManager::CloseAnalysis()",__LINE__, __FILE__));
1083 TDirectory::TContext ctxt(file);
1087 file->Write(
nullptr, TObject::kOverwrite);
1097 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddParameter(TGo4Parameter *)",__LINE__, __FILE__));
1103 GO4TRACE((11,
"TGo4AnalysisObjectManager::SetParameter(const char *, TGo4Parameter *)",__LINE__, __FILE__));
1105 if (!par)
return kFALSE;
1107 Bool_t rev = kFALSE;
1113 TGo4Log::Info(
"Updated parameter %s from parameter %s", name, par->GetName());
1119 const char *separ = strrchr(name,
'/');
1121 TString fname(name, separ-name);
1123 TGo4Log::Info(
"Added new parameter %s to folder %s/%s", clonedpar->GetName(), topfolder->GetName(), fname.Data());
1132 GO4TRACE((11,
"TGo4AnalysisObjectManager::SetParameter(char*, TGo4Parameter*)",__LINE__, __FILE__));
1134 if (!status)
return kFALSE;
1136 Bool_t rev = kFALSE;
1148 const char *separ = strrchr(name,
'/');
1150 TString fname(name, separ-name);
1161 GO4TRACE((11,
"TGo4AnalysisObjectManager::GetParameter(char*)",__LINE__, __FILE__));
1164 if (rev && parameter_class && !rev->InheritsFrom(parameter_class))
1171 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemoveParameter(char*)",__LINE__, __FILE__));
1177 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddPicture(TGo4Picture *)",__LINE__, __FILE__));
1178 if(!pic)
return kFALSE;
1186 GO4TRACE((11,
"TGo4AnalysisObjectManager::SetPicture(char*, TGo4Picture *)",__LINE__, __FILE__));
1188 if (!pic)
return kFALSE;
1203 const char *separ = strrchr(name,
'/');
1205 TString fname(name, separ-name);
1215 GO4TRACE((11,
"TGo4AnalysisObjectManager::GetPicture(char*)",__LINE__, __FILE__));
1223 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemovePicture(char*)",__LINE__, __FILE__));
1229 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddCanvas(TCanvas *)",__LINE__, __FILE__));
1233 if (rev && can) can->SetBit(kMustCleanup);
1243 GO4TRACE((11,
"TGo4AnalysisObjectManager::GetPicture(const char *)",__LINE__, __FILE__));
1251 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemovePicture(const char *)",__LINE__, __FILE__));
1257 GO4TRACE((11,
"TGo4AnalysisObjectManager::LoadObjects(TFile *)",__LINE__, __FILE__));
1261 TFolder *top =
dynamic_cast<TFolder *
>(ob);
1298 const char *hevx,
const char *hmemx,
1299 const char *hevy,
const char *hmemy,
1300 const char *hevz,
const char *hmemz,
1301 const char *condition,
1302 const char *cevx,
const char *cmemx,
1303 const char *cevy,
const char *cmemy)
1305 if(!name || !histo || !hevx || !hmemx)
1309 entry->SetHistogramName(histo);
1311 if (hevx && hmemx) {
1312 entry->SetHisEventName(0, hevx);
1313 entry->SetHisVarName(0, hmemx);
1316 if (hevy && hmemy) {
1317 entry->SetHisEventName(1, hevy);
1318 entry->SetHisVarName(1, hmemy);
1321 if (hevz && hmemz) {
1322 entry->SetHisEventName(2, hevz);
1323 entry->SetHisVarName(2, hmemz);
1326 if(condition && cevx && cmemx) {
1327 entry->SetConditionName(condition);
1328 entry->SetConEventName(0, cevx);
1329 entry->SetConVarName(0, cmemx);
1331 entry->SetConEventName(1, cevy);
1332 entry->SetConVarName(1, cmemy);
1341 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddTreeHistogram(char*,...)",__LINE__, __FILE__));
1343 Bool_t rev = kFALSE;
1364 GO4TRACE((11,
"TGo4AnalysisObjectManager::FindSubFolder(TFolder *, const char *, Bool_t)",__LINE__, __FILE__));
1366 TFolder *result =
nullptr;
1367 if (!parent)
return nullptr;
1368 if (!subfolder)
return parent;
1369 const char *separ = strchr(subfolder,
'/');
1372 TString subname(subfolder, separ - subfolder);
1374 auto nextsubfolder =
FindSubFolder(parent, subname.Data(), create);
1378 TIter listiter(parent->GetListOfFolders());
1379 TObject *bigger_entry =
nullptr;
1380 while (
auto entry = listiter()) {
1381 if (entry->InheritsFrom(TFolder::Class())) {
1382 int cmp = strcmp(subfolder, entry->GetName());
1384 result =
dynamic_cast<TFolder *
>(entry);
1388 bigger_entry = entry;
1394 if(!result && create) {
1395 TList *lst =
nullptr;
1397 lst =
dynamic_cast<TList *
> (parent->GetListOfFolders());
1399 result =
new TFolder(subfolder,
"UserFolder");
1400 lst->AddBefore(bigger_entry, result);
1402 result = parent->AddFolder(subfolder,
"UserFolder");
1412 const char *subfolder,
1417 GO4TRACE((11,
"TGo4AnalysisObjectManager::AddObjectToFolder(TObject *, TFolder *, const char *, Bool_t, Bool_t, Bool_t)",__LINE__, __FILE__));
1420 if(!fold)
return kFALSE;
1423 GO4TRACE((12,
"TGo4AnalysisObjectManager::AddObjectToFolder - zero object",__LINE__, __FILE__));
1433 if (subfolder && (strlen(subfolder) != 0)) {
1434 subname = subfolder;
1435 if (subname[subname.Length()-1] ==
'/')
1436 subname.Resize(subname.Length()-1);
1439 TObject *oldob =
nullptr;
1442 oldob = fold->FindObjectAny(ob->GetName());
1446 if (subname.Length() > 0)
1447 obname = subname +
"/" + ob->GetName();
1449 obname = ob->GetName();
1452 oldob = fold->FindObjectAny(obname.Data());
1458 if(replace && ob!=oldob) {
1460 fold->RecursiveRemove(oldob);
1468 TFolder *addDir =
nullptr;
1471 if(!addDir) addDir = fold;
1481 GO4TRACE((11,
"TGo4AnalysisObjectManager::RemoveObjectFromFolder(const char *, TFolder *, Bool_t)",__LINE__, __FILE__));
1483 if(!fold)
return kFALSE;
1485 TObject *obj =
nullptr;
1489 strncpy(buffer,fullname,buflen-10);
1490 obj = fold->FindObjectAny(buffer);
1494 fold->RecursiveRemove(obj);
1496 if (isDel)
delete obj;
1507 if (!source)
return kFALSE;
1508 GO4TRACE((11,
"TGo4AnalysisObjectManager::LoadFolder(TFolder *, TFolder *, Bool_t)",__LINE__, __FILE__));
1511 TIter folderiter(source->GetListOfFolders());
1512 while (
auto ob = folderiter()) {
1513 if (ob->InheritsFrom(TFolder::Class())) {
1514 TFolder *subfolder =
dynamic_cast<TFolder *
>(ob);
1516 TFolder *subdest =
FindSubFolder(destination, subfolder->GetName(), kTRUE);
1528 GO4TRACE((11,
"TGo4AnalysisObjectManager::LoadFolder(TDirectory *, TFolder *, Bool_t replace)",__LINE__, __FILE__));
1529 if(!source || !destination)
return kFALSE;
1533 TDirectory::TContext ctxt(source);
1535 TIter keyiter(source->GetListOfKeys());
1536 while (
auto keyob = keyiter()) {
1537 auto key =
dynamic_cast<TKey *
>(keyob);
1542 TObject *ob = key->ReadObj();
1545 ob = source->Get(key->GetName());
1552 if (ob->InheritsFrom(TDirectory::Class())) {
1553 TDirectory *subdir =
dynamic_cast<TDirectory *
>(ob);
1555 Bool_t inpicturefolder = kFALSE;
1557 inpicturefolder = kTRUE;
1558 if (inpicturefolder)
1560 TFolder *subdest =
FindSubFolder(destination, subdir->GetName(), kTRUE);
1562 if (inpicturefolder)
1574 if(!ob || !destination)
return kFALSE;
1576 if (ob->InheritsFrom(TGo4DynamicEntry::Class())) {
1580 }
else if(ob->InheritsFrom(TGo4Parameter::Class())) {
1584 }
else if(ob->InheritsFrom(TGo4Picture::Class())) {
1588 }
else if(ob->InheritsFrom(TGo4Condition::Class())) {
1592 }
else if(ob->InheritsFrom(TH1::Class())) {
1595 TH1 *his =
dynamic_cast<TH1 *
>(ob);
1597 his->SetDirectory(gROOT);
1601 }
else if(ob->InheritsFrom(TCanvas::Class())) {
1602 TObject *addob = ob->Clone();
1608 if (gPad==addob) gPad =
nullptr;
1611 TObject *addob = ob->Clone();
1623 if (!source)
return kFALSE;
1626 TIter folderiter(source->GetListOfFolders());
1627 while (
auto ob = folderiter()) {
1628 if (ob->InheritsFrom(TFolder::Class())) {
1629 TFolder *subfolder =
dynamic_cast<TFolder *
>(ob);
1631 TDirectory *currentdir = gDirectory;
1632 const char *subfoldername = subfolder->GetName();
1633 TDirectory *subdir =
dynamic_cast<TDirectory *
>(currentdir->Get(subfoldername));
1635 subdir = currentdir->mkdir(subfoldername,
"subdir");
1655 if(!ob || !dir)
return;
1669 if(!fold || !dir)
return;
1671 TIter iter(fold->GetListOfFolders());
1672 while(
auto ob = iter()) {
1673 if(ob->InheritsFrom(TFolder::Class())) {
1674 TFolder *subfolder =
dynamic_cast<TFolder *
>(ob);
1678 dir->RecursiveRemove(ob);
1686 GO4TRACE((11,
"TGo4AnalysisObjectManager::PrintFolder(TFolder *, Option_t *)",__LINE__, __FILE__));
1688 Int_t totalsize = 0;
1689 TROOT::IndentLevel();
1690 TROOT::IncreaseDirLevel();
1691 std::cout <<
"+Folder " << fold->GetName() <<
" content:" << std::endl;
1692 TIter listiter(fold->GetListOfFolders());
1693 while(
auto ob = listiter()) {
1694 if(ob->InheritsFrom(TFolder::Class()))
1695 totalsize +=
PrintFolder(
dynamic_cast<TFolder *
>(ob),opt,expression);
1696 else if(
IsMatching(ob->GetName(),expression)) {
1697 TROOT::IndentLevel();
1705 TROOT::DecreaseDirLevel();
1706 TROOT::IndentLevel();
1707 std::cout <<
"++++End "<<fold->GetName()<<
"++++++++++" << std::endl;
1713 GO4TRACE((11,
"TGo4AnalysisObjectManager::ClearFolder(TFolder *, Option_t *)",__LINE__, __FILE__));
1714 if(!fold)
return kFALSE;
1716 TIter iter(fold->GetListOfFolders());
1717 while(
auto ob = iter())
1718 if(ob->InheritsFrom(TFolder::Class()))
1727 GO4TRACE((11,
"TGo4AnalysisObjectManager::ClearObject(TObject *)",__LINE__, __FILE__));
1728 Bool_t rev = kFALSE;
1733 if (ob->InheritsFrom(TH1::Class())) {
1734 TH1 *his =
dynamic_cast<TH1 *
>(ob);
1737 }
else if (ob->InheritsFrom(TGo4DynamicEntry::Class())) {
1741 }
else if (ob->InheritsFrom(TGo4Picture::Class())) {
1745 }
else if (ob->InheritsFrom(TGraph::Class())) {
1746 TGraph *gr =
dynamic_cast<TGraph *
>(ob);
1752 }
else if (ob->InheritsFrom(TMultiGraph::Class())) {
1753 TMultiGraph *mg =
dynamic_cast<TMultiGraph *
>(ob);
1755 TIter liter(mg->GetListOfGraphs());
1756 while (
auto gr = liter())
1759 }
else if (ob->InheritsFrom(TGo4EventElement::Class())) {
1763 }
else if (ob->InheritsFrom(TTree::Class())) {
1778 GO4TRACE((11,
"TGo4AnalysisObjectManager::DeleteFolder(TFolder *)", __LINE__, __FILE__));
1783 TIter iter(fold->GetListOfFolders());
1784 while (
auto ob = iter())
1785 if (ob->InheritsFrom(TFolder::Class()))
1794 GO4TRACE((11,
"TGo4AnalysisObjectManager::DeleteObject(TObject *)",__LINE__, __FILE__));
1807 TIter listiter(fold->GetListOfFolders());
1808 while (
auto ob = listiter())
1809 if (ob->InheritsFrom(TFolder::Class()))
1818 if(!ob || !flags)
return kFALSE;
1819 TString opt = flags;
1829 GO4TRACE((11,
"TGo4AnalysisObjectManager::CleanupDynamicLists(TNamed*)", __LINE__, __FILE__));
1834 if (oldobject->InheritsFrom(TH1::Class()) || oldobject->InheritsFrom(TGo4Condition::Class()) ||
1835 oldobject->InheritsFrom(TGo4EventElement::Class()))
1841 GO4TRACE((11,
"TGo4AnalysisObjectManager::PrintConditions(const char *)",__LINE__, __FILE__));
1843 std::cout <<
"___________________________________________________________" << std::endl;
1844 std::cout <<
"Total size of all conditions is: " << totalsize <<
" bytes." << std::endl;
1849 GO4TRACE((11,
"TGo4AnalysisObjectManager::PrintHistograms(const char *)",__LINE__, __FILE__));
1851 std::cout <<
"___________________________________________________________" << std::endl;
1852 std::cout <<
"Total size of all histograms is: " << totalsize <<
" bytes." << std::endl;
1857 GO4TRACE((11,
"TGo4AnalysisObjectManager::PrintParameters(const char *)",__LINE__, __FILE__));
1859 std::cout <<
"___________________________________________________________" << std::endl;
1860 std::cout <<
"Total size of all parameters is: " << totalsize <<
" bytes." << std::endl;
1877 TFolder *searchfold;
1888 auto result =
new TList;
1890 TIter iter(fold->GetListOfFolders());
1891 while(
auto entry = iter()) {
1892 if(entry->InheritsFrom(TFolder::Class())) {
1893 auto subfold=
dynamic_cast<TFolder *
>(entry);
1896 result->AddAll(sublist);
1898 if(entry->InheritsFrom(TTree::Class())) {
1900 if(entry->InheritsFrom(TGo4EventElement::Class())) {
1902 if(entry->InheritsFrom(TGo4EventSource::Class())) {
1904 if(entry->InheritsFrom(TGo4EventStore::Class())) {
1906 if(entry->InheritsFrom(TGo4EventProcessor::Class())) {
1909 result->AddLast(entry);
1918 if(!expression)
return kTRUE;
1919 Bool_t ismatching = kFALSE;
1920 TString entrystring = string;
1921 TRegexp reg(expression,kTRUE);
1922 if(!strcmp(expression,
"*"))
1926 else if (entrystring.Index(reg,0)!=kNPOS)
1929 ismatching = kFALSE;
1936 GO4TRACE((12,
"TGo4AnalysisObjectManager::FindObjectInFolder(TFolder *, const char *)",__LINE__, __FILE__));
1939 return folder ? folder->FindObjectAny(fullname) :
nullptr;
1946 if (pathname && (strlen(pathname) == 0))
1949 fullname = pathname;
1952 fullname += objectname;
1956 if (obj && !obj->InheritsFrom(cl)) {
1967 if (!obj)
return kFALSE;
1971 if (fold->GetListOfFolders()->FindObject(obj) == obj) {
1976 TIter iter(fold->GetListOfFolders());
1977 while (
auto sub = iter()) {
1978 if (!sub->InheritsFrom(TFolder::Class()))
continue;
1980 if (pathname.IsNull())
1981 pathname = sub->GetName();
1983 pathname = TString(sub->GetName()) +
"/" + pathname;
void SafeFolderClear(TFolder *folder)
#define fguSUBFOLDERMAXLEN
static const char * fgcTMPFOLDER
Temporary dummy folder name.
TFolder * fxProcessorDir
Directory containing references to event processors.
static const char * GetTMPFOLDER()
TH1 * MakeTH1(const char *histotype, const char *foldername, const char *histoname, Int_t nbinsx, Axis_t xlow, Axis_t xup, const char *title=nullptr, const char *xtitle=nullptr, const char *ytitle=nullptr)
Create 1-dim histogram in histogram folder.
Bool_t IsMatching(const char *string, const char *expression) const
Finds out if string is matching the expression.
Bool_t RemoveTree(TTree *tree, const char *stepname=nullptr)
Remove reference to a tree in the go4 folder structure.
void PrintDynamicList()
Print entries of current dynamic list.
TFolder * fxParameterDir
Directory containing user parameter objects.
Bool_t ProtectFolder(TFolder *fold, const Option_t *flags)
Change protection properties of all objects in this folder as specified.
Bool_t ClearFolder(TFolder *fold)
Clear (reset) all objects in folder fold, e.g.
static const char * GetTOPDYNAMICLIST()
Int_t fiDynListCount
Event counter for dynamic list processing.
Bool_t AddCanvas(TCanvas *can, const char *subfolder=nullptr)
Puts a new TCanvas in corresponding folder.
static const char * fgcANALYSISFOLDER
top analysis objects reference folder name
TFolder * fxUserDir
Directory containing all user objects.
TMutex * fxDirMutex
Mutex protecting the object directories.
Bool_t ProtectObjects(const char *name, const Option_t *flags)
Change protection properties of object name as specified.
void PrintConditions(const char *expression=nullptr)
Print all condition counters to the terminal.
TGo4AnalysisObjectManager()
TFolder * fxEventDir
Directory containing references to event structures.
Bool_t fbCreatedinMake
Boolean flag indicates, if object was created in last calls of one of Make* functions.
TFolder * fxTempFolder
Temporary folder for nameslist objects.
static const char * GetTREEFOLDER()
Bool_t AddParameter(TGo4Parameter *par, const char *subfolder=nullptr)
Puts a new parameter object in corresponding folder.
void SaveObjects(TFile *file)
Save folder structure to given file.
Int_t PrintFolder(TFolder *fold, Option_t *opt, const char *expression=nullptr)
Printout all objects in folder fold on the terminal.
static const char * GetHISTFOLDER()
Bool_t DeleteObjects(const char *name)
Delete object of name, or all objects in folder name, respectively.
TGo4Condition * GetAnalysisCondition(const char *name, const char *cond_cl=nullptr)
Retrieves an analysis condition from list by name.
Bool_t ClearObjects(const char *name)
Clear (reset) the specified objects.
Bool_t AddEventStructure(TGo4EventElement *ev)
Add reference to event structure object to Go4 Folder structure.
static const char * fgcSRCFOLDER
Event source reference folder name.
TFolder * fxHistogramDir
Directory containing all histogram objects to be used by dynamic list and user analysis.
void AppendToDir(TObject *ob, TDirectory *dir)
Append object ob to directory dir.
void CloseAnalysis()
Cleanups required when analysis is closed.
static const char * GetSTOREFOLDER()
Bool_t RemoveParameter(const char *name)
Removes parameter by name.
Bool_t AddObject(TNamed *anything, const char *subfolder=nullptr, Bool_t replace=kTRUE)
Add any external object to the user object folder.
Bool_t DeleteFolder(TFolder *fold)
Delete all objects in folder fold only if the kGo4CanDelete bit is set.
Bool_t RemoveEventProcessor(TGo4EventProcessor *pro)
Remove reference to event processor from go4 folder structure.
static const char * fgcEVENTFOLDER
Event references folder name.
TH1 * GetHistogram(const char *name)
Search histogram in histogram list (directory).
TFolder * CreateCompositeBranchFolder(TObjArray *branchlist, TGo4CompositeEvent *compevent, Int_t startindex, Int_t *skip, const char *name, const char *title)
Create a folder with subfolders from a list of TBranchElements that belongs to a TGo4CompositeEvent.
Bool_t SetParameterStatus(const char *name, TGo4ParameterStatus *par, TFolder *parent=nullptr)
Set existing parameter of name to the values of external parameter object par.
TFolder * fxConditionDir
Directory containing all condition objects to be used by dynamic list and by user analysis.
static const char * GetUSRFOLDER()
static const char * fgcTOPFOLDER
Top level folder name.
static const char * fgcUSRFOLDER
User objects folder name.
static const char * GetDYNFOLDER()
Bool_t RemovePicture(const char *name)
Removes picture by name.
void RecursiveRemove(TObject *obj) override
Method used in case when object is cleaned up by the ROOT.
Bool_t RemoveEventSource(TGo4EventSource *source)
Remove reference to event source from go4 folder structure.
Bool_t AddTree(TTree *tree, const char *subfolder=nullptr)
Add reference to a tree in the go4 folder structure.
Bool_t fbSuppressLoadHistograms
If this is set to true, any found histogram will not be loaded from the file current TDirectory.
TGo4ObjectStatus * CreateObjectStatus(const char *name, const char *folder=nullptr)
Find Object of name in the folder structure and create a complete status object of it.
void ProcessDynamicList()
Loop over the dynamic list and process the actions linked to the entries.
TFolder * fxStoreDir
Directory containing references to event stores.
TFolder * GetObjectFolder()
Access to top folder of all objects.
void CleanupDynamicLists(TObject *oldobject)
Remove reference to object from all dynamic lists.Object type is noticed automatically.
Bool_t AddHistogram(TH1 *his, const char *subfolder=nullptr, Bool_t replace=kTRUE)
Add external histogram to go4 histogram directory.
static const char * fgcCANVFOLDER
TCanvas folder name.
static const char * fgcSTOREFOLDER
Event store reference folder name.
TObject * TestObject(TFolder *folder, const char *&pathname, const char *objectname, const TClass *cl)
Test, if object exists in provided folder.
static const char * GetTOPFOLDER()
Bool_t RemoveDynamicEntry(const char *entryname)
Remove entry of that name from dynamic list of listname.
void PrintParameters(const char *expression=nullptr)
Print all parameters to the terminal.
static const char * GetSRCFOLDER()
Bool_t RemoveEventStructure(TGo4EventElement *ev)
Remove reference to event structure from go4 folder structure.
TObject * FindObjectInFolder(TFolder *folder, const char *fullname) const
Search in folder for object with specified name Uses fxDirMutex until search is working.
Bool_t ResetBackStores(Bool_t clearflag=kFALSE)
Reset all registered backstore instances.Called by dynamic list processing.
TGo4WinCond * MakeWindowCond(const char *foldername, const char *conditionname, Double_t xlow, Double_t xup, const char *bindhistogram=nullptr, Bool_t invert=kFALSE)
Create 1-dim window condition in conditions folder.
Bool_t RemoveEventStore(TGo4EventStore *store)
Remove reference to event store from go4 folder structure.
TFolder * fxCanvasDir
Directory containing TCanvases.
Bool_t AddObjectToFolder(TObject *ob, TFolder *fold, const char *subfolder=nullptr, Bool_t replace=kTRUE, Bool_t uniquename=kFALSE, Bool_t resetbits=kTRUE)
Add any named object to a folder.
TFolder * fxAnalysisDir
Top Directory for all references to event classes.
TFolder * fxGo4Dir
Top level Go4 Directory (root folder).
static const char * fgcPARAFOLDER
Analysis user parameters folder name.
TCanvas * GetCanvas(const char *name)
Retrieves a TCanvas by name from the Canvases folder.
TList * fxMatchList
List of matching objects for name expression.
Bool_t SetPicture(const char *name, TGo4Picture *pic, TFolder *parent=nullptr)
Set existing picture of name to the values of external picture object pic.
Bool_t AddEventProcessor(TGo4EventProcessor *pro)
Add reference to event processor object to Go4 Folder structure.
Bool_t AddDynamicHistogram(const char *name, const char *histo, const char *hevx, const char *hmemx, const char *hevy=nullptr, const char *hmemy=nullptr, const char *hevz=nullptr, const char *hmemz=nullptr, const char *condition=nullptr, const char *cevx=nullptr, const char *cmemx=nullptr, const char *cevy=nullptr, const char *cmemy=nullptr)
Add (create) new dynamic histogram entry which connects an existing histogram with existing condition...
static const char * GetPICTFOLDER()
TGo4AnalysisObjectNames * CreateNamesList()
Creates a list of names (keys) of all objects in analysis directories.
TFolder * fxDynListDir
Directory containing all action objects to be used by dynamic list and by user analysis.
static const char * fgcDYNFOLDER
Dynamic lists folder name.
TObject * NextMatchingObject(const char *expr, const char *folder, Bool_t reset)
Delivers pointer to next object of the Go4 folder structure with a name matching the expression expr.
TFolder * fxTreeDir
Directory containing references to trees.
TH2 * MakeTH2(const char *histotype, const char *foldername, const char *histoname, Int_t nbinsx, Axis_t xlow, Axis_t xup, Int_t nbinsy, Axis_t ylow, Axis_t yup, const char *title=nullptr, const char *xtitle=nullptr, const char *ytitle=nullptr)
Create 2-dim histogram in histogram folder.
TGo4Parameter * GetParameter(const char *name, const char *parameter_class=nullptr)
Retrieves a parameter object by name from the object folder.
Bool_t AddDynamicEntry(TGo4DynamicEntry *entry)
Adds entry to object manager.
TObject * GetAsTObject(const char *name, const char *folder=nullptr)
Searches for object by name in all go4 folders.
TFolder * fxPictureDir
Directory containing the pictures.
Bool_t RemoveHistogram(const char *name, Bool_t del=kTRUE)
Removes histogram from histogram dir by name.
TList * CreateObjectList(const char *expr, const char *folder=nullptr)
Create a list of objects which names are matching expression expr.
Bool_t SaveFolder(TFolder *source)
Save this folder as a new subdirectory (TDirectory) of the current directory i.e.
static const char * fgcTREEFOLDER
Tree reference folder name.
Bool_t IsSortedOrder() const
Returns true if sub-folders will be created in sorted order.
TGo4EventElement * GetEventStructure(const char *name) const
Search reference to event structure in folder.
static const char * GetANALYSISFOLDER()
Bool_t AddAnalysisCondition(TGo4Condition *con, const char *subfolder=nullptr)
Puts a new analysis condition object in corresponding list.
static const char * fgcCONDFOLDER
Analysis conditions folder name.
Bool_t AddEventSource(TGo4EventSource *source)
Add reference to event source object to Go4 Folder structure.
static const char * GetPARAFOLDER()
TFolder * FindSubFolder(TFolder *parent, const char *subfolder, Bool_t create=kTRUE)
Get pointer to subfolder of parent specified by name.
Bool_t LoadFolder(TFolder *source, TFolder *destination, Bool_t replace=kFALSE)
Update folder destination with the content of the folder source.
TNamed * GetObject(const char *name, const char *folder=nullptr)
Searches for object by name in all go4 folders.
static const char * fgcPICTFOLDER
Picture objects folder name.
static const char * fgcPROCFOLDER
Event processor reference folder name.
TFolder * CreateMembersFolder(TObject *obj, const char *membrfoldername, TClass *cl)
Create a folder with members of this class.
static const char * fgcTOPDYNAMICLIST
Default name of the default (toplevel) dynamic list.
Bool_t DeleteObject(TObject *ob)
Delete the specified object if the kGo4CanDelete bit is set.
TGo4Picture * GetPicture(const char *name)
Retrieves a picture object by name from the object folder.
static const char * GetCANVFOLDER()
TFolder * CreateBranchFolder(TObjArray *branchlist, const char *name, const char *title, Bool_t istopbranch=kFALSE)
Create a folder with subfolders from a list of TBranchElements.
void ResetCurrentDynList()
Reset the current dynamic list.
void RemoveFromDir(TFolder *fold, TDirectory *dir)
Remove all objects in folder fold from directory dir, recursively.
Bool_t AddPicture(TGo4Picture *pic, const char *subfolder=nullptr)
Puts a new picture object in corresponding folder.
TGo4PolyCond * MakePolyCond(const char *foldername, const char *conditionname, Int_t size, Float_t(*points)[2], const char *bindhistogram=nullptr, Bool_t invert=kFALSE)
Create polygon 2-dim condition in conditions folder.
static const char * fgcHISTFOLDER
Histograms folder name.
static const char * GetPROCFOLDER()
Bool_t PutToFolder(TObject *ob, TFolder *destination, Bool_t replace=kFALSE)
Method used by both LoadFolder variants to assign object ob into destination folder by object type.
Bool_t SetAnalysisCondition(const char *name, TGo4Condition *con, Bool_t counter=kTRUE, TFolder *parent=nullptr)
Set existing analysis condition of name to the values of external condition object con.
TTree * GetTree(const char *name)
Search tree in tree folder.
static const char * GetEVENTFOLDER()
TGo4TreeStructure * CreateTreeStructure(TTree *thetree)
Create a tree structure object that maps the TBranchelements into a TFolder hierarchy.
Bool_t ClearObject(TObject *ob)
Clear (reset) the specified object.
Int_t GetDynListInterval() const
Bool_t LoadObjects(TFile *statusfile)
Load objects from file.
Bool_t RemoveObject(const char *name, Bool_t del=kTRUE)
Removes object from user object folder by name.
Bool_t AddTreeHistogram(const char *hisname, const char *treename, const char *varexp, const char *cutexp)
Add Histogram into the dynamic list which is linked to a tree.
Bool_t ProtectObject(TObject *ob, const Option_t *flags)
Change protection properties of object name as specified.
Int_t fiDynListInterval
Interval for dynamic list processing.
Bool_t RemoveObjectFromFolder(const char *fullname, TFolder *fold, Bool_t isDel)
Remove object specified by full name ("subfolder/subssubfolder/name") from folder fold.
TFolder * fxSourceDir
Directory containing references to event sources.
void PrintHistograms(const char *expression=nullptr)
Printout of all histogram statistic counters on the terminal.
Bool_t RemoveAnalysisCondition(const char *name)
Removes analysis condition from list by name.
TIterator * fxMatchIterator
Iterator for list of matching objects.
TFolder * CreateNamesFolder(TFolder *objectfolder)
Conversion of the TFolder of objects into a TFolder containing the object names as TObjectStrings.
Bool_t AddEventStore(TGo4EventStore *store)
Add reference to event store object to Go4 Folder structure.
Bool_t FindObjectPathName(TObject *obj, TString &pathname, TFolder *fold=nullptr)
Return full path name to object, relative to specified folder.
static const char * GetCONDFOLDER()
Bool_t SetParameter(const char *name, TGo4Parameter *par, TFolder *parent=nullptr)
Set existing parameter of name to the values of external parameter object par.
virtual ~TGo4AnalysisObjectManager()
Bool_t RemoveCanvas(const char *name)
Removes TCanvas by name.
Contains the name (key) list of all objects in the analysis scope.
TFolder * fxTopFolder
Top Level Go4 Folder with all subfolders and the analysis folder contents as TObjString instances.
static TGo4Analysis * Instance()
return analysis instance
void Message(Int_t prio, const char *text,...)
Display a user message.
const char * GetName() const override
Return analysis name.
Event store to keep the last n events in a TTree which is not saved to a file.
void Reset(Bool_t onlyclearflag=kFALSE)
Dynamic list might reset backstore after processing.
Base type for object composition.
TObjArray * getListOfComposites(Bool_t toplevel=kTRUE)
Short_t getNElements() const
virtual Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts)
Copy values from cond to this.
void SetHistogram(const char *name)
Define the name of the associated histogram.
virtual void Invert(Bool_t on)
Inverts return values, when on is true, i.e.
ABC for all entries that can be kept in a dynamic list.
virtual void Reset()
Resets this entry to an initial status.
static void ProcessEntries(TFolder *folder, Bool_t processtrees, Int_t interval)
Iterates all entries of the list and processes the objects, depending on coordinate values and analys...
static void PrintEntries(TFolder *folder)
static void ResetEntries(TFolder *folder)
static void CleanupPointerInEntries(TFolder *folder, TObject *obj)
The abstract base class for the data elements of which the unpacked events (or detector structure dat...
virtual TGo4EventElement * GetChild(const char *name)
Abstract event processor.
The abstract interface class for the raw event store.
Entry for the dynamic list, specialized for histogram like objects.
Runtime status of a histogram object.
static void Info(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 1.
One entry of the object names folder.
Int_t GetObjectSize() const
Size of described object in byte.
Status object for an analysis parameter.
TGo4Parameter * CreateParameter()
Bool_t UpdateParameterValues(TGo4Parameter *par)
Base class for all parameter aggregations, e.g.
virtual Bool_t UpdateFrom(TGo4Parameter *rhs)
Update contents of parameter class with external object.
Picture cconfiguration in Go4.
void UpdateFrom(TGo4Picture *source, TClass *selectedobjclass=nullptr)
static void CleanupSpecials()
Remove all references to any TCutGs from ROOT list of specials.
void SetValues(Double_t *x, Double_t *y, Int_t len) override
Delete old cut and create a new cut with X,Y values.
Dynamic list entry which links a histogram to a certain tree.
Contains the branchelement structure of a certain TTree on the analysis side.
TFolder * fxTopFolder
Folder containing the tree structure.
void SetValues(Double_t low1, Double_t up1) override
Set limits and internal dimension to 1.