GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4FolderProxy.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 TGO4FOLDERPROXY_H
15 #define TGO4FOLDERPROXY_H
16 
17 #include "TGo4Proxy.h"
18 #include "TString.h"
19 
20 class TFolder;
21 
22 class TGo4FolderProxy : public TGo4Proxy {
23  public:
25  TGo4FolderProxy(TFolder *f, Bool_t owner = kFALSE, const char *roofolder = "");
26  virtual ~TGo4FolderProxy();
27 
28  Bool_t HasSublevels() const override { return fFolder; }
29 
30  TGo4LevelIter *MakeIter() override
31  { return fFolder ? ProduceIter(fFolder) : nullptr; }
32 
33  std::unique_ptr<TGo4Access> ProvideAccess(const char *name) override
34  { return CreateAccess(fFolder, name); }
35 
36  void WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs) override;
37  void ReadData(TGo4Slot *slot, TDirectory *dir) override;
38 
39  Int_t GetObjectKind() const override;
40  const char *GetContainedClassName() const override;
41 
42  static TFolder *LocateROOTFolder(const char *rootfolder);
43  static std::unique_ptr<TGo4Access> CreateAccess(TFolder *folder, const char *name);
44  static TGo4LevelIter *ProduceIter(TFolder *folder);
45 
46  protected:
47  TFolder *fFolder{nullptr};
48  Bool_t fOwner{kFALSE};
49  TString fRootFolderName;
50 
52 };
53 
54 #endif
55 
void ReadData(TGo4Slot *slot, TDirectory *dir) override
TString fRootFolderName
std::unique_ptr< TGo4Access > ProvideAccess(const char *name) override
TGo4LevelIter * MakeIter() override
static TFolder * LocateROOTFolder(const char *rootfolder)
ClassDefOverride(TGo4FolderProxy, 1)
void WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs) override
static std::unique_ptr< TGo4Access > CreateAccess(TFolder *folder, const char *name)
Bool_t HasSublevels() const override
const char * GetContainedClassName() const override
Int_t GetObjectKind() const override
virtual ~TGo4FolderProxy()
static TGo4LevelIter * ProduceIter(TFolder *folder)