CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoEventWriterForFU.cc
Go to the documentation of this file.
1 #include "RecoEventWriterForFU.h"
4 
5 namespace evf {
7  }
8 
10  }
11 
13  //Let us turn it into a View
14  InitMsgView view(init_message.startAddress());
15  doOutputHeader(view);
16  }
17 
19  //Write the Init Message to init file and close it
20  if ( stream_writer_preamble_.get() ) {
21  stream_writer_preamble_->write(init_message);
24  }
25  }
26 
28  //Write the Event Message to Streamer file
29  stream_writer_events_->write(msg);
30  }
31 
33  EventMsgView eview(msg.startAddress());
34  doOutputEvent(eview);
35  }
36 
38  desc.setComment("Writes events into a streamer output file.");
39  desc.addUntracked<std::string>("fileName", "teststreamfile.dat")->setComment("Name of output file.");
40  }
41 
45  }
46 
48  stream_writer_events_.reset(new StreamerOutputFile(events));
49  }
50 
52  stream_writer_events_.reset();
53  }
54 
55 } //namespace edm
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
int init
Definition: HydjetWrapper.h:67
boost::shared_ptr< StreamerOutputFile > stream_writer_events_
uint8 * startAddress() const
void setComment(std::string const &value)
void setInitMessageFile(std::string const &)
void setOutputFile(std::string const &)
void doOutputEvent(EventMsgBuilder const &msg)
void doOutputHeader(InitMsgBuilder const &init_message)
boost::shared_ptr< StreamerOutputFile > stream_writer_preamble_
tuple events
Definition: patZpeak.py:19
static void fillDescription(edm::ParameterSetDescription &desc)
uint8 * startAddress() const
RecoEventWriterForFU(edm::ParameterSet const &ps)