Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

SctFitter::FitAlgorithmMap Class Reference

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

#include <FitAlgorithmMap.h>


Public Member Functions

const FitAlgorithmgetAlgorithm (const ConfigurationVariable &variable) const throw (Sct::InvalidArgument)
 Get the algorithm associated with the given variable
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.


Static Public Member Functions

FitAlgorithmMapinstance ()
 Get the instance of the Map.


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 const ConfigurationVariable &  variable  )  const throw (Sct::InvalidArgument)
 

Get the algorithm associated with the given variable

Exceptions:
InvalidArgument if there is no FitAlgorithm for variable.

Definition at line 15 of file FitAlgorithmMap.cpp.

References Sct::InvalidArgument, and Sct::AbstractThrowable::setSeverity().

Here is the call graph for this function:

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

Get the instance of the Map.

Definition at line 10 of file FitAlgorithmMap.cpp.

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 24 of file FitAlgorithmMap.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Jul 15 09:53:55 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5