CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
edm::streamer::StreamerFileWriter Class Reference

#include <StreamerFileWriter.h>

Public Member Functions

void doOutputEvent (EventMsgBuilder const &msg)
 
void doOutputEvent (EventMsgView const &msg)
 
void doOutputHeader (InitMsgBuilder const &init_message)
 
void doOutputHeader (InitMsgView const &init_message)
 
uint32 get_adler32 () const
 
void start ()
 
void stop ()
 
 StreamerFileWriter (edm::ParameterSet const &ps)
 
 StreamerFileWriter (std::string const &fileName)
 
 ~StreamerFileWriter ()
 

Static Public Member Functions

static void fillDescription (ParameterSetDescription &desc)
 

Private Attributes

edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_
 

Detailed Description

Definition at line 22 of file StreamerFileWriter.h.

Constructor & Destructor Documentation

◆ StreamerFileWriter() [1/2]

edm::streamer::StreamerFileWriter::StreamerFileWriter ( edm::ParameterSet const &  ps)
explicit

Definition at line 6 of file StreamerFileWriter.cc.

7  : stream_writer_(new StreamerOutputFile(ps.getUntrackedParameter<std::string>("fileName"),
8  ps.getUntrackedParameter<unsigned int>("padding"))) {}
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_

◆ StreamerFileWriter() [2/2]

edm::streamer::StreamerFileWriter::StreamerFileWriter ( std::string const &  fileName)
explicit

Definition at line 10 of file StreamerFileWriter.cc.

11  : stream_writer_(new StreamerOutputFile(fileName)) {}
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_

◆ ~StreamerFileWriter()

edm::streamer::StreamerFileWriter::~StreamerFileWriter ( )

Definition at line 13 of file StreamerFileWriter.cc.

13 {}

Member Function Documentation

◆ doOutputEvent() [1/2]

void edm::streamer::StreamerFileWriter::doOutputEvent ( EventMsgBuilder const &  msg)

Definition at line 31 of file StreamerFileWriter.cc.

References doOutputEvent(), and mps_check::msg.

Referenced by doOutputEvent().

31  {
32  EventMsgView eview(msg.startAddress());
33  doOutputEvent(eview);
34  }
void doOutputEvent(EventMsgBuilder const &msg)
tuple msg
Definition: mps_check.py:286

◆ doOutputEvent() [2/2]

void edm::streamer::StreamerFileWriter::doOutputEvent ( EventMsgView const &  msg)

Definition at line 26 of file StreamerFileWriter.cc.

References mps_check::msg, and stream_writer_.

26  {
27  //Write the Event Message to Streamer file
28  stream_writer_->write(msg);
29  }
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_
tuple msg
Definition: mps_check.py:286

◆ doOutputHeader() [1/2]

void edm::streamer::StreamerFileWriter::doOutputHeader ( InitMsgBuilder const &  init_message)

Definition at line 15 of file StreamerFileWriter.cc.

References edm::streamer::InitMsgBuilder::startAddress().

15  {
16  //Let us turn it into a View
17  InitMsgView view(init_message.startAddress());
19  }
void doOutputHeader(InitMsgBuilder const &init_message)

◆ doOutputHeader() [2/2]

void edm::streamer::StreamerFileWriter::doOutputHeader ( InitMsgView const &  init_message)

Definition at line 21 of file StreamerFileWriter.cc.

References stream_writer_.

21  {
22  //Write the Init Message to Streamer file
23  stream_writer_->write(init_message);
24  }
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_

◆ fillDescription()

void edm::streamer::StreamerFileWriter::fillDescription ( ParameterSetDescription desc)
static

Definition at line 36 of file StreamerFileWriter.cc.

References submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

36  {
37  desc.setComment("Writes events into a streamer output file.");
38  desc.addUntracked<std::string>("fileName", "teststreamfile.dat")->setComment("Name of output file.");
39  desc.addUntracked<unsigned int>("padding", 0)
40  ->setComment("For testing: INIT and event block size will be rounded to this size padded with 0xff bytes.");
41  }

◆ get_adler32()

uint32 edm::streamer::StreamerFileWriter::get_adler32 ( ) const
inline

Definition at line 39 of file StreamerFileWriter.h.

References stream_writer_.

39 { return stream_writer_->adler32(); }
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_

◆ start()

void edm::streamer::StreamerFileWriter::start ( )
inline

Definition at line 36 of file StreamerFileWriter.h.

Referenced by progressbar.ProgressBar::__next__().

36 {}

◆ stop()

void edm::streamer::StreamerFileWriter::stop ( )
inline

Definition at line 37 of file StreamerFileWriter.h.

37 {};

Member Data Documentation

◆ stream_writer_

edm::propagate_const<std::unique_ptr<StreamerOutputFile> > edm::streamer::StreamerFileWriter::stream_writer_
private

Definition at line 42 of file StreamerFileWriter.h.

Referenced by doOutputEvent(), doOutputHeader(), and get_adler32().