Logo ROOT  
Reference Guide
RooNumIntConfig.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooNumIntConfig.h,v 1.8 2007/05/11 09:11:30 verkerke Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_NUM_INT_CONFIG
17#define ROO_NUM_INT_CONFIG
18
19#include "TObject.h"
20#include "RooCategory.h"
21#include "RooLinkedList.h"
22class RooNumIntFactory ;
23class RooAbsIntegrator ;
24
25class RooNumIntConfig : public TObject, public RooPrintable {
26public:
27
29 RooNumIntConfig(const RooNumIntConfig& other) ;
31 ~RooNumIntConfig() override;
32
33 // Return selected integration techniques for 1,2,N dimensional integrals
37 const RooCategory& method1D() const { return _method1D ; }
38 const RooCategory& method2D() const { return _method2D ; }
39 const RooCategory& methodND() const { return _methodND ; }
40
41 // Return selected integration techniques for 1,2,N dimensional open-ended integrals
45 const RooCategory& method1DOpen() const { return _method1DOpen ; }
46 const RooCategory& method2DOpen() const { return _method2DOpen ; }
47 const RooCategory& methodNDOpen() const { return _methodNDOpen ; }
48
49 // Set/get absolute and relative precision convergence criteria
50 double epsAbs() const { return _epsAbs ; }
51 double epsRel() const { return _epsRel ; }
52 void setEpsAbs(double newEpsAbs) ;
53 void setEpsRel(double newEpsRel) ;
54
55 // Set/get switch that activates printing of number of required
56 // function evaluations for each numeric integration
57 bool printEvalCounter() const { return _printEvalCounter ; }
58 void setPrintEvalCounter(bool newVal) { _printEvalCounter = newVal ; }
59
61
63 const RooArgSet& getConfigSection(const char* name) const ;
64 RooArgSet& getConfigSection(const char* name) ;
65
66 void printMultiline(std::ostream &os, Int_t content, bool verbose, TString indent= "") const override;
67
68 StyleOption defaultPrintStyle(Option_t* opt) const override ;
69 inline void Print(Option_t *options= 0) const override {
71 }
72
73protected:
74 double _epsAbs ; ///< Absolute precision
75 double _epsRel ; ///< Relative precision
76 bool _printEvalCounter ; ///< Flag to control printing of function evaluation counter
77
78 RooCategory _method1D ; ///< Selects integration method for 1D integrals
79 RooCategory _method2D ; ///< Selects integration method for 2D integrals
80 RooCategory _methodND ; ///< Selects integration method for ND integrals
81 RooCategory _method1DOpen ; ///< Selects integration method for open ended 1D integrals
82 RooCategory _method2DOpen ; ///< Selects integration method for open ended 2D integrals
83 RooCategory _methodNDOpen ; ///< Selects integration method for open ended ND integrals
84 RooLinkedList _configSets ; ///< List of configuration sets for individual integration methods
85
86 ClassDefOverride(RooNumIntConfig,1) // Numeric Integrator configuration
87};
88
89#endif
90
91
const char Option_t
Definition: RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
static void indent(ostringstream &buf, int indent_level)
char name[80]
Definition: TGX11.cxx:110
const char * proto
Definition: civetweb.c:17502
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:57
RooCategory is an object to represent discrete states.
Definition: RooCategory.h:28
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:38
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
RooCategory _method1D
Selects integration method for 1D integrals.
RooCategory _method1DOpen
Selects integration method for open ended 1D integrals.
RooCategory & method2DOpen()
RooCategory & method2D()
void printMultiline(std::ostream &os, Int_t content, bool verbose, TString indent="") const override
Detailed printing interface.
void Print(Option_t *options=0) const override
This method must be overridden when a class wants to print itself.
RooNumIntConfig()
Constructor.
const RooCategory & method2D() const
const RooCategory & method2DOpen() const
RooCategory & methodND()
const RooCategory & method1DOpen() const
RooLinkedList _configSets
List of configuration sets for individual integration methods.
void setEpsRel(double newEpsRel)
Set relative convergence criteria (convergence if abs(Err)/abs(Int)<newEpsRel)
RooCategory _methodND
Selects integration method for ND integrals.
const RooArgSet & getConfigSection(const char *name) const
Retrieve configuration information specific to integrator with given name.
double _epsAbs
Absolute precision.
RooCategory _methodNDOpen
Selects integration method for open ended ND integrals.
bool _printEvalCounter
Flag to control printing of function evaluation counter.
RooCategory & methodNDOpen()
double epsRel() const
const RooCategory & method1D() const
double _epsRel
Relative precision.
~RooNumIntConfig() override
Destructor.
StyleOption defaultPrintStyle(Option_t *opt) const override
bool addConfigSection(const RooAbsIntegrator *proto, const RooArgSet &defaultConfig)
Add a configuration section for a particular integrator.
RooCategory _method2D
Selects integration method for 2D integrals.
void setPrintEvalCounter(bool newVal)
const RooCategory & methodNDOpen() const
RooCategory & method1D()
RooCategory & method1DOpen()
const RooCategory & methodND() const
double epsAbs() const
bool printEvalCounter() const
RooCategory _method2DOpen
Selects integration method for open ended 2D integrals.
RooNumIntConfig & operator=(const RooNumIntConfig &other)
Assignment operator from other RooNumIntConfig.
static RooNumIntConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
void setEpsAbs(double newEpsAbs)
Set absolute convergence criteria (convergence if abs(Err)<newEpsAbs)
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
Definition: RooPrintable.h:25
virtual Int_t defaultPrintContents(Option_t *opt) const
Default choice of contents to be printed (name and value)
static std::ostream & defaultPrintStream(std::ostream *os=0)
Return a reference to the current default stream to use in Print().
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:136