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

AnalysisWorkerGroup.h

00001 #ifndef ANALYSISWORKERGROUP_H
00002 #define ANALYSISWORKERGROUP_H
00003 #include "SctService/WorkerGroup.h"
00004 #include <string>
00005 #include <list>
00006 #include <iostream>
00007 
00008 namespace Sct {
00009 class IOName;
00010 }
00011 class TestData;
00012 
00013 using namespace SctService;
00014 using std::string;
00015 using std::list;
00016 using boost::shared_ptr;
00017 
00018 namespace SctAnalysis{
00019 
00020     class AnalysisAlgorithm;
00021     
00022 
00027     class AnalysisWorkerGroup : public WorkerGroup< shared_ptr<Sct::IOName> >{
00028     public:
00029     class TestAlgs; 
00030     
00036     void addTest(shared_ptr<const TestData> testdata);
00041     void removeTestsUpTo(shared_ptr<const TestData> testdata);
00042 
00050     shared_ptr<TestAlgs> findTest(const unsigned long runno, const unsigned long scanno) const throw();
00057     shared_ptr<TestAlgs> findTest(const TestData& testdata)const throw() ;
00058 
00062     std::ostream& printStatus(std::ostream& os) const throw();
00063     
00069     void purge() throw();
00070     
00074     virtual void work(shared_ptr<Sct::IOName> name) throw();
00075     
00076 /*--------internal class-----------------------------------------------------------*/
00077 
00079     class TestAlgs {
00080     public:
00082         TestAlgs(shared_ptr<const TestData> testdata) : m_testdata(testdata) {} 
00084         const TestData& getTest() const {return *m_testdata;}
00090         shared_ptr<AnalysisAlgorithm> findAlgorithm(const string& modulename) ;
00097         shared_ptr<AnalysisAlgorithm> addAlgorithm(const string& modulename);
00102         void removeAlgorithm(shared_ptr<AnalysisAlgorithm> alg);
00106         ~TestAlgs();
00110         std::ostream& printStatus(std::ostream& os) const throw();
00111     private:
00112         shared_ptr<const TestData> m_testdata;               
00113         list< shared_ptr<AnalysisAlgorithm> > m_algorithms;  
00114         mutable boost::recursive_mutex m_access;                 
00115     };
00116     
00117     private:    
00118     list<shared_ptr<TestAlgs> > m_tests; 
00119     mutable boost::recursive_mutex m_tests_access; 
00120     };
00121     
00122 
00123     
00124 }// end of namespace SctAnalysis
00125 
00126 #endif // #define ANALYSISWORKERGROUP_H

Generated on Thu Jul 8 11:41:08 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5