RAIDA  1.9.0
ITreeROOT.h
1 // -*- C++ -*-
2 #ifndef AIDA_ITREEROOT_H
3 #define AIDA_ITREEROOT_H 1
4 
5 
6 #include <AIDA/ITree.h>
7 #include <iostream>
8 #include <string>
9 #include <vector>
10 #include <TFile.h>
11 namespace AIDA {
12 
14 
29 class ITreeROOT : public ITree {
30 
31 public:
33  virtual ~ITreeROOT(); // { /* nop */; }
34 
47  ITreeROOT(const std::string & storeName,
48  const std::string & storeType = "",
49  bool readOnly = false,
50  bool createNew = false,
51  const std::string &options = "");
52 
53  ITreeROOT();
54 
60  virtual std::string storeName() const;
61 
70 
79 
87  virtual bool cd(const std::string & path) ;
88 
94  virtual std::string pwd() const;
95 
106  virtual bool ls(const std::string & path = ".",
107  bool recursive = false,
108  std::ostream & os = std::cout) const;
109 
119 
132 
142  virtual bool mkdir(const std::string & path);
143 
152 
161 
171 
180 
189 
197  virtual bool commit();
198 
205 
215 
225 
239 
248 
258  virtual bool close() ;
259 
265 
267 private:
268 
269  TFile *_ROOTFile;
270  std::string _storeName;
271 
272 }; // class
273 } // namespace AIDA
274 #endif /* ifndef AIDA_ITREEROOT_H */
275 
class IManagedObject;
Definition: ITree.h:37
virtual std::string pwd() const
Get the path of the current working directory.
Definition: ITreeROOT.cc:124
virtual bool commit()
Create a directory recursively.
Definition: ITreeROOT.cc:55
virtual bool close()
Set the strategy of what should happen if two objects have the same path.
Definition: ITreeROOT.cc:72
class IManagedObject;
Definition: ITreeROOT.h:29
virtual bool mkdir(const std::string &path)
Get the list of names of the IManagedObjects under a given path, including directories (but not &quot;...
Definition: ITreeROOT.cc:132
virtual bool ls(const std::string &path=".", bool recursive=false, std::ostream &os=std::cout) const
List, into a given output stream, all the IManagedObjects, including directories (but not &quot;...
Definition: ITreeROOT.cc:195
virtual ~ITreeROOT()
Destructor.
Definition: ITreeROOT.cc:50
virtual bool cd(const std::string &path)
Get the IManagedObject at a given path in the ITree.
Definition: ITreeROOT.cc:93
virtual std::string storeName() const
Get the name of the store.
Definition: ITreeROOT.cc:88