CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
evf::RecoEventWriterForFU Class Reference

#include <RecoEventWriterForFU.h>

Public Member Functions

void closeOutputFile ()
 
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
 
uint32 get_adler32_ini () const
 
 RecoEventWriterForFU (edm::ParameterSet const &ps)
 
void setInitMessageFile (std::string const &)
 
void setOutputFile (std::string const &)
 
void start ()
 
void stop ()
 
 ~RecoEventWriterForFU ()
 

Static Public Member Functions

static void fillDescription (edm::ParameterSetDescription &desc)
 

Private Attributes

uint32 preamble_adler32_ = 1
 
std::shared_ptr< StreamerOutputFilestream_writer_events_
 
std::shared_ptr< StreamerOutputFilestream_writer_preamble_
 

Detailed Description

Definition at line 20 of file RecoEventWriterForFU.h.

Constructor & Destructor Documentation

◆ RecoEventWriterForFU()

evf::RecoEventWriterForFU::RecoEventWriterForFU ( edm::ParameterSet const &  ps)
explicit

Definition at line 6 of file RecoEventWriterForFU.cc.

6 {}

◆ ~RecoEventWriterForFU()

evf::RecoEventWriterForFU::~RecoEventWriterForFU ( )

Definition at line 8 of file RecoEventWriterForFU.cc.

8 {}

Member Function Documentation

◆ closeOutputFile()

void evf::RecoEventWriterForFU::closeOutputFile ( )

Definition at line 46 of file RecoEventWriterForFU.cc.

46 { stream_writer_events_.reset(); }

References stream_writer_events_.

◆ doOutputEvent() [1/2]

void evf::RecoEventWriterForFU::doOutputEvent ( EventMsgBuilder const &  msg)

Definition at line 30 of file RecoEventWriterForFU.cc.

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

References mps_check::msg.

◆ doOutputEvent() [2/2]

void evf::RecoEventWriterForFU::doOutputEvent ( EventMsgView const &  msg)

Definition at line 25 of file RecoEventWriterForFU.cc.

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

References mps_check::msg, and stream_writer_events_.

◆ doOutputHeader() [1/2]

void evf::RecoEventWriterForFU::doOutputHeader ( InitMsgBuilder const &  init_message)

Definition at line 10 of file RecoEventWriterForFU.cc.

10  {
11  //Let us turn it into a View
12  InitMsgView view(init_message.startAddress());
13  doOutputHeader(view);
14  }

References InitMsgBuilder::startAddress().

◆ doOutputHeader() [2/2]

void evf::RecoEventWriterForFU::doOutputHeader ( InitMsgView const &  init_message)

Definition at line 16 of file RecoEventWriterForFU.cc.

16  {
17  //Write the Init Message to init file and close it
18  if (stream_writer_preamble_.get()) {
19  stream_writer_preamble_->write(init_message);
22  }
23  }

References preamble_adler32_, and stream_writer_preamble_.

◆ fillDescription()

void evf::RecoEventWriterForFU::fillDescription ( edm::ParameterSetDescription desc)
static

Definition at line 35 of file RecoEventWriterForFU.cc.

35 {}

◆ get_adler32()

uint32 evf::RecoEventWriterForFU::get_adler32 ( ) const
inline

Definition at line 41 of file RecoEventWriterForFU.h.

41 { return stream_writer_events_->adler32(); }

References stream_writer_events_.

◆ get_adler32_ini()

uint32 evf::RecoEventWriterForFU::get_adler32_ini ( ) const
inline

Definition at line 40 of file RecoEventWriterForFU.h.

40 { return preamble_adler32_; }

References preamble_adler32_.

◆ setInitMessageFile()

void evf::RecoEventWriterForFU::setInitMessageFile ( std::string const &  init)

Definition at line 37 of file RecoEventWriterForFU.cc.

37  {
40  }

References preamble_adler32_, and stream_writer_preamble_.

◆ setOutputFile()

void evf::RecoEventWriterForFU::setOutputFile ( std::string const &  events)

Definition at line 42 of file RecoEventWriterForFU.cc.

42  {
44  }

References patZpeak::events, and stream_writer_events_.

◆ start()

void evf::RecoEventWriterForFU::start ( )
inline

◆ stop()

void evf::RecoEventWriterForFU::stop ( )
inline

Definition at line 38 of file RecoEventWriterForFU.h.

38 {}

Member Data Documentation

◆ preamble_adler32_

uint32 evf::RecoEventWriterForFU::preamble_adler32_ = 1
private

Definition at line 46 of file RecoEventWriterForFU.h.

Referenced by doOutputHeader(), get_adler32_ini(), and setInitMessageFile().

◆ stream_writer_events_

std::shared_ptr<StreamerOutputFile> evf::RecoEventWriterForFU::stream_writer_events_
private

Definition at line 45 of file RecoEventWriterForFU.h.

Referenced by closeOutputFile(), doOutputEvent(), get_adler32(), and setOutputFile().

◆ stream_writer_preamble_

std::shared_ptr<StreamerOutputFile> evf::RecoEventWriterForFU::stream_writer_preamble_
private

Definition at line 44 of file RecoEventWriterForFU.h.

Referenced by doOutputHeader(), and setInitMessageFile().

mps_check.msg
tuple msg
Definition: mps_check.py:285
patZpeak.events
events
Definition: patZpeak.py:20
EventMsgView
Definition: EventMessage.h:72
evf::RecoEventWriterForFU::doOutputEvent
void doOutputEvent(EventMsgBuilder const &msg)
Definition: RecoEventWriterForFU.cc:30
evf::RecoEventWriterForFU::doOutputHeader
void doOutputHeader(InitMsgBuilder const &init_message)
Definition: RecoEventWriterForFU.cc:10
evf::RecoEventWriterForFU::stream_writer_preamble_
std::shared_ptr< StreamerOutputFile > stream_writer_preamble_
Definition: RecoEventWriterForFU.h:44
StreamerOutputFile
Definition: StreamerOutputFile.h:23
evf::RecoEventWriterForFU::stream_writer_events_
std::shared_ptr< StreamerOutputFile > stream_writer_events_
Definition: RecoEventWriterForFU.h:45
init
Definition: init.py:1
evf::RecoEventWriterForFU::preamble_adler32_
uint32 preamble_adler32_
Definition: RecoEventWriterForFU.h:46
InitMsgView
Definition: InitMessage.h:61