VROOTFile.h
Go to the documentation of this file.
1 #ifndef _VROOTFile_h_
2 #define _VROOTFile_h_
3 
4 #include <io/VEventFile.h>
5 #include <string>
6 
7 
8 class TFile;
9 class TTree;
10 
11 namespace utl {
12  class Branch;
13 }
14 
15 namespace io {
16 
27  class VROOTFile : public VEventFile {
28 
29  public:
30  VROOTFile() { }
31  VROOTFile(const std::string& filename, const Mode mode = eRead, utl::Branch* const b = nullptr);
32 
33  virtual ~VROOTFile();
34 
35  virtual void Open(const std::string& filename, const Mode mode = eRead, utl::Branch* const b = nullptr);
36 
37  virtual void Close();
38 
39  static std::string GetRootMode(const Mode mode);
40 
41  protected:
42  int OpenROOTFile();
43  int GetTree(const std::string& name);
44 
45  TFile* fFile = nullptr;
46  TTree* fTree = nullptr;
47 
48  };
49 
50 }
51 
52 
53 #endif
static std::string GetRootMode(const Mode mode)
Definition: VROOTFile.cc:123
TTree * fTree
Definition: VROOTFile.h:46
Mode
Available open modes.
Definition: IoCodes.h:16
int OpenROOTFile()
Definition: VROOTFile.cc:69
virtual ~VROOTFile()
Definition: VROOTFile.cc:41
virtual void Close()
Definition: VROOTFile.cc:89
Class representing a document branch.
Definition: Branch.h:107
TFile * fFile
Definition: VROOTFile.h:45
int GetTree(const std::string &name)
Definition: VROOTFile.cc:105
virtual void Open(const std::string &filename, const Mode mode=eRead, utl::Branch *const b=nullptr)
Definition: VROOTFile.cc:52
char * filename
Definition: dump1090.h:266

, generated on Tue Sep 26 2023.