GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4Iter.h
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 
14 #ifndef TGO4ITER_H
15 #define TGO4ITER_H
16 
17 #include "TGo4AccessWrapper.h"
18 
19 #include "TObjArray.h"
20 #include "TString.h"
21 
22 class TGo4Iter : public TGo4AccessWrapper {
23  public:
24  TGo4Iter(TGo4Slot *slot, Bool_t onlyslots = kFALSE);
25  virtual ~TGo4Iter();
26 
27  Bool_t next(Bool_t goesinto = kTRUE);
28  Bool_t nextobj();
29 
30  Bool_t isfolder();
31  const char *getname();
32  const char *getfullname();
33 
34  Int_t getkindofitem();
35  const char *getclassname();
36  const char *getinfo();
37  Int_t getsizeinfo();
38  Int_t getflag(const char *flagname);
39 
40  Int_t level() const;
41  Int_t levelchange() const { return fLevelChange; }
42  Bool_t isslot() const { return getslot() != nullptr; }
43  TGo4Slot *getslot() const;
44 
45  std::unique_ptr<TGo4Access> ProvideAccess(const char *name = nullptr) override;
46 
47  protected:
48  TGo4Iter();
49 
51  { return fStatus != 0 ? nullptr : (TGo4LevelIter*) fLevels.Last(); }
52 
53  TGo4Slot *fSlot{nullptr};
54  Bool_t fOnlySlots{kFALSE};
55  TObjArray fLevels;
56  Int_t fStatus{0};
57  TString fFullName;
58  Int_t fLevelChange{0};
59 
61 };
62 
63 #endif
const char * getinfo()
Definition: TGo4Iter.cxx:121
ClassDefOverride(TGo4Iter, 1)
Bool_t nextobj()
Definition: TGo4Iter.cxx:101
TObjArray fLevels
Definition: TGo4Iter.h:55
virtual ~TGo4Iter()
Definition: TGo4Iter.cxx:39
TGo4Slot * fSlot
Definition: TGo4Iter.h:53
Bool_t isfolder()
Definition: TGo4Iter.cxx:109
TGo4Iter()
Definition: TGo4Iter.cxx:18
const char * getclassname()
Definition: TGo4Iter.cxx:145
TGo4Slot * getslot() const
Definition: TGo4Iter.cxx:166
Int_t getflag(const char *flagname)
Definition: TGo4Iter.cxx:133
const char * getfullname()
Definition: TGo4Iter.cxx:151
Int_t fStatus
Definition: TGo4Iter.h:56
Int_t getkindofitem()
Definition: TGo4Iter.cxx:139
std::unique_ptr< TGo4Access > ProvideAccess(const char *name=nullptr) override
Definition: TGo4Iter.cxx:161
Bool_t isslot() const
Definition: TGo4Iter.h:42
Bool_t fOnlySlots
Definition: TGo4Iter.h:54
const char * getname()
Definition: TGo4Iter.cxx:115
Int_t level() const
Definition: TGo4Iter.cxx:156
TString fFullName
-1 start, 0 continue, 1 end
Definition: TGo4Iter.h:57
TGo4LevelIter * currentiter() const
Definition: TGo4Iter.h:50
Int_t fLevelChange
Definition: TGo4Iter.h:58
Bool_t next(Bool_t goesinto=kTRUE)
Definition: TGo4Iter.cxx:44
Int_t getsizeinfo()
Definition: TGo4Iter.cxx:127
Int_t levelchange() const
Definition: TGo4Iter.h:41