Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00009
00010 #include "EventFilter/ResourceBroker/interface/IPCManager.h"
00011 #include "EventFilter/ResourceBroker/interface/FUResourceTable.h"
00012 #include "EventFilter/ResourceBroker/interface/FUResourceQueue.h"
00013
00014 using std::cout;
00015 using std::endl;
00016 using namespace evf;
00017
00018
00019 IPCManager::IPCManager(bool useMQ) :
00020 useMessageQueueIPC_(useMQ) {
00021 }
00022
00023
00024 IPCManager::~IPCManager() {
00025 delete ipc_;
00026 }
00027
00028
00029 void IPCManager::initialise(bool segmentationMode, UInt_t nbRawCells,
00030 UInt_t nbRecoCells, UInt_t nbDqmCells, UInt_t rawCellSize,
00031 UInt_t recoCellSize, UInt_t dqmCellSize, int freeResReq, BUProxy* bu, SMProxy* sm,
00032 log4cplus::Logger logger, unsigned int resourceStructureTimeout,
00033 EvffedFillerRB* frb, xdaq::Application* app) throw (evf::Exception) {
00034
00035
00036 useMessageQueueIPC_ = false;
00037
00038 if (!useMessageQueueIPC_) {
00039
00040
00041 cout << "IPCMANAGER:: ----> IPC communication type is Shared Memory!"
00042 << endl;
00043
00044 ipc_ = new FUResourceTable(segmentationMode, nbRawCells, nbRecoCells,
00045 nbDqmCells, rawCellSize, recoCellSize, dqmCellSize, freeResReq, bu, sm,
00046 logger, resourceStructureTimeout, frb, app);
00047 } else {
00048
00049 cout << "IPCMANAGER:: ----> IPC communication type is Message Queue!"
00050 << endl;
00051
00052 ipc_ = new FUResourceQueue(segmentationMode, nbRawCells, nbRecoCells,
00053 nbDqmCells, rawCellSize, recoCellSize, dqmCellSize, freeResReq, bu, sm,
00054 logger, resourceStructureTimeout, frb, app);
00055 }
00056 }
00057
00058
00059 IPCMethod* const IPCManager::ipc() {
00060 return ipc_;
00061 }