#include <MultiDraw/FormulaSvc.h>
#include <memory>
#include <sstream>
#include <TTree.h>
#include <TTreeFormula.h>
#include <TTreeFormulaManager.h>
#include <EventLoop/Job.h>
#include <EventLoop/StatusCode.h>
#include <EventLoop/IWorker.h>
#include <MultiDraw/Formula.h>
#include <RootCoreUtils/Assert.h>
#include <RootCoreUtils/ThrowMsg.h>
Go to the source code of this file.
◆ ClassImp()
Definition at line 35 of file FormulaSvc.cxx.
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;