#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 35 of file Formula.h.
◆ Formula() [1/3]
effects: standard default constructor guarantee: no-fail
Definition at line 68 of file Formula.cxx.
72 {
74 }
#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 78 of file Formula.cxx.
◆ ~Formula()
| MD::Formula::~Formula |
( |
| ) |
|
effects: standard destructor guarantee: no-fail
Definition at line 91 of file Formula.cxx.
93 {
95
98 }
#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 139 of file Formula.cxx.
141 {
144 }
#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 167 of file Formula.cxx.
169 {
172
176 {
180 {
185
191 }
192 }
196 }
#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 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.
104 {
107
115
118
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)
133
134
135 }
#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 36 of file Formula.cxx.
38 {
41 {
43
45 {
48 {
51 }
52 } else
53 {
56 }
57 } else
58 {
63 }
64 }
◆ 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.
202 {
206
208 {
211 }
213 }
char data[hepevt_bytes_allocation_ATLAS]
◆ 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: