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

AnalysisWorkerGroup.h

Go to the documentation of this file.
00001 #ifndef ANALYSISWORKERGROUP_H
00002 #define ANALYSISWORKERGROUP_H
00003 #include "SctService/WorkerGroup.h"
00004 #include "SctData/TestResult.h"
00005 #include "CalibrationController/IS/TestData.h"
00006 #include <string>
00007 #include <iostream>
00008 
00009 using namespace SctService;
00010 using boost::shared_ptr;
00011 
00012 namespace SctAnalysis{
00013     using SctData::TestResult;
00014 
00015     class AnalysisAlgorithm;
00016     
00017 
00022     class AnalysisWorkerGroup : public WorkerGroup<std::string>{
00023     public:
00024     class TestAlgs; 
00025     
00031     void addTest(shared_ptr<const TestData> testdata);
00036     void removeTestsUpTo(shared_ptr<const TestData> testdata);
00037 
00045     shared_ptr<TestAlgs> findTest(const unsigned long runno, const unsigned long scanno) const throw();
00052     shared_ptr<TestAlgs> findTest(const TestData& testdata)const throw() ;
00053 
00057     ostream& printStatus(ostream& os) const throw();
00058     
00064     void purge() throw();
00065     
00069     virtual void work(const std::string) throw();
00070     
00071 /*--------internal class-----------------------------------------------------------*/
00072 
00074     class TestAlgs {
00075     public:
00077         TestAlgs(shared_ptr<const TestData> testdata) : m_testdata(testdata) {} 
00079         const TestData& getTest() const {return *m_testdata;}
00085         shared_ptr<AnalysisAlgorithm> findAlgorithm(const string& modulename) ;
00092         shared_ptr<AnalysisAlgorithm> addAlgorithm(const string& modulename);
00097         void removeAlgorithm(shared_ptr<AnalysisAlgorithm> alg);
00101         ~TestAlgs();
00105         ostream& printStatus(ostream& os) const throw();
00106     private:
00107         shared_ptr<const TestData> m_testdata;               
00108         list< shared_ptr<AnalysisAlgorithm> > m_algorithms;  
00109         mutable boost::recursive_mutex m_access;                 
00110     };
00111     
00112     private:    
00113     list<shared_ptr<TestAlgs> > m_tests; 
00114     mutable boost::recursive_mutex m_tests_access; 
00115     };
00116     
00117 
00118     
00119 }// end of namespace SctAnalysis
00120 
00121 #endif // #define ANALYSISWORKERGROUP_H

Generated on Mon Dec 15 19:35:55 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3