SctAnalysis::AnalysisWorkerGroup::TestAlgs Class Reference

keeps a test and its results together. More...

#include <AnalysisWorkerGroup.h>

Collaboration diagram for SctAnalysis::AnalysisWorkerGroup::TestAlgs:

Collaboration graph
[legend]

Public Member Functions

 TestAlgs (shared_ptr< const TestData > testdata)
 constructor takes a Test object.
shared_ptr< const TestDatagetTest () const
 Get the TestData object.
void replaceTest (shared_ptr< const TestData > test)
 replace the TestData if it has been updated
shared_ptr< AnalysisAlgorithmfindAlgorithm (const string &modulename)
 Get the AnalysisAlgorithm for a particular module name.
shared_ptr< AnalysisAlgorithmaddAlgorithm (const string &modulename)
 Add a test result for a new module name.
void removeAlgorithm (shared_ptr< AnalysisAlgorithm > alg)
 Removes an algorithm from the map.
 ~TestAlgs ()
 Destructor gets the lock before destroying the internals.
std::ostream & printStatus (std::ostream &os) const throw ()
 Print the contents of this testalgs.
boost::recursive_mutex & getMutex () const
 Get the mutex which is used for locking the TestData.

Private Attributes

shared_ptr< const TestDatam_testdata
 the TestData itself.
list< shared_ptr< AnalysisAlgorithm > > m_algorithms
 the AnalysisAlgorithms for each of the modules in the test.
boost::recursive_mutex m_access
 lock results

Detailed Description

keeps a test and its results together.

Associates these with a lockable mutex.

Definition at line 92 of file AnalysisWorkerGroup.h.


Constructor & Destructor Documentation

SctAnalysis::AnalysisWorkerGroup::TestAlgs::TestAlgs shared_ptr< const TestData testdata  ) 
 

constructor takes a Test object.

Also works out what sort of test it is and

SctAnalysis::AnalysisWorkerGroup::TestAlgs::~TestAlgs  ) 
 

Destructor gets the lock before destroying the internals.

Definition at line 69 of file AnalysisWorkerGroup.cpp.

References m_access, and m_algorithms.


Member Function Documentation

shared_ptr< AnalysisAlgorithm > SctAnalysis::AnalysisWorkerGroup::TestAlgs::addAlgorithm const string &  modulename  ) 
 

Add a test result for a new module name.

Parameters:
modulename the module name for which to add.
Returns:
a shared pointer to the created AnalysisAlgorithm for this module.
Note:
one must lock the internals whilst doing the adding.

Definition at line 139 of file AnalysisWorkerGroup.cpp.

References SctAnalysis::AnalysisAlgorithmMap::getAlgorithm(), getTest(), SctAnalysis::AnalysisAlgorithmMap::instance(), m_access, and m_algorithms.

Here is the call graph for this function:

shared_ptr< AnalysisAlgorithm > SctAnalysis::AnalysisWorkerGroup::TestAlgs::findAlgorithm const string &  modulename  ) 
 

Get the AnalysisAlgorithm for a particular module name.

Note:
makes a new Algorithm of the appropriate type if one is not found.
Returns:
the appropriate AnalysisAlgorithm,
Note:
one must lock the internals while searching.

Definition at line 122 of file AnalysisWorkerGroup.cpp.

References m_access, and m_algorithms.

boost::recursive_mutex & SctAnalysis::AnalysisWorkerGroup::TestAlgs::getMutex  )  const
 

Get the mutex which is used for locking the TestData.

Definition at line 105 of file AnalysisWorkerGroup.cpp.

References m_access.

shared_ptr< const TestData > SctAnalysis::AnalysisWorkerGroup::TestAlgs::getTest  )  const
 

Get the TestData object.

Returns:
guarentees to return a non-null pointer to a TestData object
Exceptions:
Sct::LogicError if the pointer was null

Definition at line 87 of file AnalysisWorkerGroup.cpp.

References m_testdata.

Referenced by addAlgorithm().

std::ostream& SctAnalysis::AnalysisWorkerGroup::TestAlgs::printStatus std::ostream &  os  )  const throw ()
 

Print the contents of this testalgs.

void SctAnalysis::AnalysisWorkerGroup::TestAlgs::removeAlgorithm shared_ptr< AnalysisAlgorithm alg  ) 
 

Removes an algorithm from the map.

Parameters:
alg A shared pointer to the algorithm to remove.

Definition at line 78 of file AnalysisWorkerGroup.cpp.

References m_access, and m_algorithms.

void SctAnalysis::AnalysisWorkerGroup::TestAlgs::replaceTest shared_ptr< const TestData test  ) 
 

replace the TestData if it has been updated

Definition at line 92 of file AnalysisWorkerGroup.cpp.

References m_access, m_algorithms, and m_testdata.


Field Documentation

boost::recursive_mutex SctAnalysis::AnalysisWorkerGroup::TestAlgs::m_access [mutable, private]
 

lock results

Definition at line 140 of file AnalysisWorkerGroup.h.

Referenced by addAlgorithm(), findAlgorithm(), getMutex(), removeAlgorithm(), replaceTest(), and ~TestAlgs().

list< shared_ptr<AnalysisAlgorithm> > SctAnalysis::AnalysisWorkerGroup::TestAlgs::m_algorithms [private]
 

the AnalysisAlgorithms for each of the modules in the test.

Definition at line 139 of file AnalysisWorkerGroup.h.

Referenced by addAlgorithm(), findAlgorithm(), removeAlgorithm(), replaceTest(), and ~TestAlgs().

shared_ptr<const TestData> SctAnalysis::AnalysisWorkerGroup::TestAlgs::m_testdata [private]
 

the TestData itself.

Definition at line 138 of file AnalysisWorkerGroup.h.

Referenced by getTest(), and replaceTest().


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