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

ArchivingWorkerGroup.h

00001 #ifndef ARCHIVINGWORKERGROUP_H
00002 #define ARCHIVINGWORKERGROUP_H
00003 
00004 #include "SctService/WorkerGroup.h"
00005 #include <boost/shared_ptr.hpp>
00006 #include "Sct/Serializable.h"
00007 #include "CalibrationController/IS/TestData.h"
00008 #include "archiving/ArchRawScanResult.h"
00009 #include "archiving/ArchFitScanResult.h"
00010 
00011 using boost::shared_ptr;
00012 using Sct::Serializable;
00013 using SctService::WorkerGroup;
00014 
00015 namespace SctArchivingService {
00016     
00024 class ArchivingWorkerGroup : public WorkerGroup<shared_ptr<Serializable> > {
00025  
00026  public:
00027   
00028   class TestAlgs;   
00034   void addTest(shared_ptr<const TestData> testdata);
00042   shared_ptr<TestAlgs> findTest(const unsigned long runno, const unsigned long scanno) const throw();
00049   shared_ptr<TestAlgs> findTest(const TestData& testdata)const throw() ;
00050 
00051   //void RawScanWork(shared_ptr<const RawScanResult> raw) throw();
00052   //void FitScanWork(shared_ptr<const FitScanResult> fit) throw();
00053 
00054   shared_ptr<ArchScanResult>  getScanFromMap(shared_ptr<Serializable> ob);
00055   
00056   /*--------internal class-----------------------------------------------------------*/
00057 
00059     class TestAlgs {
00060     public:
00062         TestAlgs(shared_ptr<const TestData> testdata) : m_testdata(testdata) {} 
00064         const TestData& getTest() const {return *m_testdata;}
00065         
00069         ~TestAlgs();
00073         ostream& printStatus(ostream& os) const throw();
00074     private:
00075         shared_ptr<const TestData> m_testdata;               
00076 
00077         //AT mutable boost::recursive_mutex m_access;                 ///< lock results
00078     };
00079 
00080  private:
00081     
00082     virtual void work(shared_ptr<Serializable>) throw();
00083     
00084     list<shared_ptr<TestAlgs> > m_tests; 
00085     mutable boost::recursive_mutex m_tests_access; 
00086     mutable boost::recursive_mutex m_file_access; 
00087 
00088   
00089     
00090     
00091 };
00092     
00093 }
00094 
00095 #endif //ARCHIVINGWORKERGROUP_H

Generated on Thu Jul 15 09:50:42 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5