|
ATLAS Offline Software
|
Go to the documentation of this file.
87 : m_hist (0),
m_type (-1), m_valnum (1), m_cut (
false), m_hist2 (0)
96 const std::string& val_value0,
97 const std::string& val_value1,
98 const std::string& val_value2,
99 const std::string& val_value3)
100 : m_hist (0),
m_type (-1), m_valnum (1), m_cut (
false), m_hist2 (0)
102 std::unique_ptr<TH1>
hist (val_hist_swallow);
107 m_formulas.push_back (val_value0);
108 if (!val_value1.empty())
109 m_formulas.push_back (val_value1);
110 if (!val_value2.empty())
111 m_formulas.push_back (val_value2);
112 if (!val_value3.empty())
113 m_formulas.push_back (val_value3);
115 m_hist =
hist.release();
116 m_hist->SetDirectory (0);
117 if (
dynamic_cast<TProfile*
>(m_hist) != 0)
121 }
else if (
dynamic_cast<TH2*
>(m_hist) != 0)
125 }
else if (
dynamic_cast<TH3*
>(m_hist) != 0)
134 m_values.resize (m_valnum + 1, 1);
135 if (m_valnum == m_formulas.size())
137 else if (m_valnum+1 == m_formulas.size())
161 return EL::StatusCode::SUCCESS;
184 return EL::StatusCode::SUCCESS;
199 return EL::StatusCode::SUCCESS;
202 std::size_t
size = std::size_t (-1);
203 for (std::size_t form = 0; form !=
m_valnum; ++ form)
211 if (
m_index[form]->ndata() > 0)
226 if (ndim == 0 &&
size > 1)
228 for (std::size_t iter = 0; iter !=
size; ++ iter)
236 for (std::size_t form = 0; form !=
m_valnum; ++ form)
238 if (
m_index[form]->ndim() == 1)
261 return EL::StatusCode::SUCCESS;
std::vector< const Formula * > m_index
description: the indices to the formulas
bool m_cut
description: whether we use a cut
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
This module provides a lot of global definitions, forward declarations and includes that are used by ...
virtual EL::StatusCode execute()
effects: process the next event guarantee: basic failures: algorithm dependent rationale: the virtual...
virtual void addOutput(TObject *output_swallow)=0
effects: add an object to the output.
FormulaSvc * m_formSvc
description: the formula service we are using
FormulaSvc * formulas(EL::IWorker *worker)
returns: the formula service for this worker guarantee: strong failures: formula service not configur...
std::vector< Double_t > m_values
description: the value of the formulas
#define RCU_REQUIRE_SOFT(x)
def TProfile(*args, **kwargs)
AlgHist()
effects: default constructor guarantee: no-fail rationale: this should only be called by serializatio...
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual EL::StatusCode setupJob(EL::Job &job)
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
std::size_t m_valnum
description: the number of values without the weight/cut
TH1 * m_hist2
description: the histogram we are filling
#define RCU_INVARIANT0(y)
ClassImp(MD::AlgHist) namespace MD
virtual EL::StatusCode initialize()
effects: do everything that needs to be done before running the algorithm, e.g.
IWorker * wk() const
description: the worker that is controlling us guarantee: no-fail
TH1 * m_hist
description: the histogram we use as a template
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)
int m_type
description: the type of histogram used
#define RCU_THROW_MSG(message)
std::vector< std::string > m_formulas
description: the list of formulas used
~AlgHist()
effects: destructor guarantee: no-fail rationale: this is needed to delete the template histogram
#define RCU_NEW_INVARIANT(x)