Diana Software
MRootNtpDumper.hh
Go to the documentation of this file.
1 #ifndef _M_ROOTNTPDUMPER_HH_
2 #define _M_ROOTNTPDUMPER_HH_
3 
59 #include "QFileWriter.hh"
60 #include "QAliases.hh"
61 
62 class TFile;
63 class TTree;
64 
65 class MRootNtpDumper : public Diana::QFileWriter {
66 
67  public:
70 
73  void Require(const Diana::QEventInspector& evi);
74 
76  void Open(const std::string& filename, const Diana::QEventInspector& evi);
77 
79  void Dump(const Diana::QEventInspector& evi);
80 
82  void Close();
83 
84  private:
85  class Branch {
86  public:
87  std::string name;
88  std::string type;
89  Diana::QObject** address;
90  };
91  class AliasBranch {
92  public:
93  std::string name;
94  void* address;
95  std::string type;
96  };
97 
98  TFile* fRootOutput;
99  TTree* fTree;
100  std::string fFileName;
101  std::map<std::string,Diana::QAliases::AliasInfo> fAliasMap;
102  std::vector<Branch> fBranches;
103  std::vector<AliasBranch> fAliasBranches;
104  std::map<std::string,std::string> fBranchAliasMap;
106 
107 
108 };
109 
110 #endif
111 
Diana::QObject ** address
ROOT ntuple dumper.
std::map< std::string, Diana::QAliases::AliasInfo > fAliasMap
MRootNtpDumper()
constructor
std::vector< AliasBranch > fAliasBranches
std::map< std::string, std::string > fBranchAliasMap
void Require(const Diana::QEventInspector &evi)
void Open(const std::string &filename, const Diana::QEventInspector &evi)
Open file.
std::string fFileName
std::vector< Branch > fBranches
void Dump(const Diana::QEventInspector &evi)
Write event to file.
~MRootNtpDumper()
destructor