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 virtual ~RooNumIntConfig();
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_t epsAbs() const { return _epsAbs ; }
51 Double_t epsRel() const { return _epsRel ; }
52 void setEpsAbs(Double_t newEpsAbs) ;
53 void setEpsRel(Double_t newEpsRel) ;
54
55 // Set/get switch that activates printing of number of required
56 // function evaluations for each numeric integration
58 void setPrintEvalCounter(Bool_t 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_t verbose, TString indent= "") const;
67
68 virtual StyleOption defaultPrintStyle(Option_t* opt) const ;
69 inline virtual void Print(Option_t *options= 0) const {
71 }
72
73protected:
74 Double_t _epsAbs ; // Absolute precision
75 Double_t _epsRel ; // Relative precision
76 Bool_t _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 ClassDef(RooNumIntConfig,1) // Numeric Integrator configuration
87};
88
89#endif
90
91
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
static void indent(ostringstream &buf, int indent_level)
char name[80]
Definition: TGX11.cxx:109
const char * proto
Definition: civetweb.c:16604
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:28
RooCategory represents a fundamental (non-derived) discrete value object.
Definition: RooCategory.h:24
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:36
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
RooCategory _method1D
RooCategory _method1DOpen
RooCategory & method2DOpen()
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
void setEpsAbs(Double_t newEpsAbs)
Set absolute convergence criteria (convergence if abs(Err)<newEpsAbs)
Bool_t _printEvalCounter
RooCategory & method2D()
void printMultiline(std::ostream &os, Int_t content, Bool_t verbose, TString indent="") const
Detailed printing interface.
RooNumIntConfig()
Constructor.
const RooCategory & method2D() const
void setPrintEvalCounter(Bool_t newVal)
const RooCategory & method2DOpen() const
RooCategory & methodND()
const RooCategory & method1DOpen() const
RooLinkedList _configSets
virtual StyleOption defaultPrintStyle(Option_t *opt) const
RooCategory _methodND
const RooArgSet & getConfigSection(const char *name) const
Retrieve configuration information specific to integrator with given name.
RooCategory _methodNDOpen
Double_t epsAbs() const
void setEpsRel(Double_t newEpsRel)
Set relative convergence criteria (convergence if abs(Err)/abs(Int)<newEpsRel)
RooCategory & methodNDOpen()
const RooCategory & method1D() const
Bool_t printEvalCounter() const
RooCategory _method2D
Double_t epsRel() const
const RooCategory & methodNDOpen() const
RooCategory & method1D()
RooCategory & method1DOpen()
const RooCategory & methodND() const
Bool_t addConfigSection(const RooAbsIntegrator *proto, const RooArgSet &defaultConfig)
Add a configuration section for a particular integrator.
RooCategory _method2DOpen
RooNumIntConfig & operator=(const RooNumIntConfig &other)
Assignment operator from other RooNumIntConfig.
static RooNumIntConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
virtual ~RooNumIntConfig()
Destructor.
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:131