Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooFit::EvalContext Class Reference

Definition at line 84 of file EvalContext.h.

Public Types

enum class  OffsetMode { WithoutOffset , WithOffset , OnlyOffset }
 

Public Member Functions

std::span< const doubleat (RooAbsArg const *arg, RooAbsArg const *caller=nullptr)
 
template<class T >
std::span< const doubleat (RooTemplateProxy< T > const &proxy)
 
RooBatchCompute::Config config (RooAbsArg const *arg) const
 
void enableVectorBuffers (bool enable)
 
std::span< doubleoutput ()
 
void resetVectorBuffers ()
 
void resize (std::size_t n)
 
void set (RooAbsArg const *arg, std::span< const double > const &span)
 
void setConfig (RooAbsArg const *arg, RooBatchCompute::Config const &config)
 
void setOutputWithOffset (RooAbsArg const *arg, ROOT::Math::KahanSum< double > val, ROOT::Math::KahanSum< double > const &offset)
 Sets the output value with an offset.
 
auto size () const
 

Private Attributes

std::size_t _bufferIdx = 0
 
std::vector< std::vector< double > > _buffers
 
std::vector< RooBatchCompute::Config_cfgs
 
std::vector< std::span< const double > > _ctx
 
std::span< double_currentOutput
 
bool _enableVectorBuffers = false
 
OffsetMode _offsetMode = OffsetMode::WithoutOffset
 

Friends

class Evaluator
 

#include <RooFit/EvalContext.h>

Member Enumeration Documentation

◆ OffsetMode

Enumerator
WithoutOffset 
WithOffset 
OnlyOffset 

Definition at line 86 of file EvalContext.h.

Member Function Documentation

◆ at() [1/2]

std::span< const double > RooFit::EvalContext::at ( RooAbsArg const *  arg,
RooAbsArg const *  caller = nullptr 
)

Definition at line 35 of file EvalContext.cxx.

◆ at() [2/2]

template<class T >
std::span< const double > RooFit::EvalContext::at ( RooTemplateProxy< T > const &  proxy)
inline

Definition at line 104 of file EvalContext.h.

◆ config()

RooBatchCompute::Config RooFit::EvalContext::config ( RooAbsArg const *  arg) const

Definition at line 73 of file EvalContext.cxx.

◆ enableVectorBuffers()

void RooFit::EvalContext::enableVectorBuffers ( bool  enable)
inline

Definition at line 110 of file EvalContext.h.

◆ output()

std::span< double > RooFit::EvalContext::output ( )
inline

Definition at line 112 of file EvalContext.h.

◆ resetVectorBuffers()

void RooFit::EvalContext::resetVectorBuffers ( )
inline

Definition at line 111 of file EvalContext.h.

◆ resize()

void RooFit::EvalContext::resize ( std::size_t  n)

Definition at line 82 of file EvalContext.cxx.

◆ set()

void RooFit::EvalContext::set ( RooAbsArg const *  arg,
std::span< const double > const &  span 
)
inline

Definition at line 91 of file EvalContext.h.

◆ setConfig()

void RooFit::EvalContext::setConfig ( RooAbsArg const *  arg,
RooBatchCompute::Config const &  config 
)

Definition at line 65 of file EvalContext.cxx.

◆ setOutputWithOffset()

void RooFit::EvalContext::setOutputWithOffset ( RooAbsArg const *  arg,
ROOT::Math::KahanSum< double val,
ROOT::Math::KahanSum< double > const &  offset 
)

Sets the output value with an offset.

This function sets the output value with an offset for the given argument. It should only be used in reducer nodes. Depending on the current OffsetMode, the result will either be just the value, the value minus the offset, of just the offset.

Parameters
argPointer to the RooAbsArg object.
valThe value to be set.
offsetThe offset value.
Exceptions
std::runtime_errorif the argument is not a reducer node.

Definition at line 100 of file EvalContext.cxx.

◆ size()

auto RooFit::EvalContext::size ( ) const
inline

Definition at line 88 of file EvalContext.h.

Friends And Related Symbol Documentation

◆ Evaluator

friend class Evaluator
friend

Definition at line 118 of file EvalContext.h.

Member Data Documentation

◆ _bufferIdx

std::size_t RooFit::EvalContext::_bufferIdx = 0
private

Definition at line 125 of file EvalContext.h.

◆ _buffers

std::vector<std::vector<double> > RooFit::EvalContext::_buffers
private

Definition at line 124 of file EvalContext.h.

◆ _cfgs

std::vector<RooBatchCompute::Config> RooFit::EvalContext::_cfgs
private

Definition at line 126 of file EvalContext.h.

◆ _ctx

std::vector<std::span<const double> > RooFit::EvalContext::_ctx
private

Definition at line 122 of file EvalContext.h.

◆ _currentOutput

std::span<double> RooFit::EvalContext::_currentOutput
private

Definition at line 121 of file EvalContext.h.

◆ _enableVectorBuffers

bool RooFit::EvalContext::_enableVectorBuffers = false
private

Definition at line 123 of file EvalContext.h.

◆ _offsetMode

OffsetMode RooFit::EvalContext::_offsetMode = OffsetMode::WithoutOffset
private

Definition at line 120 of file EvalContext.h.

Libraries for RooFit::EvalContext:

The documentation for this class was generated from the following files: