Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RooIntegratorBinding.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooIntegratorBinding.h,v 1.4 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_INTEGRATOR_BINDING
17 #define ROO_INTEGRATOR_BINDING
18 
19 #include "RooAbsFunc.h"
20 #include "RooAbsIntegrator.h"
21 
22 class RooIntegratorBinding : public RooAbsFunc {
23 public:
24  RooIntegratorBinding(RooAbsIntegrator& integrator) :
25  RooAbsFunc(integrator.integrand()->getDimension()-1), _integrator(&integrator) {} ;
26  virtual ~RooIntegratorBinding() {} ;
27 
28  inline virtual Double_t operator()(const Double_t xvector[]) const { _ncall++ ; return _integrator->integral(xvector) ; }
29  inline virtual Double_t getMinLimit(UInt_t index) const { return _integrator->integrand()->getMinLimit(index+1); }
30  inline virtual Double_t getMaxLimit(UInt_t index) const { return _integrator->integrand()->getMaxLimit(index+1); }
31 
32 protected:
33  RooAbsIntegrator* _integrator ; // Numeric integrator
34 
35 
36  ClassDef(RooIntegratorBinding,0) // Function binding representing output of numeric integrator
37 };
38 
39 #endif
40