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

SctAnalysis::AnalysisWorkerGroup Class Reference

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

#include <AnalysisWorkerGroup.h>

Inheritance diagram for SctAnalysis::AnalysisWorkerGroup:

Inheritance graph
[legend]
Collaboration diagram for SctAnalysis::AnalysisWorkerGroup:

Collaboration graph
[legend]

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.

std::ostream & printStatus (std::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 (shared_ptr< Sct::IOName > name) 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 27 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 101 of file AnalysisWorkerGroup.cpp.

References m_tests, and m_tests_access.

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 125 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 129 of file AnalysisWorkerGroup.cpp.

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

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

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

Definition at line 83 of file AnalysisWorkerGroup.cpp.

References m_tests, and m_tests_access.

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 149 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 106 of file AnalysisWorkerGroup.cpp.

References m_tests, and m_tests_access.

virtual void SctAnalysis::AnalysisWorkerGroup::work shared_ptr< Sct::IOName >  name  )  throw () [virtual]
 

Todo:
put description of work() here.


Field Documentation

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

List of the tests, and associated analysis algorithms.

Definition at line 118 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 119 of file AnalysisWorkerGroup.h.

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


The documentation for this class was generated from the following files:
Generated on Thu Jul 8 11:41:44 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5