laura is hosted by Hepforge, IPPP Durham
Laura++  v2r2
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauFitter.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2005 - 2014.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
15 #include <iostream>
16 
17 #include "LauFitter.hh"
18 #include "LauAbsFitter.hh"
19 #include "LauMinuit.hh"
20 
23 
25 {
26  if ( theInstance_ != 0 ) {
27  std::cerr << "ERROR in LauFitter::setFitterType : The fitter has already been created, cannot change the type now." << std::endl;
28  return;
29  }
30 
31  fitterType_ = type;
32 }
33 
35 {
36  // Returns a pointer to a singleton LauAbsFitter object.
37  // Creates the object the first time it is called.
38 
39  if ( theInstance_ == 0 ) {
40  if ( fitterType_ == Minuit ) {
41  theInstance_ = new LauMinuit();
42  }
43  }
44 
45  return theInstance_;
46 }
47 
static LauAbsFitter * theInstance_
Pointer to the singleton fitter instance.
Definition: LauFitter.hh:63
File containing declaration of LauAbsFitter class.
The interface to the Minuit fitter.
Definition: LauMinuit.hh:36
File containing LauFitter class.
The abstract interface to the fitter.
Definition: LauAbsFitter.hh:35
static LauAbsFitter * fitter()
Method that provides access to the singleton fitter.
Definition: LauFitter.cc:34
static Type fitterType_
The fitter type.
Definition: LauFitter.hh:66
Type
The types of fitter available.
Definition: LauFitter.hh:33
File containing declaration of LauMinuit class.
static void setFitterType(Type type)
Set the type of the fitter.
Definition: LauFitter.cc:24