ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RooNumIntFactory.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooNumIntFactory.h,v 1.6 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_FACTORY
17 #define ROO_NUM_INT_FACTORY
18 
19 #include <map>
20 #include <string>
21 #include "TObject.h"
22 #include "RooLinkedList.h"
23 #include "RooAbsIntegrator.h"
24 class RooNumIntConfig ;
25 class RooAbsFunc ;
26 
27 class RooNumIntFactory ;
29 
30 class RooNumIntFactory : public TObject {
31 public:
32 
33  static RooNumIntFactory& instance() ;
34  virtual ~RooNumIntFactory();
35 
36  Bool_t storeProtoIntegrator(RooAbsIntegrator* proto, const RooArgSet& defConfig, const char* depName="") ;
37  const RooAbsIntegrator* getProtoIntegrator(const char* name) ;
38  const char* getDepIntegratorName(const char* name) ;
39 
41 
42  static void cleanup() ;
43 
44 
45 protected:
46 
47  friend class RooNumIntConfig ;
48 
49  std::map<std::string,std::pair<RooAbsIntegrator*,std::string> > _map ;
50 
52  RooNumIntFactory(const RooNumIntFactory& other) ;
53 
55 
56 
57  ClassDef(RooNumIntFactory,1) // Numeric Integrator factory
58 };
59 
60 #endif
61 
62 
static RooNumIntFactory * _instance
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
static RooNumIntFactory & instance()
Static method returning reference to singleton instance of factory.
std::map< std::string, std::pair< RooAbsIntegrator *, std::string > > _map
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
const RooAbsIntegrator * getProtoIntegrator(const char *name)
Return prototype integrator with given (class) name.
RooAbsIntegrator * createIntegrator(RooAbsFunc &func, const RooNumIntConfig &config, Int_t ndim=0, Bool_t isBinned=kFALSE)
Construct a numeric integrator instance that operates on function 'func' and is configured with 'conf...
#define ClassDef(name, id)
Definition: Rtypes.h:254
RooNumIntFactory()
Constructor.
virtual ~RooNumIntFactory()
Destructor.
static void cleanup()
Cleanup routine called by atexit() handler installed by RooSentinel.
const char * getDepIntegratorName(const char *name)
Get list of class names of integrators needed by integrator named 'name'.
double func(double *x, double *p)
Definition: stressTF1.cxx:213
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
typedef void((*Func_t)())
void(* RooNumIntInitializerFunc)(RooNumIntFactory &)
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:23
Bool_t storeProtoIntegrator(RooAbsIntegrator *proto, const RooArgSet &defConfig, const char *depName="")
Method accepting registration of a prototype numeric integrator along with a RooArgSet of its default...