QwAnalysis
|
A wrapper class for a ROOT tree. More...
#include <QwRootFile.h>
Public Member Functions | |
QwRootTree (const std::string &name, const std::string &desc, const std::string &prefix="") | |
Constructor with name, and description. More... | |
QwRootTree (const QwRootTree *tree, const std::string &prefix="") | |
Constructor with existing tree. More... | |
template<class T > | |
QwRootTree (const std::string &name, const std::string &desc, T &object, const std::string &prefix="") | |
Constructor with name, description, and object. More... | |
template<class T > | |
QwRootTree (const QwRootTree *tree, T &object, const std::string &prefix="") | |
Constructor with existing tree, and object. More... | |
virtual | ~QwRootTree () |
Destructor. More... | |
template<class T > | |
void | FillTreeBranches (const T &object) |
Fill the branches for generic objects. More... | |
Int_t | Fill () |
Fill the tree. More... | |
void | Print () const |
Print the tree name and description. More... | |
TTree * | GetTree () const |
Get the tree pointer for low level operations. More... | |
Private Member Functions | |
void | ConstructNewTree () |
Construct the tree. More... | |
void | ConstructIndexTo (QwRootTree *to) |
Construct index from this tree to another tree. More... | |
template<class T > | |
void | ConstructBranchAndVector (T &object) |
Construct the branches and vector for generic objects. More... | |
const std::string & | GetName () const |
Get the name of the tree. More... | |
const std::string & | GetDesc () const |
Get the description of the tree. More... | |
const std::string & | GetPrefix () const |
Get the description of the tree. More... | |
std::string | GetType () const |
Get the object type. More... | |
void | SetPrescaling (UInt_t num_to_save, UInt_t num_to_skip) |
Set tree prescaling parameters. More... | |
void | SetMaxTreeSize (Long64_t maxsize=1900000000) |
Set maximum tree size. More... | |
void | SetAutoFlush (Long64_t autoflush=30000000) |
Set autoflush size. More... | |
void | SetAutoSave (Long64_t autosave=300000000) |
Set autosave size. More... | |
void | SetBasketSize (Int_t basketsize=16000) |
Set basket size. More... | |
void | SetCircular (Long64_t buff=100000) |
Private Attributes | |
TTree * | fTree |
Tree pointer. More... | |
std::vector< Double_t > | fVector |
Vector of leaves. More... | |
const std::string | fName |
Name, description. More... | |
const std::string | fDesc |
const std::string | fPrefix |
std::string | fType |
Object type. More... | |
UInt_t | fCurrentEvent |
Tree prescaling parameters. More... | |
UInt_t | fNumEventsCycle |
UInt_t | fNumEventsToSave |
UInt_t | fNumEventsToSkip |
Long64_t | fMaxTreeSize |
Maximum tree size, autoflush and autosave. More... | |
Long64_t | fAutoFlush |
Long64_t | fAutoSave |
Int_t | fBasketSize |
Friends | |
class | QwRootFile |
A wrapper class for a ROOT tree.
This class provides the functionality to write to ROOT trees using a vector of doubles. The vector is part of this object, as well as a pointer to the tree that contains the branches. One ROOT tree can have multiple QwRootTree objects, for example in tracking mode both parity and tracking detectors can be stored in the same tree.
Definition at line 36 of file QwRootFile.h.
|
inline |
Constructor with name, and description.
Definition at line 41 of file QwRootFile.h.
References ConstructNewTree().
|
inline |
Constructor with existing tree.
Definition at line 49 of file QwRootFile.h.
References QwLog::endl(), fTree, GetDesc(), GetName(), and QwMessage.
|
inline |
Constructor with name, description, and object.
Definition at line 58 of file QwRootFile.h.
References ConstructBranchAndVector(), and ConstructNewTree().
|
inline |
Constructor with existing tree, and object.
Definition at line 70 of file QwRootFile.h.
References ConstructBranchAndVector(), QwLog::endl(), fTree, GetDesc(), GetName(), and QwMessage.
|
inlinevirtual |
|
inlineprivate |
Construct the branches and vector for generic objects.
Definition at line 100 of file QwRootFile.h.
References BRANCH_VECTOR_MAX_SIZE, QwLog::endl(), fPrefix, fTree, fType, fVector, and QwError.
Referenced by QwRootTree().
|
inlineprivate |
Construct index from this tree to another tree.
Definition at line 93 of file QwRootFile.h.
References fCurrentEvent, fName, and fTree.
|
inlineprivate |
Construct the tree.
Definition at line 87 of file QwRootFile.h.
References QwLog::endl(), fDesc, fName, fTree, and QwMessage.
Referenced by QwRootTree().
|
inline |
Fill the tree.
Definition at line 136 of file QwRootFile.h.
References QwLog::endl(), fCurrentEvent, fNumEventsCycle, fNumEventsToSave, fTree, and QwError.
|
inline |
Fill the branches for generic objects.
Definition at line 124 of file QwRootFile.h.
References QwLog::endl(), fType, fVector, and QwError.
|
inlineprivate |
Get the description of the tree.
Definition at line 187 of file QwRootFile.h.
References fDesc.
Referenced by QwRootTree().
|
inlineprivate |
Get the name of the tree.
Definition at line 185 of file QwRootFile.h.
References fName.
Referenced by Print(), and QwRootTree().
|
inlineprivate |
Get the description of the tree.
Definition at line 189 of file QwRootFile.h.
References fPrefix.
Referenced by Print().
|
inline |
|
inlineprivate |
Get the object type.
Definition at line 196 of file QwRootFile.h.
References fType.
Referenced by Print().
|
inline |
Print the tree name and description.
Definition at line 158 of file QwRootFile.h.
References QwLog::endl(), fPrefix, GetName(), GetPrefix(), GetType(), and QwMessage.
|
inlineprivate |
Set autoflush size.
Definition at line 226 of file QwRootFile.h.
References fAutoFlush, and fTree.
Referenced by QwRootFile::ConstructTreeBranches().
|
inlineprivate |
Set autosave size.
Definition at line 234 of file QwRootFile.h.
References fAutoSave, and fTree.
Referenced by QwRootFile::ConstructTreeBranches().
|
inlineprivate |
Set basket size.
Definition at line 240 of file QwRootFile.h.
References fBasketSize, and fTree.
Referenced by QwRootFile::ConstructTreeBranches().
|
inlineprivate |
Definition at line 246 of file QwRootFile.h.
References fTree.
Referenced by QwRootFile::ConstructTreeBranches().
|
inlineprivate |
Set maximum tree size.
Definition at line 220 of file QwRootFile.h.
References fMaxTreeSize, and fTree.
Referenced by QwRootFile::ConstructTreeBranches().
|
inlineprivate |
Set tree prescaling parameters.
Definition at line 206 of file QwRootFile.h.
References fNumEventsCycle, fNumEventsToSave, and fNumEventsToSkip.
Referenced by QwRootFile::ConstructTreeBranches().
|
friend |
Definition at line 166 of file QwRootFile.h.
|
private |
Definition at line 215 of file QwRootFile.h.
Referenced by SetAutoFlush().
|
private |
Definition at line 216 of file QwRootFile.h.
Referenced by SetAutoSave().
|
private |
Definition at line 217 of file QwRootFile.h.
Referenced by SetBasketSize().
|
private |
Tree prescaling parameters.
Definition at line 196 of file QwRootFile.h.
Referenced by ConstructIndexTo(), and Fill().
|
private |
Definition at line 181 of file QwRootFile.h.
Referenced by ConstructNewTree(), and GetDesc().
|
private |
Maximum tree size, autoflush and autosave.
Definition at line 214 of file QwRootFile.h.
Referenced by SetMaxTreeSize().
|
private |
Name, description.
Definition at line 180 of file QwRootFile.h.
Referenced by ConstructIndexTo(), ConstructNewTree(), and GetName().
|
private |
Definition at line 201 of file QwRootFile.h.
Referenced by Fill(), and SetPrescaling().
|
private |
Definition at line 202 of file QwRootFile.h.
Referenced by Fill(), and SetPrescaling().
|
private |
Definition at line 203 of file QwRootFile.h.
Referenced by SetPrescaling().
|
private |
Definition at line 182 of file QwRootFile.h.
Referenced by ConstructBranchAndVector(), GetPrefix(), and Print().
|
private |
Tree pointer.
Definition at line 174 of file QwRootFile.h.
Referenced by ConstructBranchAndVector(), ConstructIndexTo(), ConstructNewTree(), Fill(), QwRootTree(), SetAutoFlush(), SetAutoSave(), SetBasketSize(), SetCircular(), and SetMaxTreeSize().
|
private |
Object type.
Definition at line 189 of file QwRootFile.h.
Referenced by ConstructBranchAndVector(), FillTreeBranches(), and GetType().
|
private |
Vector of leaves.
Definition at line 176 of file QwRootFile.h.
Referenced by ConstructBranchAndVector(), and FillTreeBranches().