Logo ROOT   6.08/07
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 
62  Bool_t addConfigSection(const RooAbsIntegrator* proto, const RooArgSet& defaultConfig) ;
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  static void cleanup() ;
74 
75 protected:
76 
78 
79  Double_t _epsAbs ; // Absolute precision
80  Double_t _epsRel ; // Relative precision
81  Bool_t _printEvalCounter ; // Flag to control printing of function evaluation counter
82 
83  RooCategory _method1D ; // Selects integration method for 1D integrals
84  RooCategory _method2D ; // Selects integration method for 2D integrals
85  RooCategory _methodND ; // Selects integration method for ND integrals
86  RooCategory _method1DOpen ; // Selects integration method for open ended 1D integrals
87  RooCategory _method2DOpen ; // Selects integration method for open ended 2D integrals
88  RooCategory _methodNDOpen ; // Selects integration method for open ended ND integrals
89  RooLinkedList _configSets ; // List of configuration sets for individual integration methods
90 
91  ClassDef(RooNumIntConfig,1) // Numeric Integrator configuration
92 };
93 
94 #endif
95 
96 
static RooNumIntConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
virtual StyleOption defaultPrintStyle(Option_t *opt) const
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
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, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'.
RooCategory _method1DOpen
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
Double_t epsAbs() const
const char Option_t
Definition: RtypesCore.h:62
RooCategory & methodND()
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
RooCategory & method2D()
Bool_t printEvalCounter() const
Basic string class.
Definition: TString.h:137
RooCategory & method2DOpen()
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const RooArgSet & getConfigSection(const char *name) const
Retrieve configuration information specific to integrator with given name.
RooCategory & method1D()
#define ClassDef(name, id)
Definition: Rtypes.h:254
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods...
Definition: RooPrintable.h:26
RooCategory _methodND
const RooCategory & methodND() const
const RooCategory & method1D() const
const RooCategory & method2DOpen() const
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
const RooCategory & method1DOpen() const
RooCategory & methodNDOpen()
RooNumIntConfig()
Constructor.
RooCategory _method1D
Bool_t _printEvalCounter
bool verbose
static RooNumIntConfig * _default
virtual Int_t defaultPrintContents(Option_t *opt) const
Default choice of contents to be printed (name and value)
static void indent(ostringstream &buf, int indent_level)
RooCategory represents a fundamental (non-derived) discrete value object.
Definition: RooCategory.h:25
const RooCategory & methodNDOpen() const
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:35
static std::ostream & defaultPrintStream(std::ostream *os=0)
Return a reference to the current default stream to use in Print().
RooNumIntConfig & operator=(const RooNumIntConfig &other)
Assignment operator from other RooNumIntConfig.
void setPrintEvalCounter(Bool_t newVal)
const RooCategory & method2D() const
double Double_t
Definition: RtypesCore.h:55
RooCategory & method1DOpen()
RooCategory _method2DOpen
RooCategory _methodNDOpen
Mother of all ROOT objects.
Definition: TObject.h:37
static void cleanup()
Function called by atexit() handler installed by RooSentinel to cleanup global objects at end of job...
Double_t epsRel() const
const char * proto
Definition: civetweb.c:11652
RooLinkedList _configSets
RooCategory _method2D
virtual ~RooNumIntConfig()
Destructor.
void setEpsAbs(Double_t newEpsAbs)
Set absolute convergence criteria (convergence if abs(Err)<newEpsAbs)
Bool_t addConfigSection(const RooAbsIntegrator *proto, const RooArgSet &defaultConfig)
Add a configuration section for a particular integrator.
char name[80]
Definition: TGX11.cxx:109
void setEpsRel(Double_t newEpsRel)
Set relative convergence criteria (convergence if abs(Err)/abs(Int)<newEpsRel)
void printMultiline(std::ostream &os, Int_t content, Bool_t verbose, TString indent="") const
Detailed printing interface.