#include <IOPool/Streamer/interface/StreamDQMOutputFile.h>
Public Member Functions | |
StreamDQMOutputFile (const std::string &name) | |
uint64 | write (const DQMEventMsgBuilder &) |
uint64 | write (const DQMEventMsgView &) |
Performs write on InitMsgBuilder type, Header + Blob, both are written out. | |
~StreamDQMOutputFile () | |
CTOR, takes file path name as argument. | |
Private Member Functions | |
void | writeDQMEventHeader (const DQMEventMsgBuilder &inview) |
void | writeDQMEventHeader (const DQMEventMsgView &inview) |
Private Attributes | |
OutputFile * | dqmstreamfile_ |
Class for doing Streamer Write operations
Definition at line 17 of file StreamDQMOutputFile.h.
StreamDQMOutputFile::StreamDQMOutputFile | ( | const std::string & | name | ) | [explicit] |
Definition at line 8 of file StreamDQMOutputFile.cc.
00008 : 00009 dqmstreamfile_(new OutputFile(name)) 00010 { 00011 }
StreamDQMOutputFile::~StreamDQMOutputFile | ( | ) |
CTOR, takes file path name as argument.
Definition at line 3 of file StreamDQMOutputFile.cc.
References dqmstreamfile_.
00004 { 00005 delete dqmstreamfile_; 00006 }
uint64 StreamDQMOutputFile::write | ( | const DQMEventMsgBuilder & | inmsg | ) |
Offset where current event starts
Offset of last written event
Definition at line 13 of file StreamDQMOutputFile.cc.
References OutputFile::current_offset(), dqmstreamfile_, DQMEventMsgBuilder::eventAddress(), DQMEventMsgBuilder::headerSize(), OutputFile::inc_events(), OutputFile::set_last_event_offset(), DQMEventMsgBuilder::size(), OutputFile::write(), and writeDQMEventHeader().
00014 { 00016 uint64 offset_to_return = dqmstreamfile_->current_offset(); 00017 00019 dqmstreamfile_->set_last_event_offset(dqmstreamfile_->current_offset()); 00020 00021 writeDQMEventHeader(inmsg); 00022 dqmstreamfile_->write((const char*) inmsg.eventAddress(), 00023 inmsg.size() - inmsg.headerSize()); 00024 00025 dqmstreamfile_->inc_events(); 00026 00027 return offset_to_return; 00028 }
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 30 of file StreamDQMOutputFile.cc.
References OutputFile::current_offset(), dqmstreamfile_, DQMEventMsgView::eventAddress(), DQMEventMsgView::headerSize(), OutputFile::inc_events(), OutputFile::set_last_event_offset(), DQMEventMsgView::size(), OutputFile::write(), and writeDQMEventHeader().
00031 { 00033 uint64 offset_to_return = dqmstreamfile_->current_offset(); 00034 00036 dqmstreamfile_->set_last_event_offset(dqmstreamfile_->current_offset()); 00037 00038 writeDQMEventHeader(ineview); 00039 dqmstreamfile_->write((const char*) ineview.eventAddress(), 00040 ineview.size() - ineview.headerSize()); 00041 00042 dqmstreamfile_->inc_events(); 00043 00044 return offset_to_return; 00045 }
void StreamDQMOutputFile::writeDQMEventHeader | ( | const DQMEventMsgBuilder & | inview | ) | [private] |
Definition at line 47 of file StreamDQMOutputFile.cc.
References dqmstreamfile_, DQMEventMsgBuilder::headerSize(), DQMEventMsgBuilder::startAddress(), and OutputFile::write().
00048 { 00049 dqmstreamfile_->write((const char*) 00050 inmsg.startAddress(), 00051 inmsg.headerSize()) ; 00052 }
void StreamDQMOutputFile::writeDQMEventHeader | ( | const DQMEventMsgView & | inview | ) | [private] |
Definition at line 54 of file StreamDQMOutputFile.cc.
References dqmstreamfile_, DQMEventMsgView::headerSize(), DQMEventMsgView::startAddress(), and OutputFile::write().
Referenced by write().
00055 { 00056 dqmstreamfile_->write((const char*) 00057 ineview.startAddress(), 00058 ineview.headerSize()) ; 00059 }
OutputFile* StreamDQMOutputFile::dqmstreamfile_ [private] |
Definition at line 44 of file StreamDQMOutputFile.h.
Referenced by write(), writeDQMEventHeader(), and ~StreamDQMOutputFile().