CMS 3D CMS Logo

StreamerFileWriter.cc
Go to the documentation of this file.
3 
4 namespace edm {
6  stream_writer_(new StreamerOutputFile(
7  ps.getUntrackedParameter<std::string>("fileName")))
8  {
9  }
10 
12  stream_writer_(new StreamerOutputFile(fileName))
13  {
14  }
15 
17  }
18 
20  //Let us turn it into a View
21  InitMsgView view(init_message.startAddress());
22  doOutputHeader(view);
23  }
24 
25  void StreamerFileWriter::doOutputHeader(InitMsgView const& init_message) {
26  //Write the Init Message to Streamer file
27  stream_writer_->write(init_message);
28  }
29 
31  //Write the Event Message to Streamer file
32  stream_writer_->write(msg);
33  }
34 
36  EventMsgView eview(msg.startAddress());
37  doOutputEvent(eview);
38  }
39 
41  desc.setComment("Writes events into a streamer output file.");
42  desc.addUntracked<std::string>("fileName", "teststreamfile.dat")->setComment("Name of output file.");
43  }
44 } //namespace edm
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
uint8 * startAddress() const
StreamerFileWriter(edm::ParameterSet const &ps)
void setComment(std::string const &value)
void doOutputHeader(InitMsgBuilder const &init_message)
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_
tuple msg
Definition: mps_check.py:278
HLT enums.
static void fillDescription(ParameterSetDescription &desc)
uint8 * startAddress() const
void doOutputEvent(EventMsgBuilder const &msg)