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

SctAnalysis::AnalysisWorkerGroup Class Reference

Control structure for a group of AnalysisWorker thread objects. More...

#include <AnalysisWorkerGroup.h>

Inheritance diagram for SctAnalysis::AnalysisWorkerGroup:

SctService::WorkerGroup< T > noncopyable

Public Member Functions

void addTest (shared_ptr< const TestData > testdata)
 Add a new TestData to the list of tests.

void removeTestsUpTo (shared_ptr< const TestData > testdata)
 Remove a TestData object, and all older TestData's.

shared_ptr< TestAlgsfindTest (const unsigned long runno, const unsigned long scanno) const throw ()
 Look for a TestAlgs which matches a given run number and scan number.

shared_ptr< TestAlgsfindTest (const TestData &testdata) const throw ()
 Look for a TestAlgs which matches a given run number and scan number.

ostream & printStatus (ostream &os) const throw ()
 Prints the internal contents of its known tests to an output stream, and returns it.

void purge () throw ()
 Call this to free all memory, delete references to Tests in progress, and clear the queue.

virtual void work (const std::string) throw ()

Private Attributes

list< shared_ptr< TestAlgs > > m_tests
 List of the tests, and associated analysis algorithms.

boost::recursive_mutex m_tests_access
 access to the list of algorithms


Detailed Description

Control structure for a group of AnalysisWorker thread objects.

Does the book-keeping of where to funnel incoming ScanResult objects.

Definition at line 22 of file AnalysisWorkerGroup.h.


Member Function Documentation

void SctAnalysis::AnalysisWorkerGroup::addTest shared_ptr< const TestData   testdata
 

Add a new TestData to the list of tests.

Parameters:
testdata the test to add.
Note:
one must lock the internals whilst doing the adding

Definition at line 98 of file AnalysisWorkerGroup.cpp.

References m_tests.

Referenced by SctAnalysis::AnalysisService::testDataCallback().

shared_ptr< AnalysisWorkerGroup::TestAlgs > SctAnalysis::AnalysisWorkerGroup::findTest const TestData   testdata const throw ()
 

Look for a TestAlgs which matches a given run number and scan number.

Parameters:
testdata the TestData we want to find.
Returns:
TestAlgs for this test if these exist.
Note:
one must lock the internals whilst doing the finding.

Definition at line 122 of file AnalysisWorkerGroup.cpp.

shared_ptr< AnalysisWorkerGroup::TestAlgs > SctAnalysis::AnalysisWorkerGroup::findTest const unsigned long    runno,
const unsigned long    scanno
const throw ()
 

Look for a TestAlgs which matches a given run number and scan number.

Parameters:
runno the run number
scanno the scan number
Returns:
TestAlgs for this test if these exist.
Note:
one must lock the internals whilst doing the finding.

Definition at line 126 of file AnalysisWorkerGroup.cpp.

References TestData::nScans, TestData::runNumber, and TestData::startScanNumber.

Referenced by SctAnalysis::AnalysisService::testDataCallback().

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

Prints the internal contents of its known tests to an output stream, and returns it.

Definition at line 80 of file AnalysisWorkerGroup.cpp.

References m_tests.

void SctAnalysis::AnalysisWorkerGroup::purge   throw ()
 

Call this to free all memory, delete references to Tests in progress, and clear the queue.

Note:
Don't do this while analysis is in progress!

Definition at line 146 of file AnalysisWorkerGroup.cpp.

void SctAnalysis::AnalysisWorkerGroup::removeTestsUpTo shared_ptr< const TestData   testdata
 

Remove a TestData object, and all older TestData's.

Parameters:
testdata the TestData to remove.

Definition at line 103 of file AnalysisWorkerGroup.cpp.

References m_tests.

Referenced by SctAnalysis::AnalysisService::testDataCallback().

void SctAnalysis::AnalysisWorkerGroup::work const std::string    throw () [virtual]
 

Todo:
put description of work() here.

Definition at line 163 of file AnalysisWorkerGroup.cpp.

References Sct::IS::IONameIS::getClassName(), Sct::IS::IONameIS::getModuleName(), Sct::IS::IONameIS::getRunNumber(), and Sct::IS::IONameIS::getScanNumber().


Field Documentation

list<shared_ptr<TestAlgs> > SctAnalysis::AnalysisWorkerGroup::m_tests [private]
 

List of the tests, and associated analysis algorithms.

Definition at line 113 of file AnalysisWorkerGroup.h.

Referenced by addTest(), printStatus(), and removeTestsUpTo().

boost::recursive_mutex SctAnalysis::AnalysisWorkerGroup::m_tests_access [mutable, private]
 

access to the list of algorithms

Definition at line 114 of file AnalysisWorkerGroup.h.


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