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

AnalysisService.h

00001 #ifndef ANALYSISSERVICE_H
00002 #define ANALYSISSERVICE_H
00003 #include <is/isinfo.h>
00004 #include <ipc/object.h>
00005 #include <ipc/server.h>
00006 
00007 #include <string>
00008 #include <boost/utility.hpp>
00009 #include <boost/thread.hpp>
00010 
00011 #include "SctFitter/FitStrategy.h"
00012 #include "AnalysisServiceInterface.hh"
00013 #include "AnalysisArguments.h"
00014 
00015 namespace SctConfiguration{
00016 class Configuration;
00017 }
00018 namespace SctAnalysis {
00019 class DcsInterface;
00020 class AnalysisWorkerGroup;
00021 
00022 class AnalysisService : 
00023   public IPCNamedObject<POA_AnalysisServiceI::AnalysisServiceInterface>,
00024   private boost::noncopyable 
00025   {
00026 private:
00027     void shutdown();
00028  public:
00029     virtual ~AnalysisService();
00033     void run();
00037     static void generalCallback(ISCallbackInfo* isc);
00041     static void testDataCallback(ISCallbackInfo * isc);
00045     static void scanResultCallback(ISCallbackInfo * isc);
00049     void setFitStrategy(const string& name) throw(LogicError);
00053     SctFitter::FitStrategy& getFitStrategy() const throw(LogicError);
00057     static AnalysisService& instance();
00058     
00063     static AnalysisService& initialize(AnalysisArguments args);
00068     virtual void purge() throw();
00073     virtual void analyze(const char* testname) throw();
00079     virtual void analyzeModule(const char* testname, 
00080                    const char* modulename) throw();
00084     virtual char* status() throw();
00088     virtual CORBA::Short busy ();
00092     virtual CORBA::Short queueLength ();
00096     DcsInterface& getDcsInterface();
00100     const std::string getOutputISServerName();
00104     void recover();
00105 
00109     void setFifo(bool);
00113     bool isFifo();
00114 
00115     static IPCServer& getServer() throw();
00116     
00121     boost::shared_ptr<SctConfiguration::Configuration> getConfiguration();
00122 protected:
00126     AnalysisWorkerGroup* workergroup;
00127     DcsInterface* dcsinterface;
00128 private:
00129     boost::recursive_mutex m_status_access ; 
00130     SctFitter::FitStrategy* fitStrategy; 
00131     std::auto_ptr<ISInfoReceiver> infoReceiver;     
00132     static AnalysisService* service;
00133     AnalysisService(AnalysisArguments args); 
00134     AnalysisArguments m_args;
00135     boost::shared_ptr<SctConfiguration::Configuration> s_configuration; 
00136 };
00137 }
00138 
00139 #endif //#ifndef ANALYSISSERVICE_H

Generated on Fri Sep 16 18:01:48 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5