CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
edm::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 21 of file StreamerFileWriter.h.

Constructor & Destructor Documentation

◆ StreamerFileWriter() [1/2]

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

Definition at line 5 of file StreamerFileWriter.cc.

6  : stream_writer_(new StreamerOutputFile(ps.getUntrackedParameter<std::string>("fileName"))) {}

◆ StreamerFileWriter() [2/2]

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

Definition at line 8 of file StreamerFileWriter.cc.

◆ ~StreamerFileWriter()

edm::StreamerFileWriter::~StreamerFileWriter ( )

Definition at line 11 of file StreamerFileWriter.cc.

11 {}

Member Function Documentation

◆ doOutputEvent() [1/2]

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

Definition at line 29 of file StreamerFileWriter.cc.

29  {
30  EventMsgView eview(msg.startAddress());
31  doOutputEvent(eview);
32  }

References mps_check::msg.

◆ doOutputEvent() [2/2]

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

Definition at line 24 of file StreamerFileWriter.cc.

24  {
25  //Write the Event Message to Streamer file
26  stream_writer_->write(msg);
27  }

References mps_check::msg, and stream_writer_.

◆ doOutputHeader() [1/2]

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

Definition at line 13 of file StreamerFileWriter.cc.

13  {
14  //Let us turn it into a View
15  InitMsgView view(init_message.startAddress());
16  doOutputHeader(view);
17  }

References InitMsgBuilder::startAddress().

◆ doOutputHeader() [2/2]

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

Definition at line 19 of file StreamerFileWriter.cc.

19  {
20  //Write the Init Message to Streamer file
21  stream_writer_->write(init_message);
22  }

References stream_writer_.

◆ fillDescription()

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

Definition at line 34 of file StreamerFileWriter.cc.

34  {
35  desc.setComment("Writes events into a streamer output file.");
36  desc.addUntracked<std::string>("fileName", "teststreamfile.dat")->setComment("Name of output file.");
37  }

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

◆ get_adler32()

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

Definition at line 38 of file StreamerFileWriter.h.

38 { return stream_writer_->adler32(); }

References stream_writer_.

◆ start()

void edm::StreamerFileWriter::start ( )
inline

Definition at line 35 of file StreamerFileWriter.h.

35 {}

Referenced by progressbar.ProgressBar::__next__().

◆ stop()

void edm::StreamerFileWriter::stop ( )
inline

Definition at line 36 of file StreamerFileWriter.h.

36 {};

Member Data Documentation

◆ stream_writer_

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

Definition at line 41 of file StreamerFileWriter.h.

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

edm::StreamerFileWriter::doOutputEvent
void doOutputEvent(EventMsgBuilder const &msg)
Definition: StreamerFileWriter.cc:29
edm::StreamerFileWriter::doOutputHeader
void doOutputHeader(InitMsgBuilder const &init_message)
Definition: StreamerFileWriter.cc:13
mps_check.msg
tuple msg
Definition: mps_check.py:285
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
EventMsgView
Definition: EventMessage.h:72
StreamerOutputFile
Definition: StreamerOutputFile.h:23
edm::StreamerFileWriter::stream_writer_
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_
Definition: StreamerFileWriter.h:41
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
InitMsgView
Definition: InitMessage.h:61