CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
evf::IPCManager Class Reference

#include <IPCManager.h>

Public Member Functions

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 *) throw (evf::Exception)
 
IPCMethod *const ipc ()
 
 IPCManager (bool useMQ)
 
virtual ~IPCManager ()
 

Private Attributes

IPCMethodipc_
 
bool useMessageQueueIPC_
 

Detailed Description

Class used to create and initialize an IPC method of the required type. If constructed with argument <false>, the manager will create and initialize a FUResourceTable object. If constructed with argument <true>, the manager will create and initialize a FUResourceQueue object.

Author:
aspataru

Definition at line 27 of file IPCManager.h.

Constructor & Destructor Documentation

IPCManager::IPCManager ( bool  useMQ)

Definition at line 19 of file IPCManager.cc.

19  :
20  useMessageQueueIPC_(useMQ) {
21 }
bool useMessageQueueIPC_
Definition: IPCManager.h:52
IPCManager::~IPCManager ( )
virtual

Definition at line 24 of file IPCManager.cc.

References ipc_.

24  {
25  delete ipc_;
26 }
IPCMethod * ipc_
Definition: IPCManager.h:55

Member Function Documentation

void IPCManager::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 *  app 
)
throw (evf::Exception
)

Initialize the IPCMethod object with the given parameters.

Definition at line 29 of file IPCManager.cc.

References gather_cfg::cout, and fwlog::logger().

Referenced by evf::rb_statemachine::SharedResources::configureResources().

33  {
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 }
std::ostream & logger()
Definition: fwLog.cc:41
bool useMessageQueueIPC_
Definition: IPCManager.h:52
IPCMethod * ipc_
Definition: IPCManager.h:55
tuple cout
Definition: gather_cfg.py:121
IPCMethod *const IPCManager::ipc ( )

Returns a const pointer to the IPCMethod object created by the manager.

Definition at line 59 of file IPCManager.cc.

References ipc_.

Referenced by evf::rb_statemachine::SharedResources::configureResources().

59  {
60  return ipc_;
61 }
IPCMethod * ipc_
Definition: IPCManager.h:55

Member Data Documentation

IPCMethod* evf::IPCManager::ipc_
private

Definition at line 55 of file IPCManager.h.

Referenced by ipc(), and ~IPCManager().

bool evf::IPCManager::useMessageQueueIPC_
private

Definition at line 52 of file IPCManager.h.