22#include <TTreeFormula.h>
23#include <TTreeFormulaManager.h>
47 std::string
dbg (
const FormulaSvc& ,
unsigned )
57 job.algsAdd (
new FormulaSvc);
76 testInvariant ()
const
80 for (std::size_t form = 0, end = m_vars.size(); form != end; ++ form)
102 for (std::size_t form = 0, end = m_vars.size(); form != end; ++ form)
110 const Formula *FormulaSvc ::
111 addForm (
const std::string& formula)
116 for (std::size_t form = 0, end = m_vars.size(); form != end; ++ form)
118 if (m_vars[form]->formula() == formula)
122 std::ostringstream name;
123 name <<
"var" << m_vars.size();
124 m_vars.push_back (
new Formula (name.str(), formula, m_tree));
125 return m_vars.back();
130 const char *FormulaSvc ::
148 m_tree = wk()->tree();
149 m_tree->ResetBit (TTree::kForceRead);
151 for (std::size_t form = 0, end = m_vars.size(); form != end; ++ form)
152 m_vars[form]->reset (m_tree);
159 return EL::StatusCode::SUCCESS;
168 if (wk()->treeEntry() != wk()->
tree()->GetReadEvent())
169 wk()->tree()->LoadTree (wk()->treeEntry());
171 return EL::StatusCode::SUCCESS;
#define RCU_DESTROY_INVARIANT(x)
#define RCU_CHANGE_INVARIANT(x)
#define RCU_NEW_INVARIANT(x)
#define RCU_REQUIRE_SOFT(x)
#define RCU_READ_INVARIANT(x)
#define RCU_THROW_MSG(message)
the interface for algorithms to access IWorker
virtual EL::Algorithm * getAlg(const std::string &name) const =0
effects: returns the algorithms with the given name or NULL if there is none guarantee: strong failur...
::StatusCode StatusCode
StatusCode definition for legacy code.
This module provides a lot of global definitions, forward declarations and includes that are used by ...
FormulaSvc * formulas(EL::IWorker *worker)
returns: the formula service for this worker guarantee: strong failures: formula service not configur...
void useFormulas(EL::Job &job)
effects: register the formula service for this job guarantee: strong failures: out of memory I