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

SctAnalysis::AnalysisAlgorithmMap Class Reference

AnalysisAlgorithmMap maps Tests to AnalysisAlgorithms. More...

#include <AnalysisAlgorithmMap.h>

Inheritance diagram for SctAnalysis::AnalysisAlgorithmMap:

noncopyable

Public Member Functions

shared_ptr< AnalysisAlgorithmgetAlgorithm (const TestData &testData, const string &moduleName) const throw (Sct::InvalidArgument)
bool setAlgorithm (const string testName, auto_ptr< AnalysisAlgorithm > alg) throw ()
 Sets the algorithm for a given Test name.


Static Public Member Functions

AnalysisAlgorithmMap & instance ()
 Get the singleton instance.


Private Member Functions

 AnalysisAlgorithmMap ()

Private Attributes

map< string, shared_ptr< AnalysisAlgorithm > > algMap
 The map.


Detailed Description

AnalysisAlgorithmMap maps Tests to AnalysisAlgorithms.

It is currently done using the Test name.

Author:
Matthew Palmer
Date:
11 June 2003

Definition at line 27 of file AnalysisAlgorithmMap.h.


Constructor & Destructor Documentation

SctAnalysis::AnalysisAlgorithmMap::AnalysisAlgorithmMap   [inline, private]
 

Definition at line 52 of file AnalysisAlgorithmMap.h.

Referenced by instance().


Member Function Documentation

shared_ptr< AnalysisAlgorithm > SctAnalysis::AnalysisAlgorithmMap::getAlgorithm const TestData   testData,
const string &    moduleName
const throw (Sct::InvalidArgument)
 

Parameters:
test The name of the test to analyze
Returns:
An AnalysisAlgorithm of the type registered for test
Exceptions:
InvalidArgument if test is not in the map

Definition at line 12 of file AnalysisAlgorithmMap.cpp.

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

AnalysisAlgorithmMap & SctAnalysis::AnalysisAlgorithmMap::instance   [static]
 

Get the singleton instance.

Definition at line 7 of file AnalysisAlgorithmMap.cpp.

References AnalysisAlgorithmMap(), and instance().

Referenced by instance().

bool SctAnalysis::AnalysisAlgorithmMap::setAlgorithm const string    testName,
auto_ptr< AnalysisAlgorithm   alg
throw ()
 

Sets the algorithm for a given Test name.

May only be called prior to multi-threading! I.e. at static initialization time.

Parameters:
testName the name of the Test
alg the AnalysisAlgorithm that can analyze them
Returns:
true if successful

Definition at line 21 of file AnalysisAlgorithmMap.cpp.

References testName.


Field Documentation

map<string, shared_ptr<AnalysisAlgorithm> > SctAnalysis::AnalysisAlgorithmMap::algMap [private]
 

The map.

Definition at line 54 of file AnalysisAlgorithmMap.h.


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