openModeller  Version 1.5.0
PreChiSquareFactory.cpp
Go to the documentation of this file.
1 
27 #include "PreChiSquareFactory.hh"
28 #include "PreChiSquare.hh"
29 
31 : PreAlgorithmFactory( std::string( "PreChiSquare" ) )
32 {
33 };
34 
36 {
37 };
38 
39 
41 {
42  PreAlgorithm* instance_ptr = new PreChiSquare();
43 
44  if(!instance_ptr->reset( arg ))
45  {
46  std::string msg = "PreChiSquareFactory::build: Invalid parameters.\n";
47  Log::instance()->error( msg.c_str() );
48  throw InvalidParameterException( msg );
49  }
50  return instance_ptr;
51 }
52 
static Log * instance()
Returns the instance pointer, creating the object on the first call.
Definition: Log.cpp:45
bool reset(const PreParameters &params)
void error(const char *format,...)
'Error' level.
Definition: Log.cpp:290
PreAlgorithm * build(const PreParameters &arg)