RooNumIntConfig.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooNumIntConfig.h,v 1.8 2007/05/11 09:11:30 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_NUM_INT_CONFIG
00017 #define ROO_NUM_INT_CONFIG
00018 
00019 #include "TObject.h"
00020 #include "RooCategory.h"
00021 #include "RooLinkedList.h"
00022 class RooNumIntFactory ;
00023 class RooAbsIntegrator ;
00024 
00025 class RooNumIntConfig : public TObject, public RooPrintable {
00026 public:
00027 
00028   RooNumIntConfig();
00029   RooNumIntConfig(const RooNumIntConfig& other) ;
00030   RooNumIntConfig& operator=(const RooNumIntConfig& other) ;
00031   virtual ~RooNumIntConfig();
00032 
00033   // Return selected integration techniques for 1,2,N dimensional integrals
00034   RooCategory& method1D() { return _method1D ; }
00035   RooCategory& method2D() { return _method2D ; }
00036   RooCategory& methodND() { return _methodND ; }
00037   const RooCategory& method1D() const { return _method1D ; }
00038   const RooCategory& method2D() const { return _method2D ; }
00039   const RooCategory& methodND() const { return _methodND ; }
00040 
00041   // Return selected integration techniques for 1,2,N dimensional open-ended integrals
00042   RooCategory& method1DOpen() { return _method1DOpen ; }
00043   RooCategory& method2DOpen() { return _method2DOpen ; }
00044   RooCategory& methodNDOpen() { return _methodNDOpen ; }
00045   const RooCategory& method1DOpen() const { return _method1DOpen ; }
00046   const RooCategory& method2DOpen() const { return _method2DOpen ; }
00047   const RooCategory& methodNDOpen() const { return _methodNDOpen ; }
00048 
00049   // Set/get absolute and relative precision convergence criteria
00050   Double_t epsAbs() const { return _epsAbs ; }
00051   Double_t epsRel() const { return _epsRel ; }
00052   void setEpsAbs(Double_t newEpsAbs) ; 
00053   void setEpsRel(Double_t newEpsRel) ;
00054 
00055   // Set/get switch that activates printing of number of required 
00056   // function evaluations for each numeric integration
00057   Bool_t printEvalCounter() const { return _printEvalCounter ; } 
00058   void setPrintEvalCounter(Bool_t newVal) { _printEvalCounter = newVal ; }
00059 
00060   static RooNumIntConfig& defaultConfig() ;
00061 
00062   Bool_t addConfigSection(const RooAbsIntegrator* proto, const RooArgSet& defaultConfig) ;
00063   const RooArgSet& getConfigSection(const char* name) const ;
00064   RooArgSet& getConfigSection(const char* name) ;
00065 
00066   void printMultiline(ostream &os, Int_t content, Bool_t verbose, TString indent= "") const;
00067 
00068   virtual StyleOption defaultPrintStyle(Option_t* opt) const ; 
00069   inline virtual void Print(Option_t *options= 0) const {
00070     printStream(defaultPrintStream(),defaultPrintContents(options),defaultPrintStyle(options));
00071   }
00072 
00073   static void cleanup() ;
00074 
00075 protected:
00076 
00077   static RooNumIntConfig* _default ;
00078   
00079   Double_t _epsAbs          ; // Absolute precision
00080   Double_t _epsRel          ; // Relative precision
00081   Bool_t   _printEvalCounter ; // Flag to control printing of function evaluation counter
00082 
00083   RooCategory _method1D     ; // Selects integration method for 1D integrals
00084   RooCategory _method2D     ; // Selects integration method for 2D integrals
00085   RooCategory _methodND     ; // Selects integration method for ND integrals
00086   RooCategory _method1DOpen ; // Selects integration method for open ended 1D integrals
00087   RooCategory _method2DOpen ; // Selects integration method for open ended 2D integrals
00088   RooCategory _methodNDOpen ; // Selects integration method for open ended ND integrals
00089   RooLinkedList _configSets ; // List of configuration sets for individual integration methods
00090 
00091   ClassDef(RooNumIntConfig,1) // Numeric Integrator configuration 
00092 };
00093 
00094 #endif
00095 
00096 

Generated on Tue Jul 5 14:26:15 2011 for ROOT_528-00b_version by  doxygen 1.5.1