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

SctFitter::FitAlgorithmMap Class Reference

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

#include <FitAlgorithmMap.h>

Inheritance diagram for SctFitter::FitAlgorithmMap:

noncopyable

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

FitAlgorithmMap & instance ()
 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.


Constructor & Destructor Documentation

SctFitter::FitAlgorithmMap::FitAlgorithmMap   [inline, private]
 

Definition at line 55 of file FitAlgorithmMap.h.

Referenced by instance().


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::AbstractThrowable::setSeverity().

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

Get the instance of the Map.

Definition at line 10 of file FitAlgorithmMap.cpp.

References FitAlgorithmMap().

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.


Field Documentation

map<string, shared_ptr<FitAlgorithm> > SctFitter::FitAlgorithmMap::algMap [private]
 

Definition at line 56 of file FitAlgorithmMap.h.


The documentation for this class was generated from the following files:
Generated on Mon Dec 15 19:38:03 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3