SctFitter::FitStrategyFactory Class Reference

Factory allows dynamic choice of FitStrategies which can be asked for by name. More...

#include <FitStrategy.h>

Collaboration diagram for SctFitter::FitStrategyFactory:

Collaboration graph
[legend]

Public Member Functions

FitStrategygetStrategy (string name) throw (LogicError)
 Get a FitStrategy by name.
bool addToMap (const string &className, FitStrategy &s) throw ()
 Concrete strategies should add themselves to the map, using the same name as they give in getName();.
std::list< std::string > listStrategies () const
 make a list of all strategies

Static Public Member Functions

static FitStrategyFactoryinstance () throw ()

Private Member Functions

 ~FitStrategyFactory () throw ()
 singleton

Private Attributes

std::map< string, FitStrategy * > strategyMap
 a map of the sub-classes and their names

Static Private Attributes

static FitStrategyFactorybertha
 pointer to the singleton.

Detailed Description

Factory allows dynamic choice of FitStrategies which can be asked for by name.

Definition at line 75 of file FitStrategy.h.


Constructor & Destructor Documentation

SctFitter::FitStrategyFactory::~FitStrategyFactory  )  throw () [inline, private]
 

singleton

Definition at line 94 of file FitStrategy.h.


Member Function Documentation

bool SctFitter::FitStrategyFactory::addToMap const string &  className,
FitStrategy s
throw ()
 

Concrete strategies should add themselves to the map, using the same name as they give in getName();.

Definition at line 39 of file FitStrategy.cpp.

FitStrategy * SctFitter::FitStrategyFactory::getStrategy string  name  )  throw (LogicError)
 

Get a FitStrategy by name.

Definition at line 30 of file FitStrategy.cpp.

Referenced by SctFitter::Fitter::internal_setFitStrategy().

FitStrategyFactory & SctFitter::FitStrategyFactory::instance  )  throw () [static]
 

Returns:
a reference to the singleton

Definition at line 25 of file FitStrategy.cpp.

References bertha.

Referenced by SctFitter::Fitter::internal_setFitStrategy(), SctFitter::Fitter::listFitStrategies(), and SctAnalysis::AnalysisService::setFitStrategy().

std::list< std::string > SctFitter::FitStrategyFactory::listStrategies  )  const
 

make a list of all strategies

Definition at line 47 of file FitStrategy.cpp.

References strategyMap.

Referenced by SctFitter::Fitter::listFitStrategies().


Field Documentation

FitStrategyFactory * SctFitter::FitStrategyFactory::bertha [static, private]
 

pointer to the singleton.

Definition at line 95 of file FitStrategy.h.

Referenced by instance().

std::map<string, FitStrategy*> SctFitter::FitStrategyFactory::strategyMap [private]
 

a map of the sub-classes and their names

Definition at line 93 of file FitStrategy.h.

Referenced by listStrategies().


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:09:51 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6