1 #ifndef IOPool_Streamer_FRDEventOutputModule_h
2 #define IOPool_Streamer_FRDEventOutputModule_h
14 #include "boost/shared_array.hpp"
17 class ModuleCallingContext;
21 template <
class Consumer>
48 template <
class Consumer>
50 edm::OutputModule(ps),
51 templateConsumer_(new Consumer(ps)),
52 label_(ps.getUntrackedParameter<std::
string>(
"ProductLabel",
"source")),
53 instance_(ps.getUntrackedParameter<std::
string>(
"ProductInstance",
""))
57 template <
class Consumer>
60 template <
class Consumer>
77 int expectedSize = (4 + 1024) *
sizeof(
uint32);
80 expectedSize += singleFED.
size();
87 boost::shared_array<unsigned char> workBuffer(
new unsigned char[expectedSize + 256]);
95 *bufPtr++ = singleFED.
size();
99 if (singleFED.
size() > 0) {
100 memcpy(bufPtr, singleFED.
data(), singleFED.
size());
101 *bufPtr += singleFED.
size();
107 templateConsumer_->doOutputEvent(
msg);
110 template <
class Consumer>
113 templateConsumer_->start();
116 template <
class Consumer>
119 templateConsumer_->stop();
virtual void write(edm::EventPrincipal const &e, edm::ModuleCallingContext const *) override
EventNumber_t event() const
virtual void endRun(edm::RunPrincipal const &, edm::ModuleCallingContext const *) override
virtual void writeLuminosityBlock(edm::LuminosityBlockPrincipal const &, edm::ModuleCallingContext const *) override
virtual void beginRun(edm::RunPrincipal const &, edm::ModuleCallingContext const *) override
FRDEventOutputModule(edm::ParameterSet const &ps)
EventID const & id() const
std::auto_ptr< Consumer > templateConsumer_
LuminosityBlockNumber_t luminosityBlock() const
size_t size() const
Lenght of the data buffer in bytes.
virtual void writeRun(edm::RunPrincipal const &, edm::ModuleCallingContext const *) override
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void convert_handle(BasicHandle &&bh, Handle< T > &result)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
BasicHandle getByLabel(KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumes, ModuleCallingContext const *mcc) const