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);
23  }
24  }
25 
27  //Write the Event Message to Streamer file
28  stream_writer_events_->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  }
40 
43  }
44 
46  stream_writer_events_.reset(new StreamerOutputFile(events));
47  }
48 
50  stream_writer_events_.reset();
51  }
52 
53 } //namespace edm
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
int init
Definition: HydjetWrapper.h:62
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)