GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4AnalysisObjectNames.cxx
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
15
16#include "TROOT.h"
17#include "TList.h"
18#include "TFolder.h"
19
24
29
37
39{
40 if(fxTopFolder)
41 return dynamic_cast<TList *> (fxTopFolder->GetListOfFolders());
42
43 return nullptr;
44}
45
47{
48 TFolder *reval = fxTopFolder;
49 if(chown) fxTopFolder = nullptr;
50 return reval;
51}
52
53
54void TGo4AnalysisObjectNames::Print(Option_t *) const
55{
56 gROOT->SetDirLevel(0);
57 PrintLine("G-OOOO-> Analysis Object Names Printout <-OOOO-G");
58 PrintLine("G-OOOO-> ---------------------------------------------- <-OOOO-G");
60}
61
62void TGo4AnalysisObjectNames::PrintFolder(TFolder *fold) const
63{
64 if (!fold) return;
65
66 gROOT->IncreaseDirLevel();
67
68 PrintLine("G-OOOO-> Status Folder %s Printout <-OOOO-G", fold->GetName());
69 PrintLine("G-OOOO-> ---------------------------------------------- <-OOOO-G");
70
71 TIter iter(fold->GetListOfFolders());
72
73 while(auto entry = iter()) {
74 if(entry->InheritsFrom(TFolder::Class())) {
75 PrintFolder(dynamic_cast<TFolder *>(entry));
76 } else if (entry->InheritsFrom(TGo4Status::Class())) {
77 entry->Print();
78 } else {
79 entry->ls();
80 }
81 }
82
83 PrintLine("G-OOOO-> ---------------------------------------------- <-OOOO-G");
84
85 gROOT->DecreaseDirLevel();
86}
TFolder * fxTopFolder
Top Level Go4 Folder with all subfolders and the analysis folder contents as TObjString instances.
TFolder * GetNamesFolder(Bool_t chown=kFALSE)
Access to the folder containing the names objects.
void PrintFolder(TFolder *fold) const
Print names of the objects in given nameslist folder into buffer.
void Print(Option_t *opt="") const override
basic method to printout status information on stdout; to be overridden by specific subclass
TList * GetFolderList()
Access to the list of the names folder structure.
TGo4AnalysisObjectNames()
default ctor for streamer.
static void PrintLine(const char *text,...)
Print single line of debug output with appropriate indent.