CMS 3D CMS Logo

StreamerFileWriter.cc
Go to the documentation of this file.
3 
4 namespace edm {
6  : stream_writer_(new StreamerOutputFile(ps.getUntrackedParameter<std::string>("fileName"),
7  ps.getUntrackedParameter<unsigned int>("padding"))) {}
8 
10  : stream_writer_(new StreamerOutputFile(fileName)) {}
11 
13 
15  //Let us turn it into a View
16  InitMsgView view(init_message.startAddress());
18  }
19 
20  void StreamerFileWriter::doOutputHeader(InitMsgView const& init_message) {
21  //Write the Init Message to Streamer file
22  stream_writer_->write(init_message);
23  }
24 
26  //Write the Event Message to Streamer file
27  stream_writer_->write(msg);
28  }
29 
31  EventMsgView eview(msg.startAddress());
32  doOutputEvent(eview);
33  }
34 
36  desc.setComment("Writes events into a streamer output file.");
37  desc.addUntracked<std::string>("fileName", "teststreamfile.dat")->setComment("Name of output file.");
38  desc.addUntracked<unsigned int>("padding", 0)
39  ->setComment("For testing: INIT and event block size will be rounded to this size padded with 0xff bytes.");
40  }
41 } //namespace edm
uint8 * startAddress() const
StreamerFileWriter(edm::ParameterSet const &ps)
void doOutputHeader(InitMsgBuilder const &init_message)
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_
tuple msg
Definition: mps_check.py:286
HLT enums.
static void fillDescription(ParameterSetDescription &desc)
void doOutputEvent(EventMsgBuilder const &msg)