CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MsgBuf.cc
Go to the documentation of this file.
2 #include <iostream>
3 
4 namespace evf{
6  {
7 
8  buf_ = new unsigned char[msize_+sizeof(long int)];
9  ptr_ = (msgbuf*)buf_;
10  ptr_->mtype = MSQM_MESSAGE_TYPE_NOP;
11  }
12 
13  MsgBuf::MsgBuf(unsigned int size, unsigned int type) : msize_(size)
14  {
15  buf_ = new unsigned char[msize_+sizeof(long int)];
16  ptr_ = (msgbuf*)buf_;
17  ptr_->mtype = type;
18  }
19 
20  MsgBuf::MsgBuf(const MsgBuf &b) : msize_(b.msize_)
21  {
22  buf_ = new unsigned char[msize_+sizeof(long int)];
23  ptr_ = (msgbuf*)buf_;
24  memcpy(buf_,b.buf_,msize_);
25  }
27  {
28  msize_ = b.msize_;
29  buf_ = new unsigned char[msize_+sizeof(long int)];
30  ptr_ = (msgbuf*)buf_;
31  memcpy(buf_,b.buf_,msize_+sizeof(long int));
32  return *this;
33  }
34  size_t MsgBuf::msize(){return msize_;}
36  {
37  delete[] buf_;
38  }
39  msgbuf* MsgBuf::operator->(){return ptr_;}
40 }
size_t msize_
Definition: MsgBuf.h:20
type
Definition: HCALResponse.h:22
size_t msize()
Definition: MsgBuf.cc:34
struct msgbuf * ptr_
Definition: MsgBuf.h:22
MsgBuf & operator=(const MsgBuf &)
Definition: MsgBuf.cc:26
#define MAX_MSG_SIZE
Definition: queue_defs.h:10
#define MSQM_MESSAGE_TYPE_NOP
Definition: queue_defs.h:15
MsgBuf()
Definition: MsgBuf.cc:5
unsigned char * buf_
Definition: MsgBuf.h:21
double b
Definition: hdecay.h:120
msgbuf * operator->()
Definition: MsgBuf.cc:39
tuple size
Write out results.
virtual ~MsgBuf()
Definition: MsgBuf.cc:35