SctFitter::FitAlgorithmMap Class Reference

FitAlgorithmMap is a mapping between ConfigurationVariables and FitAlgorithms. More...

#include <FitAlgorithmMap.h>


Public Member Functions

const FitAlgorithmgetAlgorithm (string variableName) const throw (Sct::InvalidArgument)
 Get the algorithm associated with the given variable name
Exceptions:
InvalidArgument if there is no FitAlgorithm for variable.

bool setAlgorithm (string variableName, auto_ptr< FitAlgorithm >) throw ()
 Sets the algorithm for ConfigurationVariables with variableName to the given FitAlgorithm.
std::list< string > listAlgorithms () const
 list the available algorithms

Static Public Member Functions

static FitAlgorithmMapinstance ()
 Get the instance of the Map.

Private Member Functions

 FitAlgorithmMap ()

Private Attributes

map< string, shared_ptr< FitAlgorithm > > algMap


Detailed Description

FitAlgorithmMap is a mapping between ConfigurationVariables and FitAlgorithms.

The Fitter uses the map to determine which FitAlgorithm to ask to create the FitScanResult object. The Map is of course a singleton.

Todo:
Add an iterator for this class

Make this thread-safe

Author:
Matthew Palmer
Date:
8 June 2003

Definition at line 33 of file FitAlgorithmMap.h.


Member Function Documentation

const FitAlgorithm& SctFitter::FitAlgorithmMap::getAlgorithm string  variableName  )  const throw (Sct::InvalidArgument)
 

Get the algorithm associated with the given variable name

Exceptions:
InvalidArgument if there is no FitAlgorithm for variable.

FitAlgorithmMap & SctFitter::FitAlgorithmMap::instance  )  [static]
 

Get the instance of the Map.

Definition at line 10 of file FitAlgorithmMap.cpp.

References FitAlgorithmMap().

Referenced by SctFitter::Fitter::listFitAlgorithms(), SctFitter::ThresholdFitAlgorithm2::putInMap(), and SctFitter::ThresholdFitAlgorithm::putInMap().

Here is the call graph for this function:

std::list< std::string > SctFitter::FitAlgorithmMap::listAlgorithms  )  const
 

list the available algorithms

Definition at line 34 of file FitAlgorithmMap.cpp.

References algMap.

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

bool SctFitter::FitAlgorithmMap::setAlgorithm string  variableName,
auto_ptr< FitAlgorithm
throw ()
 

Sets the algorithm for ConfigurationVariables with variableName to the given FitAlgorithm.

Note that auto_ptr is used to denote object transfer

Returns:
true if the mapping was successful
Todo:
Think: Should this return a ptr to the previous alg?

Definition at line 29 of file FitAlgorithmMap.cpp.

Referenced by SctFitter::ThresholdFitAlgorithm2::putInMap(), and SctFitter::ThresholdFitAlgorithm::putInMap().


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