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

SctAnalysis::AnalysisAlgorithm Class Reference

An abstract base class for all the analysis algorithms. More...

#include <AnalysisAlgorithm.h>

Inheritance diagram for SctAnalysis::AnalysisAlgorithm:

SctAnalysis::FullBypassAlgorithm SctAnalysis::NMaskAlgorithm SctAnalysis::NoiseOccupancyAlgorithm SctAnalysis::NPtGainAlgorithm SctAnalysis::PipelineAlgorithm SctAnalysis::StrobeDelayAlgorithm SctAnalysis::TimeWalkAlgorithm SctAnalysis::TrimRangeAlgorithm

Public Member Functions

 AnalysisAlgorithm (const TestData &testData, const string &moduleName) throw ()
 Default constructor, to be used in creation of map.

virtual ~AnalysisAlgorithm () throw ()
 Destructor.

const TestDatagetTestData () const throw ()
 get a pointer to the cached TestData;

const std::string getModuleName () const throw ()
 Get the name of the module which this algorithm is working on.

virtual boost::shared_ptr<
AnalysisAlgorithm > 
clone (const TestData &testData, const string &moduleName) const=0 throw ()
 Must be overridden by sub-classes.

virtual void canAddFitScanResult (const std::string &name) throw (Sct::LogicError, Sct::IoError)
 Notify algorithm that it may add a named FitScanResult to this TestResult.

virtual void canAddRawScanResult (const std::string &name) throw (Sct::LogicError, Sct::IoError)
 Notify algorithm that it may add a named RawScanResult to this TestResult.

bool isDone () const throw ()
 Method indicates when a particular analysis is finished.

boost::shared_ptr< SctData::TestResultgetTestResult () const
 Access to the TestResult if required.

boost::recursive_mutex & getMutex () const
 Access the mutex.


Protected Member Functions

void setTestResult (boost::shared_ptr< SctData::TestResult > testresult)
 Allows concrete classes to set the TestResult member after they create one of the appropriate type.

void checkTestResultExists () const throw (Sct::LogicError)
 Used by other methods to ensure that a TestResult has been made.

void addFit (const std::string &name) throw (Sct::LogicError, Sct::IoError)
 Convenience method can called by derived class when notification is given that a new FitScanResult is available.

void addRaw (const std::string &name) throw (Sct::LogicError, Sct::IoError)
 Convenience method can called by derived class when notification is given that a new RawScanResult is available.

void initializeTestResult () throw (Sct::LogicError)
 Useful function that initializes TestResult from Test and module name.

void finish () throw (Sct::IoError, Sct::LogicError)
 Method callable by published the TestResult, and sets `done'.

 AnalysisAlgorithm ()

Private Attributes

const std::string m_modulename
 name of the module being worked on.

boost::shared_ptr< SctData::TestResultm_result
 pointer to the result.
Note:
it is up to the Concrete class to make one!


const TestDatam_test
 pointer to the testdata.

bool m_done
 true if finish() has been called.

boost::recursive_mutex m_access
 access to the algorithm can be locked for thread-safeness.


Detailed Description

An abstract base class for all the analysis algorithms.

Author:
Matthew Palmer
Date:
11 June 2003

Definition at line 24 of file AnalysisAlgorithm.h.


Constructor & Destructor Documentation

SctAnalysis::AnalysisAlgorithm::AnalysisAlgorithm const TestData   testData,
const string &    moduleName
throw () [inline]
 

Default constructor, to be used in creation of map.

Definition at line 29 of file AnalysisAlgorithm.h.

SctAnalysis::AnalysisAlgorithm::~AnalysisAlgorithm   throw () [virtual]
 

Destructor.

Definition at line 22 of file AnalysisAlgorithm.cpp.

SctAnalysis::AnalysisAlgorithm::AnalysisAlgorithm   [protected]
 

Definition at line 20 of file AnalysisAlgorithm.cpp.


Member Function Documentation

void SctAnalysis::AnalysisAlgorithm::addFit const std::string &    name throw (Sct::LogicError, Sct::IoError) [protected]
 

Convenience method can called by derived class when notification is given that a new FitScanResult is available.

Definition at line 48 of file AnalysisAlgorithm.cpp.

References Sct::IS::IOManagerIS::instance().

void SctAnalysis::AnalysisAlgorithm::addRaw const std::string &    name throw (Sct::LogicError, Sct::IoError) [protected]
 

Convenience method can called by derived class when notification is given that a new RawScanResult is available.

Definition at line 59 of file AnalysisAlgorithm.cpp.

References Sct::IS::IOManagerIS::instance().

virtual void SctAnalysis::AnalysisAlgorithm::canAddFitScanResult const std::string &    name throw (Sct::LogicError, Sct::IoError) [inline, virtual]
 

Notify algorithm that it may add a named FitScanResult to this TestResult.

Default is to do nothing, but concrete classes should react as they see fit!

Parameters:
name the IS name of the FitScanResult.
t the test result to add it to.

Definition at line 56 of file AnalysisAlgorithm.h.

virtual void SctAnalysis::AnalysisAlgorithm::canAddRawScanResult const std::string &    name throw (Sct::LogicError, Sct::IoError) [inline, virtual]
 

Notify algorithm that it may add a named RawScanResult to this TestResult.

Default is to do nothing, but concrete classes can react as they see fit!

Parameters:
name the IS name of the RawScanResult.
t the test result to add it to.

Definition at line 63 of file AnalysisAlgorithm.h.

void SctAnalysis::AnalysisAlgorithm::checkTestResultExists   const throw (Sct::LogicError) [protected]
 

Used by other methods to ensure that a TestResult has been made.

Exceptions:
LogicError if TestResult member is not initialised.

Definition at line 28 of file AnalysisAlgorithm.cpp.

virtual boost::shared_ptr<AnalysisAlgorithm> SctAnalysis::AnalysisAlgorithm::clone const TestData   testData,
const string &    moduleName
const throw () [pure virtual]
 

Must be overridden by sub-classes.

Returns a shared pointer to a concrete AnalysisAlgorithm of the correct type. Primarily used by the map to get an AnalysisAlgorithm of the correct type.

Implemented in SctAnalysis::FullBypassAlgorithm, SctAnalysis::NMaskAlgorithm, SctAnalysis::NoiseOccupancyAlgorithm, SctAnalysis::NPtGainAlgorithm, SctAnalysis::PipelineAlgorithm, SctAnalysis::StrobeDelayAlgorithm, SctAnalysis::TimeWalkAlgorithm, and SctAnalysis::TrimRangeAlgorithm.

void SctAnalysis::AnalysisAlgorithm::finish   throw (Sct::IoError, Sct::LogicError) [protected]
 

Method callable by published the TestResult, and sets `done'.

