CMS 3D CMS Logo

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

#include <MsgBuf.h>

Inheritance diagram for evf::MsgBuf:
evf::DQMMsgBuf evf::RawMsgBuf evf::RecoMsgBuf evf::SimpleMsgBuf

Public Member Functions

 MsgBuf ()
 
 MsgBuf (unsigned int size, unsigned int type)
 
 MsgBuf (const MsgBuf &b)
 
size_t msize ()
 
msgbuf * operator-> ()
 
MsgBufoperator= (const MsgBuf &)
 
virtual ~MsgBuf ()
 

Protected Attributes

unsigned char * buf_
 
size_t msize_
 
struct msgbuf * ptr_
 

Friends

class MasterQueue
 
class SlaveQueue
 

Detailed Description

Definition at line 9 of file MsgBuf.h.

Constructor & Destructor Documentation

evf::MsgBuf::MsgBuf ( )

Definition at line 5 of file MsgBuf.cc.

References buf_, msize_, MSQM_MESSAGE_TYPE_NOP, and ptr_.

5  :
7 
8  buf_ = new unsigned char[msize_ + sizeof(long int)];
9  ptr_ = (msgbuf*) buf_;
10  ptr_->mtype = MSQM_MESSAGE_TYPE_NOP;
11 }
size_t msize_
Definition: MsgBuf.h:22
struct msgbuf * ptr_
Definition: MsgBuf.h:24
#define MAX_MSG_SIZE
Definition: queue_defs.h:10
#define MSQM_MESSAGE_TYPE_NOP
Definition: queue_defs.h:15
unsigned char * buf_
Definition: MsgBuf.h:23
evf::MsgBuf::MsgBuf ( unsigned int  size,
unsigned int  type 
)

Definition at line 13 of file MsgBuf.cc.

References buf_, msize_, and ptr_.

13  :
14  msize_(size) {
15  buf_ = new unsigned char[msize_ + sizeof(long int)];
16  ptr_ = (msgbuf*) buf_;
17  ptr_->mtype = type;
18 }
size_t msize_
Definition: MsgBuf.h:22
type
Definition: HCALResponse.h:22
struct msgbuf * ptr_
Definition: MsgBuf.h:24
unsigned char * buf_
Definition: MsgBuf.h:23
tuple size
Write out results.
evf::MsgBuf::MsgBuf ( const MsgBuf b)

Definition at line 20 of file MsgBuf.cc.

References buf_, msize_, and ptr_.

20  :
21  msize_(b.msize_) {
22  buf_ = new unsigned char[msize_ + sizeof(long int)];
23  ptr_ = (msgbuf*) buf_;
24  memcpy(buf_, b.buf_, msize_);
25 }
size_t msize_
Definition: MsgBuf.h:22
struct msgbuf * ptr_
Definition: MsgBuf.h:24
unsigned char * buf_
Definition: MsgBuf.h:23
double b
Definition: hdecay.h:120
evf::MsgBuf::~MsgBuf ( )
virtual

Definition at line 36 of file MsgBuf.cc.

References buf_.

36  {
37  delete[] buf_;
38 }
unsigned char * buf_
Definition: MsgBuf.h:23

Member Function Documentation

size_t evf::MsgBuf::msize ( )
msgbuf * evf::MsgBuf::operator-> ( )

Definition at line 39 of file MsgBuf.cc.

References ptr_.

39  {
40  return ptr_;
41 }
struct msgbuf * ptr_
Definition: MsgBuf.h:24
MsgBuf & evf::MsgBuf::operator= ( const MsgBuf b)

Definition at line 26 of file MsgBuf.cc.

References buf_, msize_, and ptr_.

26  {
27  msize_ = b.msize_;
28  buf_ = new unsigned char[msize_ + sizeof(long int)];
29  ptr_ = (msgbuf*) buf_;
30  memcpy(buf_, b.buf_, msize_ + sizeof(long int));
31  return *this;
32 }
size_t msize_
Definition: MsgBuf.h:22
struct msgbuf * ptr_
Definition: MsgBuf.h:24
unsigned char * buf_
Definition: MsgBuf.h:23
double b
Definition: hdecay.h:120

Friends And Related Function Documentation

friend class MasterQueue
friend

Definition at line 25 of file MsgBuf.h.

friend class SlaveQueue
friend

Definition at line 26 of file MsgBuf.h.

Member Data Documentation

unsigned char* evf::MsgBuf::buf_
protected

Definition at line 23 of file MsgBuf.h.

Referenced by MsgBuf(), operator=(), and ~MsgBuf().

size_t evf::MsgBuf::msize_
protected

Definition at line 22 of file MsgBuf.h.

Referenced by MsgBuf(), msize(), and operator=().

struct msgbuf* evf::MsgBuf::ptr_
protected