JAPAn
Just Another Parity Analyzer
|
Wrapper class for ROOT tree management with vector-based data storage. 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. | |
QwRootTree (const QwRootTree *tree, const std::string &prefix="") | |
Constructor with existing tree. | |
template<class T> | |
QwRootTree (const std::string &name, const std::string &desc, T &object, const std::string &prefix="") | |
Constructor with name, description, and object. | |
template<class T> | |
QwRootTree (const QwRootTree *tree, T &object, const std::string &prefix="") | |
Constructor with existing tree, and object. | |
virtual | ~QwRootTree () |
Destructor. | |
template<class T> | |
void | FillTreeBranches (const T &object) |
Fill the branches for generic objects. | |
Long64_t | AutoSave (Option_t *option) |
Int_t | Fill () |
Fill the tree. | |
void | Print () const |
Print the tree name and description. | |
TTree * | GetTree () const |
Get the tree pointer for low level operations. | |
Private Member Functions | |
void | ConstructNewTree () |
Construct the tree. | |
void | ConstructUnitsBranch () |
void | ConstructIndexTo (QwRootTree *to) |
Construct index from this tree to another tree. | |
template<class T> | |
void | ConstructBranchAndVector (T &object) |
Construct the branches and vector for generic objects. | |
const std::string & | GetName () const |
Get the name of the tree. | |
const std::string & | GetDesc () const |
Get the description of the tree. | |
const std::string & | GetPrefix () const |
Get the description of the tree. | |
std::string | GetType () const |
Get the object type. | |
void | SetPrescaling (UInt_t num_to_save, UInt_t num_to_skip) |
Set tree prescaling parameters. | |
void | SetMaxTreeSize (Long64_t maxsize=1900000000) |
Set maximum tree size. | |
void | SetAutoFlush (Long64_t autoflush=30000000) |
Set autoflush size. | |
void | SetAutoSave (Long64_t autosave=300000000) |
Set autosave size. | |
void | SetBasketSize (Int_t basketsize=16000) |
Set basket size. | |
void | SetCircular (Long64_t buff=100000) |
Private Attributes | |
TTree * | fTree |
Tree pointer. | |
QwRootTreeBranchVector | fVector |
Vector of leaves. | |
const std::string | fName |
Name, description. | |
const std::string | fDesc |
const std::string | fPrefix |
std::string | fType |
Object type. | |
UInt_t | fCurrentEvent |
Tree prescaling parameters. | |
UInt_t | fNumEventsCycle |
UInt_t | fNumEventsToSave |
UInt_t | fNumEventsToSkip |
Long64_t | fMaxTreeSize |
Maximum tree size, autoflush and autosave. | |
Long64_t | fAutoFlush |
Long64_t | fAutoSave |
Int_t | fBasketSize |
Static Private Attributes | |
static const TString | kUnitsName = "ppm/D:ppb/D:um/D:mm/D:mV_uA/D:V_uA/D" |
static Double_t | kUnitsValue [] = { 1e-6, 1e-9, 1e-3, 1 , 1e-3, 1} |
Friends | |
class | QwRootFile |
Wrapper class for ROOT tree management with vector-based data storage.
Provides functionality to write to ROOT trees using vectors of doubles, with support for branch construction, event filtering, and tree sharing. Handles both new tree creation and attachment to existing trees, enabling multiple subsystems to contribute data to a single ROOT tree.
Definition at line 367 of file QwRootFile.h.
|
inline |
Constructor with name, and description.
Definition at line 372 of file QwRootFile.h.
References ConstructNewTree(), fCurrentEvent, fDesc, fName, fNumEventsCycle, fNumEventsToSave, fNumEventsToSkip, fPrefix, and fType.
Referenced by ConstructIndexTo(), QwRootTree(), and QwRootTree().
|
inline |
Constructor with existing tree.
Definition at line 380 of file QwRootFile.h.
References QwLog::endl(), fCurrentEvent, fDesc, fName, fNumEventsCycle, fNumEventsToSave, fNumEventsToSkip, fPrefix, fTree, fType, GetDesc(), GetName(), QwMessage, and QwRootTree().
|
inline |
Constructor with name, description, and object.
Definition at line 389 of file QwRootFile.h.
References ConstructBranchAndVector(), ConstructNewTree(), ConstructUnitsBranch(), fCurrentEvent, fDesc, fName, fNumEventsCycle, fNumEventsToSave, fNumEventsToSkip, fPrefix, and fType.
|
inline |
Constructor with existing tree, and object.
Definition at line 404 of file QwRootFile.h.
References ConstructBranchAndVector(), QwLog::endl(), fCurrentEvent, fDesc, fName, fNumEventsCycle, fNumEventsToSave, fNumEventsToSkip, fPrefix, fTree, fType, GetDesc(), GetName(), QwMessage, and QwRootTree().
|
inlinevirtual |
|
inline |
Definition at line 486 of file QwRootFile.h.
References fTree.
|
inlineprivate |
Construct the branches and vector for generic objects.
Definition at line 451 of file QwRootFile.h.
References BRANCH_VECTOR_MAX_SIZE, QwLog::endl(), fPrefix, fTree, fType, fVector, and QwError.
Referenced by QwRootTree(), and QwRootTree().
|
inlineprivate |
Construct index from this tree to another tree.
Definition at line 444 of file QwRootFile.h.
References fCurrentEvent, fName, fTree, and QwRootTree().
|
inlineprivate |
Construct the tree.
Definition at line 424 of file QwRootFile.h.
References QwLog::endl(), fDesc, fName, fTree, and QwMessage.
Referenced by QwRootTree(), and QwRootTree().
|
inlineprivate |
Definition at line 438 of file QwRootFile.h.
References fTree, kUnitsName, and kUnitsValue.
Referenced by QwRootTree().
|
inline |
Fill the tree.
Definition at line 491 of file QwRootFile.h.
References QwLog::endl(), fCurrentEvent, fNumEventsCycle, fNumEventsToSave, fTree, and QwError.
|
inline |
Fill the branches for generic objects.
Definition at line 475 of file QwRootFile.h.
References QwLog::endl(), fType, fVector, and QwError.
|
inlineprivate |
Get the description of the tree.
Definition at line 542 of file QwRootFile.h.
References fDesc.
Referenced by QwRootTree(), and QwRootTree().
|
inlineprivate |
Get the name of the tree.
Definition at line 540 of file QwRootFile.h.
References fName.
Referenced by Print(), QwRootTree(), and QwRootTree().
|
inlineprivate |
Get the description of the tree.
Definition at line 544 of file QwRootFile.h.
References fPrefix.
Referenced by Print().
|
inline |
Get the tree pointer for low level operations.
Definition at line 521 of file QwRootFile.h.
References fTree.
|
inlineprivate |
Get the object type.
Definition at line 551 of file QwRootFile.h.
References fType.
Referenced by Print().
|
inline |
Print the tree name and description.
Definition at line 513 of file QwRootFile.h.
References QwLog::endl(), fPrefix, GetName(), GetPrefix(), GetType(), and QwMessage.
|
inlineprivate |
Set autoflush size.
Definition at line 581 of file QwRootFile.h.
References fAutoFlush, and fTree.
Referenced by QwRootFile::ConstructTreeBranches().
|
inlineprivate |
Set autosave size.
Definition at line 589 of file QwRootFile.h.
References fAutoSave, and fTree.
Referenced by QwRootFile::ConstructTreeBranches().
|
inlineprivate |
Set basket size.
Definition at line 595 of file QwRootFile.h.
References fBasketSize, and fTree.
Referenced by QwRootFile::ConstructTreeBranches().
|
inlineprivate |
Definition at line 601 of file QwRootFile.h.
References fTree.
Referenced by QwRootFile::ConstructTreeBranches().
|
inlineprivate |
Set maximum tree size.
Definition at line 575 of file QwRootFile.h.
References fMaxTreeSize, and fTree.
Referenced by QwRootFile::ConstructTreeBranches().
|
inlineprivate |
Set tree prescaling parameters.
Definition at line 561 of file QwRootFile.h.
References fNumEventsCycle, fNumEventsToSave, and fNumEventsToSkip.
Referenced by QwRootFile::ConstructTreeBranches().
|
friend |
|
private |
Definition at line 570 of file QwRootFile.h.
Referenced by SetAutoFlush().
|
private |
Definition at line 571 of file QwRootFile.h.
Referenced by SetAutoSave().
|
private |
Definition at line 572 of file QwRootFile.h.
Referenced by SetBasketSize().
|
private |
Tree prescaling parameters.
Definition at line 555 of file QwRootFile.h.
Referenced by ConstructIndexTo(), Fill(), QwRootTree(), QwRootTree(), QwRootTree(), and QwRootTree().
|
private |
Definition at line 536 of file QwRootFile.h.
Referenced by ConstructNewTree(), GetDesc(), QwRootTree(), QwRootTree(), QwRootTree(), and QwRootTree().
|
private |
Maximum tree size, autoflush and autosave.
Definition at line 569 of file QwRootFile.h.
Referenced by SetMaxTreeSize().
|
private |
Name, description.
Definition at line 535 of file QwRootFile.h.
Referenced by ConstructIndexTo(), ConstructNewTree(), GetName(), QwRootTree(), QwRootTree(), QwRootTree(), and QwRootTree().
|
private |
Definition at line 556 of file QwRootFile.h.
Referenced by Fill(), QwRootTree(), QwRootTree(), QwRootTree(), QwRootTree(), and SetPrescaling().
|
private |
Definition at line 557 of file QwRootFile.h.
Referenced by Fill(), QwRootTree(), QwRootTree(), QwRootTree(), QwRootTree(), and SetPrescaling().
|
private |
Definition at line 558 of file QwRootFile.h.
Referenced by QwRootTree(), QwRootTree(), QwRootTree(), QwRootTree(), and SetPrescaling().
|
private |
Definition at line 537 of file QwRootFile.h.
Referenced by ConstructBranchAndVector(), GetPrefix(), Print(), QwRootTree(), QwRootTree(), QwRootTree(), and QwRootTree().
|
private |
Tree pointer.
Definition at line 529 of file QwRootFile.h.
Referenced by AutoSave(), ConstructBranchAndVector(), ConstructIndexTo(), ConstructNewTree(), ConstructUnitsBranch(), Fill(), GetTree(), QwRootTree(), QwRootTree(), SetAutoFlush(), SetAutoSave(), SetBasketSize(), SetCircular(), and SetMaxTreeSize().
|
private |
Object type.
Definition at line 548 of file QwRootFile.h.
Referenced by ConstructBranchAndVector(), FillTreeBranches(), GetType(), QwRootTree(), QwRootTree(), QwRootTree(), and QwRootTree().
|
private |
Vector of leaves.
Definition at line 531 of file QwRootFile.h.
Referenced by ConstructBranchAndVector(), and FillTreeBranches().
|
staticprivate |
Definition at line 420 of file QwRootFile.h.
Referenced by ConstructUnitsBranch().
|
staticprivate |
Definition at line 20 of file QwRootFile.h.
Referenced by ConstructUnitsBranch().