Diana Software
Classes | Public Member Functions | Private Attributes | List of all members
MRootNtpDumper Class Reference

ROOT ntuple dumper. More...

Inheritance diagram for MRootNtpDumper:

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< BranchfBranches
 
std::vector< AliasBranchfAliasBranches
 
std::map< std::string, std::string > fBranchAliasMap
 
bool fAddPackedNeighbours
 

Detailed Description

ROOT ntuple dumper.

Author
Marco Vignati

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:

  1. Alias:AliasName=true to save (base type) variables contained in a QObjects. In this case simple TBranches of base types are saved.
  2. Member:MemberLabel=true to save a QObject with its members. In this case a standard TBranch of QObject is saved.

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).

Parameters: (inherited parameters can be found in QFileWriter):

Optional parameters:

Reads:

Writes

Definition at line 65 of file MRootNtpDumper.hh.

Constructor & Destructor Documentation

◆ MRootNtpDumper()

MRootNtpDumper::MRootNtpDumper ( )

constructor

Definition at line 14 of file MRootNtpDumper.cc.

◆ ~MRootNtpDumper()

MRootNtpDumper::~MRootNtpDumper ( )

destructor

Definition at line 19 of file MRootNtpDumper.cc.

Member Function Documentation

◆ Close()

void MRootNtpDumper::Close ( )

brief Close file

Definition at line 228 of file MRootNtpDumper.cc.

◆ Dump()

void MRootNtpDumper::Dump ( const Diana::QEventInspector &  evi)

Write event to file.

Definition at line 221 of file MRootNtpDumper.cc.

◆ Open()

void MRootNtpDumper::Open ( const std::string &  filename,
const Diana::QEventInspector &  evi 
)

◆ Require()

void MRootNtpDumper::Require ( const Diana::QEventInspector &  evi)

Member Data Documentation

◆ fAddPackedNeighbours

bool MRootNtpDumper::fAddPackedNeighbours
private

Definition at line 105 of file MRootNtpDumper.hh.

◆ fAliasBranches

std::vector<AliasBranch> MRootNtpDumper::fAliasBranches
private

Definition at line 103 of file MRootNtpDumper.hh.

◆ fAliasMap

std::map<std::string,Diana::QAliases::AliasInfo> MRootNtpDumper::fAliasMap
private

Definition at line 101 of file MRootNtpDumper.hh.

◆ fBranchAliasMap

std::map<std::string,std::string> MRootNtpDumper::fBranchAliasMap
private

Definition at line 104 of file MRootNtpDumper.hh.

◆ fBranches

std::vector<Branch> MRootNtpDumper::fBranches
private

Definition at line 102 of file MRootNtpDumper.hh.

◆ fFileName

std::string MRootNtpDumper::fFileName
private

Definition at line 100 of file MRootNtpDumper.hh.

◆ fRootOutput

TFile* MRootNtpDumper::fRootOutput
private

Definition at line 98 of file MRootNtpDumper.hh.

◆ fTree

TTree* MRootNtpDumper::fTree
private

Definition at line 99 of file MRootNtpDumper.hh.


The documentation for this class was generated from the following files: