#include <StreamDQMOutputFile.h>
Public Member Functions | |
StreamDQMOutputFile (const std::string &name) | |
uint64 | write (const DQMEventMsgBuilder &) |
uint64 | write (const DQMEventMsgView &) |
~StreamDQMOutputFile () | |
Private Member Functions | |
void | writeDQMEventHeader (const DQMEventMsgView &inview) |
void | writeDQMEventHeader (const DQMEventMsgBuilder &inview) |
Private Attributes | |
boost::shared_ptr< OutputFile > | dqmstreamfile_ |
StreamDQMOutputFile: Class for doing Streamer Write operations Class for doing Streamer Write operations
Definition at line 19 of file StreamDQMOutputFile.h.
StreamDQMOutputFile::StreamDQMOutputFile | ( | const std::string & | name | ) | [explicit] |
Definition at line 7 of file StreamDQMOutputFile.cc.
: dqmstreamfile_(new OutputFile(name)) { }
StreamDQMOutputFile::~StreamDQMOutputFile | ( | ) |
uint64 StreamDQMOutputFile::write | ( | const DQMEventMsgView & | ineview | ) |
Performs write on InitMsgBuilder type, Header + Blob, both are written out.
Offset where current event starts
Offset of last written event
Definition at line 29 of file StreamDQMOutputFile.cc.
References dqmstreamfile_, DQMEventMsgView::eventAddress(), DQMEventMsgView::headerSize(), DQMEventMsgView::size(), and writeDQMEventHeader().
{ uint64 offset_to_return = dqmstreamfile_->current_offset(); dqmstreamfile_->set_last_event_offset(dqmstreamfile_->current_offset()); writeDQMEventHeader(ineview); dqmstreamfile_->write((const char*) ineview.eventAddress(), ineview.size() - ineview.headerSize()); dqmstreamfile_->inc_events(); return offset_to_return; }
uint64 StreamDQMOutputFile::write | ( | const DQMEventMsgBuilder & | inmsg | ) |
Offset where current event starts
Offset of last written event
Definition at line 12 of file StreamDQMOutputFile.cc.
References dqmstreamfile_, DQMEventMsgBuilder::eventAddress(), DQMEventMsgBuilder::headerSize(), DQMEventMsgBuilder::size(), and writeDQMEventHeader().
{ uint64 offset_to_return = dqmstreamfile_->current_offset(); dqmstreamfile_->set_last_event_offset(dqmstreamfile_->current_offset()); writeDQMEventHeader(inmsg); dqmstreamfile_->write((const char*) inmsg.eventAddress(), inmsg.size() - inmsg.headerSize()); dqmstreamfile_->inc_events(); return offset_to_return; }
void StreamDQMOutputFile::writeDQMEventHeader | ( | const DQMEventMsgView & | inview | ) | [private] |
Definition at line 53 of file StreamDQMOutputFile.cc.
References dqmstreamfile_, DQMEventMsgView::headerSize(), and DQMEventMsgView::startAddress().
Referenced by write().
{ dqmstreamfile_->write((const char*) ineview.startAddress(), ineview.headerSize()) ; }
void StreamDQMOutputFile::writeDQMEventHeader | ( | const DQMEventMsgBuilder & | inview | ) | [private] |
Definition at line 46 of file StreamDQMOutputFile.cc.
References dqmstreamfile_, DQMEventMsgBuilder::headerSize(), and DQMEventMsgBuilder::startAddress().
{ dqmstreamfile_->write((const char*) inmsg.startAddress(), inmsg.headerSize()) ; }
boost::shared_ptr<OutputFile> StreamDQMOutputFile::dqmstreamfile_ [private] |
Definition at line 46 of file StreamDQMOutputFile.h.
Referenced by write(), and writeDQMEventHeader().