CMS 3D CMS Logo

Public Member Functions | Private Attributes

evf::IPCManager Class Reference

#include <IPCManager.h>

List of all members.

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.

                                 :
        useMessageQueueIPC_(useMQ) {
}
IPCManager::~IPCManager ( ) [virtual]

Definition at line 24 of file IPCManager.cc.

References ipc_.

                        {
        delete ipc_;
}

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().

                                                                                {

        // XXX: MQ IPC is disabled until it is ready
        useMessageQueueIPC_ = false;

        if (!useMessageQueueIPC_) {
                // IPC communication type is SharedMemory
                //improve replace with logging
                cout << "IPCMANAGER:: ----> IPC communication type is Shared Memory!"
                                << endl;

                ipc_ = new FUResourceTable(segmentationMode, nbRawCells, nbRecoCells,
                                nbDqmCells, rawCellSize, recoCellSize, dqmCellSize, freeResReq, bu, sm,
                                logger, resourceStructureTimeout, frb, app);
        } else {
                // IPC communication type is MessageQueue
                cout << "IPCMANAGER:: ----> IPC communication type is Message Queue!"
                                << endl;

                ipc_ = new FUResourceQueue(segmentationMode, nbRawCells, nbRecoCells,
                                nbDqmCells, rawCellSize, recoCellSize, dqmCellSize, freeResReq, bu, sm,
                                logger, resourceStructureTimeout, frb, app);
        }
}
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().

                                 {
        return ipc_;
}

Member Data Documentation

Definition at line 55 of file IPCManager.h.

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

Definition at line 52 of file IPCManager.h.