#include <Formula.h>
|
void | testInvariant () const |
| effects: test the invariant of this object guarantee: no-fail More...
|
|
| Formula () |
| effects: standard default constructor guarantee: no-fail More...
|
|
| Formula (const std::string &name, const std::string &formula, TTree *tree) |
| effects: standard constructor guarantee: strong failures: out of memory II More...
|
|
| ~Formula () |
| effects: standard destructor guarantee: no-fail More...
|
|
void | reset (TTree *tree) |
| effects: reset this formula to a new tree guarantee: strong failures: out of memory II failures: TTreeFormula error requires: !formula().empty() More...
|
|
const std::string & | formula () const |
| description: the formula used guarantee: no-fail More...
|
|
bool | valid () const |
| returns: whether the formula is valid guarantee: no-fail More...
|
|
int | ndim () const |
| returns: the number of unspecified array dimensions for the given formula guarantee: no-fail requires: valid() More...
|
|
std::size_t | ndata () const |
| returns: the number of data entries for the formula with the given index guarantee: strong failures: TTreeFormula errors requires: valid() More...
|
|
Double_t | value (std::size_t data) const |
| returns: the result of evaluating the formula with the given index for the given data entry guarantee: strong failures: TTreeFormula errors requires: valid() requires: data < getNData() More...
|
|
|
std::string | m_formula |
| description: members directly corresponding to accessors More...
|
|
std::string | m_name |
| description: the name we use for the formula More...
|
|
TTree * | m_tree |
| description: the tree we are connected to More...
|
|
TTreeFormula * | m_form |
| description the formula used More...
|
|
TTreeFormulaManager * | m_manager |
| description: the manager used More...
|
|
int | m_ndim |
| description: the number of array dimensions we need to loop over, or -1 if we are in error More...
|
|
Long64_t | m_entry |
| description: the last entry we read More...
|
|
Int_t | m_ndata |
| description: the number of data entries More...
|
|
std::vector< Double_t > | m_cache |
| description: the cache of data entries More...
|
|
std::vector< bool > | m_read |
| description: whether we read the given data entry More...
|
|
Definition at line 35 of file Formula.h.
◆ Formula() [1/3]
effects: standard default constructor guarantee: no-fail
Definition at line 68 of file Formula.cxx.
◆ Formula() [2/3]
MD::Formula::Formula |
( |
const std::string & |
name, |
|
|
const std::string & |
formula, |
|
|
TTree * |
tree |
|
) |
| |
effects: standard constructor guarantee: strong failures: out of memory II
Definition at line 78 of file Formula.cxx.
◆ ~Formula()
MD::Formula::~Formula |
( |
| ) |
|
effects: standard destructor guarantee: no-fail
Definition at line 91 of file Formula.cxx.
◆ Formula() [3/3]
rationale: to avoid broken objects
◆ formula()
const std::string & MD::Formula::formula |
( |
| ) |
const |
description: the formula used guarantee: no-fail
Definition at line 139 of file Formula.cxx.
◆ ndata()
std::size_t MD::Formula::ndata |
( |
| ) |
const |
returns: the number of data entries for the formula with the given index guarantee: strong failures: TTreeFormula errors requires: valid()
Definition at line 167 of file Formula.cxx.
183 for (std::size_t iter = 0,
end =
m_ndata; iter !=
end; ++ iter)
◆ ndim()
int MD::Formula::ndim |
( |
| ) |
const |
returns: the number of unspecified array dimensions for the given formula guarantee: no-fail requires: valid()
Definition at line 157 of file Formula.cxx.
◆ operator=()
◆ reset()
void MD::Formula::reset |
( |
TTree * |
tree | ) |
|
effects: reset this formula to a new tree guarantee: strong failures: out of memory II failures: TTreeFormula error requires: !formula().empty()
Definition at line 102 of file Formula.cxx.
119 m_form->SetQuickLoad (kTRUE);
124 tree->SetBit (TTree::kForceRead);
125 if (
m_form->GetNdim() <= 0)
127 else if (
m_form->GetMultiplicity() == 0)
129 else if (
m_manager->GetMultiplicity() == 1 &&
m_form->GetMultiplicity() == 1)
131 else if (
m_manager->GetMultiplicity() == -1 &&
m_form->GetMultiplicity() == 1)
◆ testInvariant()
void MD::Formula::testInvariant |
( |
| ) |
const |
effects: test the invariant of this object guarantee: no-fail
Definition at line 36 of file Formula.cxx.
◆ valid()
bool MD::Formula::valid |
( |
| ) |
const |
returns: whether the formula is valid guarantee: no-fail
Definition at line 148 of file Formula.cxx.
◆ value()
Double_t MD::Formula::value |
( |
std::size_t |
data | ) |
const |
returns: the result of evaluating the formula with the given index for the given data entry guarantee: strong failures: TTreeFormula errors requires: valid() requires: data < getNData()
Definition at line 200 of file Formula.cxx.
◆ m_cache
std::vector<Double_t> MD::Formula::m_cache |
|
mutableprivate |
description: the cache of data entries
Definition at line 154 of file Formula.h.
◆ m_entry
Long64_t MD::Formula::m_entry |
|
mutableprivate |
description: the last entry we read
Definition at line 146 of file Formula.h.
◆ m_form
TTreeFormula* MD::Formula::m_form |
|
private |
description the formula used
Definition at line 133 of file Formula.h.
◆ m_formula
std::string MD::Formula::m_formula |
|
private |
description: members directly corresponding to accessors
Definition at line 121 of file Formula.h.
◆ m_manager
TTreeFormulaManager* MD::Formula::m_manager |
|
private |
description: the manager used
Definition at line 137 of file Formula.h.
◆ m_name
std::string MD::Formula::m_name |
|
private |
description: the name we use for the formula
Definition at line 125 of file Formula.h.
◆ m_ndata
Int_t MD::Formula::m_ndata |
|
mutableprivate |
description: the number of data entries
Definition at line 150 of file Formula.h.
◆ m_ndim
description: the number of array dimensions we need to loop over, or -1 if we are in error
Definition at line 142 of file Formula.h.
◆ m_read
std::vector<bool> MD::Formula::m_read |
|
mutableprivate |
description: whether we read the given data entry
Definition at line 158 of file Formula.h.
◆ m_tree
TTree* MD::Formula::m_tree |
|
private |
description: the tree we are connected to
Definition at line 129 of file Formula.h.
The documentation for this class was generated from the following files: