CMS 3D CMS Logo

StreamerFileWriter.cc
Go to the documentation of this file.
3 
4 namespace edm::streamer {
5 
7  : stream_writer_(new StreamerOutputFile(ps.getUntrackedParameter<std::string>("fileName"),
8  ps.getUntrackedParameter<unsigned int>("padding"))) {}
9 
11  : stream_writer_(new StreamerOutputFile(fileName)) {}
12 
14 
16  //Let us turn it into a View
17  InitMsgView view(init_message.startAddress());
19  }
20 
21  void StreamerFileWriter::doOutputHeader(InitMsgView const& init_message) {
22  //Write the Init Message to Streamer file
23  stream_writer_->write(init_message);
24  }
25 
27  //Write the Event Message to Streamer file
28  stream_writer_->write(msg);
29  }
30 
32  EventMsgView eview(msg.startAddress());
33  doOutputEvent(eview);
34  }
35 
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  }
42 } // namespace edm::streamer
void doOutputEvent(EventMsgBuilder const &msg)
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_
tuple msg
Definition: mps_check.py:286
StreamerFileWriter(edm::ParameterSet const &ps)
void doOutputHeader(InitMsgBuilder const &init_message)
static void fillDescription(ParameterSetDescription &desc)