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

 AnalysisWorkerGroup ()
 constructor
 ~AnalysisWorkerGroup ()
 destructor
bool debug ()
 debug checking method.
void addTest (shared_ptr< const TestData > testdata)
 Add a new TestData to the list of tests.
void replaceTest (shared_ptr< const TestData > testdata)
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
bool m_debug

Data Structures

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

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.


Constructor & Destructor Documentation

SctAnalysis::AnalysisWorkerGroup::AnalysisWorkerGroup  ) 
 

constructor

Definition at line 147 of file AnalysisWorkerGroup.cpp.

SctAnalysis::AnalysisWorkerGroup::~AnalysisWorkerGroup  ) 
 

destructor

Definition at line 150 of file AnalysisWorkerGroup.cpp.


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

References findTest(), m_tests, m_tests_access, and replaceTest().

Referenced by replaceTest(), and SctAnalysis::AnalysisService::testDataCallback().

Here is the call graph for this function:

bool SctAnalysis::AnalysisWorkerGroup::debug  ) 
 

debug checking method.

Definition at line 153 of file AnalysisWorkerGroup.cpp.

References m_debug.

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 220 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 237 of file AnalysisWorkerGroup.cpp.

Referenced by addTest(), and replaceTest().

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

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

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

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

References m_tests, m_tests_access, SctService::WorkerGroup< shared_ptr< Sct::IOName > >::nWorkers(), SctService::WorkerGroup< shared_ptr< Sct::IOName > >::paused(), SctService::WorkerGroup< shared_ptr< Sct::IOName > >::pop(), and SctService::WorkerGroup< shared_ptr< Sct::IOName > >::setPaused().

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

Here is the call graph for this function:

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

References m_tests, and m_tests_access.

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

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 144 of file AnalysisWorkerGroup.h.

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

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

access to the list of algorithms

Definition at line 145 of file AnalysisWorkerGroup.h.

Referenced by addTest(), purge(), removeTestsUpTo(), and replaceTest().


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