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
fwriter::EventContainer Class Reference

Public Member Functions

 EventContainer (unsigned int evtBufSize)
 
 EventContainer ()
 
unsigned char * getBuffer () const
 
unsigned int getBufSize () const
 
boost::shared_array< unsigned
char > * 
getSharedBuffer ()
 
unsigned int getSize () const
 
void putNewEvent (unsigned char *addr, unsigned int size)
 
void putNewEvent (boost::shared_array< unsigned char > &msg)
 
bool sharedMode ()
 
 ~EventContainer ()
 

Private Attributes

std::auto_ptr< unsigned char > data_
 
unsigned int evtBufSize_
 
boost::shared_array< unsigned
char > 
shared_data_
 
bool shared_mode_
 
unsigned int writtenSize_
 

Detailed Description

Definition at line 19 of file MTRawEventFileWriterForBU.cc.

Constructor & Destructor Documentation

fwriter::EventContainer::EventContainer ( unsigned int  evtBufSize)
inline

Definition at line 21 of file MTRawEventFileWriterForBU.cc.

References data_, evtBufSize_, shared_mode_, and writtenSize_.

22  {
23  writtenSize_=0;
24  evtBufSize_=evtBufSize;
25  data_.reset(new unsigned char [evtBufSize]);
26  shared_mode_=false;
27  }
std::auto_ptr< unsigned char > data_
fwriter::EventContainer::EventContainer ( )
inline

Definition at line 28 of file MTRawEventFileWriterForBU.cc.

References evtBufSize_, shared_data_, shared_mode_, and writtenSize_.

29  {
30  writtenSize_=0;
31  evtBufSize_=0;
32  shared_data_.reset();
33  shared_mode_=true;
34  }
boost::shared_array< unsigned char > shared_data_
fwriter::EventContainer::~EventContainer ( )
inline

Definition at line 35 of file MTRawEventFileWriterForBU.cc.

35 {}

Member Function Documentation

unsigned char* fwriter::EventContainer::getBuffer ( ) const
inline

Definition at line 40 of file MTRawEventFileWriterForBU.cc.

References data_.

40 {return data_.get();}
std::auto_ptr< unsigned char > data_
unsigned int fwriter::EventContainer::getBufSize ( ) const
inline

Definition at line 39 of file MTRawEventFileWriterForBU.cc.

References evtBufSize_.

39 {return evtBufSize_;}
boost::shared_array<unsigned char>* fwriter::EventContainer::getSharedBuffer ( )
inline

Definition at line 41 of file MTRawEventFileWriterForBU.cc.

References shared_data_.

41 {return & shared_data_;}
boost::shared_array< unsigned char > shared_data_
unsigned int fwriter::EventContainer::getSize ( ) const
inline

Definition at line 38 of file MTRawEventFileWriterForBU.cc.

References writtenSize_.

38 {return writtenSize_;}
void fwriter::EventContainer::putNewEvent ( unsigned char *  addr,
unsigned int  size 
)
inline

Definition at line 43 of file MTRawEventFileWriterForBU.cc.

References data_, evtBufSize_, findQualityFiles::size, and writtenSize_.

43  {
44  if (size>evtBufSize_) {
45  data_.reset(new unsigned char[size]);
47  }
48  memcpy(data_.get(),addr,size);
50  }
std::auto_ptr< unsigned char > data_
tuple size
Write out results.
void fwriter::EventContainer::putNewEvent ( boost::shared_array< unsigned char > &  msg)
inline

Definition at line 52 of file MTRawEventFileWriterForBU.cc.

References lumiQueryAPI::msg, and shared_data_.

52  {
53  shared_data_ = msg;
54  }
boost::shared_array< unsigned char > shared_data_
bool fwriter::EventContainer::sharedMode ( )
inline

Definition at line 37 of file MTRawEventFileWriterForBU.cc.

References shared_mode_.

Member Data Documentation

std::auto_ptr<unsigned char> fwriter::EventContainer::data_
private

Definition at line 59 of file MTRawEventFileWriterForBU.cc.

Referenced by EventContainer(), getBuffer(), and putNewEvent().

unsigned int fwriter::EventContainer::evtBufSize_
private

Definition at line 58 of file MTRawEventFileWriterForBU.cc.

Referenced by EventContainer(), getBufSize(), and putNewEvent().

boost::shared_array<unsigned char> fwriter::EventContainer::shared_data_
private

Definition at line 60 of file MTRawEventFileWriterForBU.cc.

Referenced by EventContainer(), getSharedBuffer(), and putNewEvent().

bool fwriter::EventContainer::shared_mode_
private

Definition at line 61 of file MTRawEventFileWriterForBU.cc.

Referenced by EventContainer(), and sharedMode().

unsigned int fwriter::EventContainer::writtenSize_
private

Definition at line 57 of file MTRawEventFileWriterForBU.cc.

Referenced by EventContainer(), getSize(), and putNewEvent().