#include <Formula.h>
|
| void | testInvariant () const |
| | effects: test the invariant of this object guarantee: no-fail
|
| | Formula () |
| | effects: standard default constructor guarantee: no-fail
|
| | Formula (const std::string &name, const std::string &formula, TTree *tree) |
| | effects: standard constructor guarantee: strong failures: out of memory II
|
| | ~Formula () |
| | effects: standard destructor guarantee: no-fail
|
| 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()
|
| const std::string & | formula () const |
| | description: the formula used guarantee: no-fail
|
| bool | valid () const |
| | returns: whether the formula is valid guarantee: no-fail
|
| int | ndim () const |
| | returns: the number of unspecified array dimensions for the given formula guarantee: no-fail requires: valid()
|
| 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()
|
| 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()
|
|
| std::string | m_formula |
| | description: members directly corresponding to accessors
|
| std::string | m_name |
| | description: the name we use for the formula
|
| TTree * | m_tree |
| | description: the tree we are connected to
|
| TTreeFormula * | m_form |
| | description the formula used
|
| TTreeFormulaManager * | m_manager |
| | description: the manager used
|
| int | m_ndim |
| | description: the number of array dimensions we need to loop over, or -1 if we are in error
|
| Long64_t | m_entry |
| | description: the last entry we read
|
| Int_t | m_ndata |
| | description: the number of data entries
|
| std::vector< Double_t > | m_cache |
| | description: the cache of data entries
|
| std::vector< bool > | m_read |
| | description: whether we read the given data entry
|
Definition at line 26 of file Formula.h.
◆ Formula() [1/3]
effects: standard default constructor guarantee: no-fail
Definition at line 62 of file Formula.cxx.
66 {
68 }
#define RCU_NEW_INVARIANT(x)
◆ 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 72 of file Formula.cxx.
◆ ~Formula()
| MD::Formula::~Formula |
( |
| ) |
|
effects: standard destructor guarantee: no-fail
Definition at line 85 of file Formula.cxx.
87 {
89
92 }
#define RCU_DESTROY_INVARIANT(x)
◆ Formula() [3/3]
| MD::Formula::Formula |
( |
const Formula & | that | ) |
|
|
private |
rationale: to avoid broken objects
◆ formula()
| const std::string & MD::Formula::formula |
( |
| ) |
const |
description: the formula used guarantee: no-fail
Definition at line 133 of file Formula.cxx.
135 {
138 }
#define RCU_READ_INVARIANT(x)
◆ 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 161 of file Formula.cxx.
163 {
166
170 {
174 {
179
185 }
186 }
190 }
#define RCU_REQUIRE_SOFT(x)
#define RCU_THROW_MSG(message)
◆ 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 151 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 96 of file Formula.cxx.
98 {
101
109
112
113 m_form->SetQuickLoad (kTRUE);
118 tree->SetBit (TTree::kForceRead);
119 if (
m_form->GetNdim() <= 0)
121 else if (
m_form->GetMultiplicity() == 0)
123 else if (
m_manager->GetMultiplicity() == 1 &&
m_form->GetMultiplicity() == 1)
125 else if (
m_manager->GetMultiplicity() == -1 &&
m_form->GetMultiplicity() == 1)
127
128
129 }
#define RCU_CHANGE_INVARIANT(x)
static const Attributes_t empty
◆ testInvariant()
| void MD::Formula::testInvariant |
( |
| ) |
const |
effects: test the invariant of this object guarantee: no-fail
Definition at line 30 of file Formula.cxx.
32 {
35 {
37
39 {
42 {
45 }
46 } else
47 {
50 }
51 } else
52 {
57 }
58 }
◆ valid()
| bool MD::Formula::valid |
( |
| ) |
const |
returns: whether the formula is valid guarantee: no-fail
Definition at line 142 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 194 of file Formula.cxx.
196 {
200
202 {
205 }
207 }
◆ m_cache
| std::vector<Double_t> MD::Formula::m_cache |
|
mutableprivate |
description: the cache of data entries
Definition at line 145 of file Formula.h.
◆ m_entry
| Long64_t MD::Formula::m_entry |
|
mutableprivate |
description: the last entry we read
Definition at line 137 of file Formula.h.
◆ m_form
| TTreeFormula* MD::Formula::m_form |
|
private |
description the formula used
Definition at line 124 of file Formula.h.
◆ m_formula
| std::string MD::Formula::m_formula |
|
private |
description: members directly corresponding to accessors
Definition at line 112 of file Formula.h.
◆ m_manager
| TTreeFormulaManager* MD::Formula::m_manager |
|
private |
description: the manager used
Definition at line 128 of file Formula.h.
◆ m_name
| std::string MD::Formula::m_name |
|
private |
description: the name we use for the formula
Definition at line 116 of file Formula.h.
◆ m_ndata
| Int_t MD::Formula::m_ndata |
|
mutableprivate |
description: the number of data entries
Definition at line 141 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 133 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 149 of file Formula.h.
◆ m_tree
| TTree* MD::Formula::m_tree |
|
private |
description: the tree we are connected to
Definition at line 120 of file Formula.h.
The documentation for this class was generated from the following files: