![]() |
Diana Software
|
ROOT ntuple dumper. More...
Classes | |
| class | AliasBranch |
| class | Branch |
Public Member Functions | |
| MRootNtpDumper () | |
| constructor More... | |
| ~MRootNtpDumper () | |
| destructor More... | |
| void | Require (const Diana::QEventInspector &evi) |
| void | Open (const std::string &filename, const Diana::QEventInspector &evi) |
| Open file. More... | |
| void | Dump (const Diana::QEventInspector &evi) |
| Write event to file. More... | |
| void | Close () |
Private Attributes | |
| TFile * | fRootOutput |
| TTree * | fTree |
| std::string | fFileName |
| std::map< std::string, Diana::QAliases::AliasInfo > | fAliasMap |
| std::vector< Branch > | fBranches |
| std::vector< AliasBranch > | fAliasBranches |
| std::map< std::string, std::string > | fBranchAliasMap |
| bool | fAddPackedNeighbours |
ROOT ntuple dumper.
This module writes ROOT files with a TTree named "qtree" and branches of the selected variables. Branches to be saved are defined in the cfg via two kind of parameters:
All selected aliases and QObjects are required to the QEvent, so that the MRootFileReader option "InclusiveMode=false" can be used together with this writer.
If no QObject is saved, the tree is made only of branches of base types, and the diana libraries are not needed to read it.
To dump a subset of entries, place filters in the sequence and set the "SkipEvents=true" option (see QFileWriter).
writer RootNtpDumper verbosity = info enable = true OutputDir = . OutputFilePrefix = Light OutputFilesList = Ligth.list AliasFileName = cfg/aliases.txt Alias:Run = true Alias:Channel = true Alias:NsTime = true Member:DAQ@Pulse = true endmod
Parameters: (inherited parameters can be found in QFileWriter):
Optional parameters:
Reads:
Writes
Definition at line 65 of file MRootNtpDumper.hh.
| MRootNtpDumper::MRootNtpDumper | ( | ) |
constructor
Definition at line 14 of file MRootNtpDumper.cc.
| MRootNtpDumper::~MRootNtpDumper | ( | ) |
destructor
Definition at line 19 of file MRootNtpDumper.cc.
| void MRootNtpDumper::Close | ( | ) |
brief Close file
Definition at line 228 of file MRootNtpDumper.cc.
| void MRootNtpDumper::Dump | ( | const Diana::QEventInspector & | evi | ) |
Write event to file.
Definition at line 221 of file MRootNtpDumper.cc.
| void MRootNtpDumper::Open | ( | const std::string & | filename, |
| const Diana::QEventInspector & | evi | ||
| ) |
Open file.
Definition at line 160 of file MRootNtpDumper.cc.
References MRootNtpDumper::Branch::address, MRootNtpDumper::AliasBranch::address, ap, MRootNtpDumper::Branch::name, MRootNtpDumper::AliasBranch::name, MRootNtpDumper::Branch::type, and MRootNtpDumper::AliasBranch::type.
| void MRootNtpDumper::Require | ( | const Diana::QEventInspector & | evi | ) |
Definition at line 24 of file MRootNtpDumper.cc.
References MRootNtpDumper::Branch::address, MRootNtpDumper::AliasBranch::address, err, QObjectInspector::MemberInfo::fAddress, QObjectInspector::MemberInfo::fBranchType, QAliases::FillFromFile(), QAliases::Find(), QObjectInspector::FindBaseType(), QAliases::Get(), QEventLabel::GetStringLabel(), QVdt::GetType(), QVdt::Int_QVdt, QEventLabel::name, MRootNtpDumper::Branch::name, MRootNtpDumper::AliasBranch::name, QEventLabel::owner, QERR_SUCCESS, MRootNtpDumper::Branch::type, and MRootNtpDumper::AliasBranch::type.
|
private |
Definition at line 105 of file MRootNtpDumper.hh.
|
private |
Definition at line 103 of file MRootNtpDumper.hh.
|
private |
Definition at line 101 of file MRootNtpDumper.hh.
|
private |
Definition at line 104 of file MRootNtpDumper.hh.
|
private |
Definition at line 102 of file MRootNtpDumper.hh.
|
private |
Definition at line 100 of file MRootNtpDumper.hh.
|
private |
Definition at line 98 of file MRootNtpDumper.hh.
|
private |
Definition at line 99 of file MRootNtpDumper.hh.