|
ATLAS Offline Software
|
Go to the documentation of this file.
64 : m_hist (0), m_hist2 (0), m_formSvc (0)
73 : m_hist (0), m_hist2 (0)
75 std::unique_ptr<TH1>
hist (val_hist_swallow);
80 for (std::size_t form = 0,
end =
hist->GetNbinsX();
83 const std::string
label =
hist->GetXaxis()->GetBinLabel(form+1);
86 m_axis.push_back (
hist->GetXaxis()->GetBinCenter (form+1));
87 if (
split == std::string::npos)
89 m_formulas.push_back (
label);
90 m_back.push_back (form - 1);
93 m_formulas.push_back (
label.substr (0,
split));
94 const std::string back =
label.substr (
split+1);
95 m_back.push_back (form);
99 for (std::size_t form2 = 0; form2 != form; ++ form2)
101 if (m_formulas[form2] == back)
102 m_back.back() = form2;
104 if (m_back.back() == form)
110 m_hist =
hist.release();
111 m_hist->SetDirectory (0);
113 m_values.resize (m_formulas.size());
125 return EL::StatusCode::SUCCESS;
153 return EL::StatusCode::SUCCESS;
166 std::size_t
size = std::size_t (-1);
167 for (std::size_t form = 0; form !=
m_formulas.size(); ++ form)
175 if (
m_index[form]->ndata() > 0)
190 if (ndim == 0 &&
size > 1)
192 for (std::size_t iter = 0; iter !=
size; ++ iter)
203 if (
m_index[form]->ndim() == 1)
213 return EL::StatusCode::SUCCESS;
std::vector< Double_t > m_values
description: the value of the formulas
AlgCFlow()
effects: default constructor guarantee: no-fail rationale: this should only be called by serializatio...
virtual EL::StatusCode initialize()
effects: do everything that needs to be done before running the algorithm, e.g.
ClassImp(MD::AlgCFlow) namespace MD
TH1 * m_hist2
description: the histogram we are filling
This module provides a lot of global definitions, forward declarations and includes that are used by ...
virtual void addOutput(TObject *output_swallow)=0
effects: add an object to the output.
virtual EL::StatusCode setupJob(EL::Job &job)
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
std::vector< std::string > m_formulas
description: the list of formulas used
FormulaSvc * formulas(EL::IWorker *worker)
returns: the formula service for this worker guarantee: strong failures: formula service not configur...
FormulaSvc * m_formSvc
description: the formula service we are using
#define RCU_REQUIRE_SOFT(x)
::StatusCode StatusCode
StatusCode definition for legacy code.
TH1 * m_hist
description: the histogram we use as a template
IWorker * wk() const
description: the worker that is controlling us guarantee: no-fail
virtual EL::StatusCode execute()
effects: process the next event guarantee: basic failures: algorithm dependent rationale: the virtual...
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
std::vector< Double_t > m_axis
description: the axis values of the bins
void useFormulas(EL::Job &job)
effects: register the formula service for this job guarantee: strong failures: out of memory I
#define RCU_CHANGE_INVARIANT(x)
std::vector< const Formula * > m_index
description: the indices to the formulas
#define RCU_THROW_MSG(message)
std::vector< std::size_t > m_back
description: the back-indices to the formulas
#define RCU_NEW_INVARIANT(x)