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

FittingService.cpp

00001 #include "Fitter.h"
00002 #include "Sct/SctNames.h"
00003 #include "Sct/IpcObjectException.h"
00004 #include "FitterInterface.hh"
00005 #include <mrs/message.h>
00006 #include <ipc/core.h>
00007 #include <pmg/pmg_initSync.h>
00008 
00009 
00010 using namespace Sct;
00011 
00018 int main(int argc, char** argv){
00019   using namespace SctFitter;
00020   using namespace std;
00021 
00022   setExceptionHandlers(argv[0]);
00023   
00024   IPCCore::init(argc, argv);
00025 
00026   try{
00027       FitterArguments opts(argc, argv);
00028       opts.print(std::cout);
00029 
00030       //Initialize the fitter with the default FitStrategy
00031       Fitter& f = Fitter::initialize(opts);
00032 
00033       if (!f.publish()){
00034       throw IpcObjectException("FittingService failed to publish", __FILE__, __LINE__);
00035       }
00036 
00037       f.go();
00038       pmg_initSync();
00039       Fitter::getFitterServer().run();
00040   }
00041   catch (Throwable& e){
00042     std::cerr << e.what()<<std::endl;;
00043     e.sendToMrs(MRS_ERROR) ; 
00044     terminate(); 
00045   }
00046 }

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