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

ArchivingService.cpp

00001 #include "Service.h"
00002 #include "Sct/IpcObjectException.h"
00003 
00004 #include <pmg/pmg_initSync.h>
00005 
00006 using namespace SctArchivingService;
00007 
00008 void pmgSynch(void *) {
00009     pmg_initSync();
00010 }
00011 
00012 int main(int argc, char** argv) {
00013     Sct::setExceptionHandlers(argv[0]);
00014 
00015     bool multiThreaded = false; //Choose single/multi-threaded 
00016     IPCCore::init(multiThreaded); 
00017     ArchivingService& arch=ArchivingService::instance();
00018 
00019     try {
00020         if (!arch.publish()) {
00021             throw Sct::IpcObjectException("Failed to publish ArchivingService", __FILE__, __LINE__);
00022         }
00023 
00024         arch.server().doSoon(pmgSynch, NULL);
00025     arch.run();
00026     arch.server().run();
00027     arch.withdraw();
00028     } catch (Sct::Throwable& e){
00029         e.sendToMrs(MRS_FATAL);
00030         std::terminate();
00031     }
00032 }

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