ROOT
master
Reference Guide
Loading...
Searching...
No Matches
RooFormulaEvaluator.h
Go to the documentation of this file.
1
/// \cond ROOFIT_INTERNAL
2
3
/*
4
* Project: RooFit
5
*
6
* Copyright (c) 2026, CERN
7
*
8
* Redistribution and use in source and binary forms,
9
* with or without modification, are permitted according to the terms
10
* listed in LICENSE (http://roofit.sourceforge.net/license.txt)
11
*/
12
13
#ifndef ROO_FORMULA_EVALUATOR
14
#define ROO_FORMULA_EVALUATOR
15
16
#include <memory>
17
18
class
TFormula
;
19
20
/// Abstract interface for evaluating a processed formula expression, i.e. one
21
/// normalized by RooFormulaUtils::processFormula() to the `x[i]`-only dialect,
22
/// so an implementation doesn't need any name resolution.
23
class
RooFormulaEvaluator
{
24
public
:
25
virtual
~RooFormulaEvaluator
() =
default
;
26
27
/// Evaluate the formula, with `vars[i]` providing the value of `x[i]`.
28
virtual
double
eval(
const
double
*vars)
const
= 0;
29
30
/// Return a deep copy of this evaluator.
31
virtual
std::unique_ptr<RooFormulaEvaluator> clone()
const
= 0;
32
33
/// Return the underlying TFormula. Only the TFormula-backed evaluator
34
/// returns a non-nullptr. This accessor only exists to support the
35
/// getUniqueFuncName() functions used by the codegen backend and will be
36
/// removed together with them.
37
virtual
TFormula
*
getTFormula
()
const
{
return
nullptr
; }
38
};
39
40
#endif
41
42
/// \endcond
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:359
ROOT::Detail::TRangeCast
Definition
TCollection.h:312
TFormula
The Formula class.
Definition
TFormula.h:89
roofit
roofitcore
src
RooFormulaEvaluator.h
ROOTmaster - Reference Guide Generated on Sat Sep 5 2026 04:37:45 (GVA Time) using Doxygen 1.10.0