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"
22 class RooNumIntFactory ;
23 class RooAbsIntegrator ;
24 
25 class RooNumIntConfig : public TObject, public RooPrintable {
26 public:
27 
29  RooNumIntConfig(const RooNumIntConfig& other) ;
31  virtual ~RooNumIntConfig();
32 
33  // Return selected integration techniques for 1,2,N dimensional integrals
34  RooCategory& method1D() { return _method1D ; }
35  RooCategory& method2D() { return _method2D ; }
36  RooCategory& methodND() { return _methodND ; }
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 
60  static RooNumIntConfig& defaultConfig() ;
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 
73 protected:
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 
RooNumIntConfig::epsRel
Double_t epsRel() const
Definition: RooNumIntConfig.h:51
RooNumIntFactory
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
Definition: RooNumIntFactory.h:30
RooNumIntConfig::method1DOpen
const RooCategory & method1DOpen() const
Definition: RooNumIntConfig.h:45
RooNumIntConfig::method2DOpen
RooCategory & method2DOpen()
Definition: RooNumIntConfig.h:43
RooNumIntConfig::getConfigSection
const RooArgSet & getConfigSection(const char *name) const
Retrieve configuration information specific to integrator with given name.
Definition: RooNumIntConfig.cxx:222
RooNumIntConfig::methodNDOpen
const RooCategory & methodNDOpen() const
Definition: RooNumIntConfig.h:47
RooNumIntConfig::_method2D
RooCategory _method2D
Definition: RooNumIntConfig.h:79
RooNumIntConfig::~RooNumIntConfig
virtual ~RooNumIntConfig()
Destructor.
Definition: RooNumIntConfig.cxx:97
RooNumIntConfig::operator=
RooNumIntConfig & operator=(const RooNumIntConfig &other)
Assignment operator from other RooNumIntConfig.
Definition: RooNumIntConfig.cxx:134
Option_t
const char Option_t
Definition: RtypesCore.h:66
RooNumIntConfig::method1D
RooCategory & method1D()
Definition: RooNumIntConfig.h:34
RooPrintable::StyleOption
StyleOption
Definition: RooPrintable.h:34
RooNumIntConfig::_methodND
RooCategory _methodND
Definition: RooNumIntConfig.h:80
RooNumIntConfig::methodND
const RooCategory & methodND() const
Definition: RooNumIntConfig.h:39
RooNumIntConfig::_epsRel
Double_t _epsRel
Definition: RooNumIntConfig.h:75
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
RooNumIntConfig::_configSets
RooLinkedList _configSets
Definition: RooNumIntConfig.h:84
RooNumIntConfig::setPrintEvalCounter
void setPrintEvalCounter(Bool_t newVal)
Definition: RooNumIntConfig.h:58
TString
Basic string class.
Definition: TString.h:136
RooPrintable
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
Definition: RooPrintable.h:25
RooNumIntConfig::_method2DOpen
RooCategory _method2DOpen
Definition: RooNumIntConfig.h:82
RooNumIntConfig::RooNumIntConfig
RooNumIntConfig()
Constructor.
Definition: RooNumIntConfig.cxx:71
bool
RooNumIntConfig::printMultiline
void printMultiline(std::ostream &os, Int_t content, Bool_t verbose, TString indent="") const
Detailed printing interface.
Definition: RooNumIntConfig.cxx:282
RooNumIntConfig::_epsAbs
Double_t _epsAbs
Definition: RooNumIntConfig.h:74
RooNumIntConfig::defaultPrintStyle
virtual StyleOption defaultPrintStyle(Option_t *opt) const
Definition: RooNumIntConfig.cxx:248
RooPrintable::defaultPrintContents
virtual Int_t defaultPrintContents(Option_t *opt) const
Default choice of contents to be printed (name and value)
Definition: RooPrintable.cxx:233
RooNumIntConfig::epsAbs
Double_t epsAbs() const
Definition: RooNumIntConfig.h:50
RooNumIntConfig::addConfigSection
Bool_t addConfigSection(const RooAbsIntegrator *proto, const RooArgSet &defaultConfig)
Add a configuration section for a particular integrator.
Definition: RooNumIntConfig.cxx:174
RooPrintable::defaultPrintStream
static std::ostream & defaultPrintStream(std::ostream *os=0)
Return a reference to the current default stream to use in Print().
Definition: RooPrintable.cxx:272
RooNumIntConfig::method2D
const RooCategory & method2D() const
Definition: RooNumIntConfig.h:38
RooLinkedList
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:35
RooNumIntConfig::setEpsRel
void setEpsRel(Double_t newEpsRel)
Set relative convergence criteria (convergence if abs(Err)/abs(Int)<newEpsRel)
Definition: RooNumIntConfig.cxx:268
RooNumIntConfig::method2D
RooCategory & method2D()
Definition: RooNumIntConfig.h:35
RooNumIntConfig::printEvalCounter
Bool_t printEvalCounter() const
Definition: RooNumIntConfig.h:57
RooNumIntConfig::Print
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
Definition: RooNumIntConfig.h:69
RooNumIntConfig::defaultConfig
static RooNumIntConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
Definition: RooNumIntConfig.cxx:48
RooCategory.h
RooNumIntConfig::methodNDOpen
RooCategory & methodNDOpen()
Definition: RooNumIntConfig.h:44
proto
const char * proto
Definition: civetweb.c:16604
Double_t
double Double_t
Definition: RtypesCore.h:59
TObject.h
RooNumIntConfig::setEpsAbs
void setEpsAbs(Double_t newEpsAbs)
Set absolute convergence criteria (convergence if abs(Err)<newEpsAbs)
Definition: RooNumIntConfig.cxx:238
RooCategory
RooCategory is an object to represent discrete states.
Definition: RooCategory.h:27
RooLinkedList.h
RooNumIntConfig::method1D
const RooCategory & method1D() const
Definition: RooNumIntConfig.h:37
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
RooPrintable::printStream
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,...
Definition: RooPrintable.cxx:75
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooNumIntConfig
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
Definition: RooNumIntConfig.h:25
RooAbsIntegrator
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
Definition: RooAbsIntegrator.h:22
RooNumIntConfig::_method1DOpen
RooCategory _method1DOpen
Definition: RooNumIntConfig.h:81
RooNumIntConfig::method1DOpen
RooCategory & method1DOpen()
Definition: RooNumIntConfig.h:42
RooNumIntConfig::_methodNDOpen
RooCategory _methodNDOpen
Definition: RooNumIntConfig.h:83
RooNumIntConfig::_method1D
RooCategory _method1D
Definition: RooNumIntConfig.h:78
RooNumIntConfig::_printEvalCounter
Bool_t _printEvalCounter
Definition: RooNumIntConfig.h:76
RooNumIntConfig::methodND
RooCategory & methodND()
Definition: RooNumIntConfig.h:36
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
int
RooNumIntConfig::method2DOpen
const RooCategory & method2DOpen() const
Definition: RooNumIntConfig.h:46