Definition at line 70 of file AnalysisAlgorithm.cpp.

References TestSummaryIS::dataString, SctData::TestSummary::SummaryManager::instance(), and Sct::IS::IOManagerIS::instance().

const std::string SctAnalysis::AnalysisAlgorithm::getModuleName   const throw () [inline]
 

Get the name of the module which this algorithm is working on.

Definition at line 43 of file AnalysisAlgorithm.h.

References m_modulename.

boost::recursive_mutex& SctAnalysis::AnalysisAlgorithm::getMutex   const [inline]
 

Access the mutex.

Definition at line 76 of file AnalysisAlgorithm.h.

References m_access.

const TestData& SctAnalysis::AnalysisAlgorithm::getTestData   const throw () [inline]
 

get a pointer to the cached TestData;

Definition at line 38 of file AnalysisAlgorithm.h.

References m_test.

boost::shared_ptr<SctData::TestResult> SctAnalysis::AnalysisAlgorithm::getTestResult   const [inline]
 

Access to the TestResult if required.

Definition at line 71 of file AnalysisAlgorithm.h.

References m_result.

void SctAnalysis::AnalysisAlgorithm::initializeTestResult   throw (Sct::LogicError) [protected]
 

Useful function that initializes TestResult from Test and module name.

Note:
TestResult must have been created first!

Definition at line 34 of file AnalysisAlgorithm.cpp.

bool SctAnalysis::AnalysisAlgorithm::isDone   const throw () [inline]
 

Method indicates when a particular analysis is finished.

Definition at line 67 of file AnalysisAlgorithm.h.

References m_done.

void SctAnalysis::AnalysisAlgorithm::setTestResult boost::shared_ptr< SctData::TestResult   testresult [inline, protected]
 

Allows concrete classes to set the TestResult member after they create one of the appropriate type.

Definition at line 82 of file AnalysisAlgorithm.h.

References m_result.


Field Documentation

boost::recursive_mutex SctAnalysis::AnalysisAlgorithm::m_access [mutable, private]
 

access to the algorithm can be locked for thread-safeness.

Definition at line 115 of file AnalysisAlgorithm.h.

Referenced by getMutex().

bool SctAnalysis::AnalysisAlgorithm::m_done [private]
 

true if finish() has been called.

Definition at line 114 of file AnalysisAlgorithm.h.

Referenced by isDone().

const std::string SctAnalysis::AnalysisAlgorithm::m_modulename [private]
 

name of the module being worked on.

Definition at line 111 of file AnalysisAlgorithm.h.

Referenced by getModuleName().

boost::shared_ptr<SctData::TestResult> SctAnalysis::AnalysisAlgorithm::m_result [private]
 

pointer to the result.

Note:
it is up to the Concrete class to make one!

Definition at line 112 of file AnalysisAlgorithm.h.

Referenced by getTestResult(), and setTestResult().

const TestData& SctAnalysis::AnalysisAlgorithm::m_test [private]
 

pointer to the testdata.

Definition at line 113 of file AnalysisAlgorithm.h.

Referenced by getTestData().


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