CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
IPCManager.cc
Go to the documentation of this file.
1 //
3 // IPCManager.cc
4 // -------
5 //
6 // Created on: Oct 26, 2011
7 // Andrei Spataru : aspataru@cern.ch
9 
13 
14 using std::cout;
15 using std::endl;
16 using namespace evf;
17 
18 //______________________________________________________________________________
20  useMessageQueueIPC_(useMQ) {
21 }
22 
23 //______________________________________________________________________________
25  delete ipc_;
26 }
27 
28 //______________________________________________________________________________
29 void IPCManager::initialise(bool segmentationMode, UInt_t nbRawCells,
30  UInt_t nbRecoCells, UInt_t nbDqmCells, UInt_t rawCellSize,
31  UInt_t recoCellSize, UInt_t dqmCellSize, int freeResReq, BUProxy* bu, SMProxy* sm,
32  log4cplus::Logger logger, unsigned int resourceStructureTimeout,
33  EvffedFillerRB* frb, xdaq::Application* app) throw (evf::Exception) {
34 
35  // XXX: MQ IPC is disabled until it is ready
36  useMessageQueueIPC_ = false;
37 
38  if (!useMessageQueueIPC_) {
39  // IPC communication type is SharedMemory
40  //improve replace with logging
41  cout << "IPCMANAGER:: ----> IPC communication type is Shared Memory!"
42  << endl;
43 
44  ipc_ = new FUResourceTable(segmentationMode, nbRawCells, nbRecoCells,
45  nbDqmCells, rawCellSize, recoCellSize, dqmCellSize, freeResReq, bu, sm,
46  logger, resourceStructureTimeout, frb, app);
47  } else {
48  // IPC communication type is MessageQueue
49  cout << "IPCMANAGER:: ----> IPC communication type is Message Queue!"
50  << endl;
51 
52  ipc_ = new FUResourceQueue(segmentationMode, nbRawCells, nbRecoCells,
53  nbDqmCells, rawCellSize, recoCellSize, dqmCellSize, freeResReq, bu, sm,
54  logger, resourceStructureTimeout, frb, app);
55  }
56 }
57 
58 //______________________________________________________________________________
60  return ipc_;
61 }
std::ostream & logger()
Definition: fwLog.cc:41
virtual ~IPCManager()
Definition: IPCManager.cc:24
IPCMethod * ipc_
Definition: IPCManager.h:55
IPCMethod *const ipc()
Definition: IPCManager.cc:59
unsigned int UInt_t
Definition: FUTypes.h:12
void initialise(bool segmentationMode, UInt_t nbRawCells, UInt_t nbRecoCells, UInt_t nbDqmCells, UInt_t rawCellSize, UInt_t recoCellSize, UInt_t dqmCellSize, int freeResRequiredForAllocate, BUProxy *bu, SMProxy *sm, log4cplus::Logger logger, unsigned int resourceStructureTimeout, EvffedFillerRB *frb, xdaq::Application *)
Definition: IPCManager.cc:29
IPCManager(bool useMQ)
Definition: IPCManager.cc:19
tuple cout
Definition: gather_cfg.py:121