GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4DirProxy.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 TGO4DIRPROXY_H
15#define TGO4DIRPROXY_H
16
17#include "TGo4Proxy.h"
18
19class TFile;
20class TDirectory;
21
22class TGo4DirProxy : public TGo4Proxy {
23 protected:
24 TDirectory * fDir{nullptr};
25 Bool_t fOwner{kFALSE};
26 Bool_t fReadRight{kFALSE};
28
29 void SetDir(TDirectory *dir, Bool_t readright, Bool_t owner);
30 void ClearDir();
31
32 public:
34 TGo4DirProxy(TDirectory *dir, Bool_t readright, Bool_t owner);
35 virtual ~TGo4DirProxy();
36
37 void Initialize(TGo4Slot *slot) override { fxParentSlot = slot; }
38 void Finalize(TGo4Slot *slot) override {}
39
40 Bool_t HasSublevels() const override { return fDir; }
41
43 { return fDir ? ProduceIter(fDir, fReadRight) : nullptr; }
44
45 std::unique_ptr<TGo4Access> ProvideAccess(const char *name) override
46 { return CreateAccess(fDir, fReadRight, name, fxParentSlot); }
47
48 void WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs) override;
49 void ReadData(TGo4Slot *slot, TDirectory *dir) override;
50
51 Int_t GetObjectKind() const override;
52 const char *GetContainedClassName() const override;
53 const char *GetContainedObjectInfo() override;
54 Int_t GetObjectSizeInfo() const override;
55
56 static std::unique_ptr<TGo4Access> CreateAccess(TDirectory *dir, Bool_t readright, const char *name, TGo4Slot *browser_slot = nullptr);
57 static TGo4LevelIter *ProduceIter(TDirectory *dir, Bool_t readright);
58
59 Bool_t UpdateObjectInFile(const char *filepath, TObject *obj);
60
61 Bool_t IsFile() const;
62 const char *GetFileName() const;
63
65};
66
67#endif
Bool_t IsFile() const
TDirectory * fDir
static std::unique_ptr< TGo4Access > CreateAccess(TDirectory *dir, Bool_t readright, const char *name, TGo4Slot *browser_slot=nullptr)
TGo4Slot * fxParentSlot
const char * GetFileName() const
virtual ~TGo4DirProxy()
void SetDir(TDirectory *dir, Bool_t readright, Bool_t owner)
Bool_t fReadRight
void ReadData(TGo4Slot *slot, TDirectory *dir) override
void WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs) override
static TGo4LevelIter * ProduceIter(TDirectory *dir, Bool_t readright)
std::unique_ptr< TGo4Access > ProvideAccess(const char *name) override
TGo4LevelIter * MakeIter() override
Bool_t HasSublevels() const override
Int_t GetObjectSizeInfo() const override
ClassDefOverride(TGo4DirProxy, 0)
Int_t GetObjectKind() const override
void Initialize(TGo4Slot *slot) override
Bool_t UpdateObjectInFile(const char *filepath, TObject *obj)
void Finalize(TGo4Slot *slot) override
const char * GetContainedObjectInfo() override
const char * GetContainedClassName() const override