Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooTFormulaEvaluator.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_T_FORMULA_EVALUATOR
14#define ROO_T_FORMULA_EVALUATOR
15
16#include "RooFormulaEvaluator.h"
17
18#include <memory>
19#include <string>
20
21class RooArgList;
22class TFormula;
23
24/// RooFormulaEvaluator implementation backed by a TFormula, i.e. evaluating
25/// via a function compiled with the cling JIT.
27public:
28 RooTFormulaEvaluator(const char *name, std::string const &processedFormula, std::string const &origFormula,
29 RooArgList const &varList);
31
32 RooTFormulaEvaluator &operator=(RooTFormulaEvaluator const &other) = delete;
33
34 ~RooTFormulaEvaluator() override;
35
36 double eval(const double *vars) const override;
37 std::unique_ptr<RooFormulaEvaluator> clone() const override;
38
39 TFormula *getTFormula() const override { return _tFormula.get(); }
40
41private:
42 std::unique_ptr<TFormula> _tFormula; ///< The formula used to compute values
43};
44
45#endif
46
47/// \endcond
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
char name[80]
Definition TGX11.cxx:142
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
The Formula class.
Definition TFormula.h:89