1 #ifndef IOPool_Streamer_FRDEventOutputModule_h
2 #define IOPool_Streamer_FRDEventOutputModule_h
9 #include "boost/shared_array.hpp"
12 template <
class Consumer>
39 template <
class Consumer>
41 edm::OutputModule(ps),
42 templateConsumer_(new Consumer(ps)),
43 label_(ps.getUntrackedParameter<std::string>(
"ProductLabel",
"source")),
44 instance_(ps.getUntrackedParameter<std::string>(
"ProductInstance",
""))
48 template <
class Consumer>
51 template <
class Consumer>
58 event.getByLabel(label_, instance_, fedBuffers);
61 int expectedSize = (4 + 1024) *
sizeof(
uint32);
62 for (
int idx = 0; idx < 1024; ++idx) {
63 FEDRawData singleFED = fedBuffers->FEDData(idx);
64 expectedSize += singleFED.
size();
71 boost::shared_array<unsigned char> workBuffer(
new unsigned char[expectedSize + 256]);
77 for (
int idx = 0; idx < 1024; ++idx) {
78 FEDRawData singleFED = fedBuffers->FEDData(idx);
79 *bufPtr++ = singleFED.
size();
81 for (
int idx = 0; idx < 1024; ++idx) {
82 FEDRawData singleFED = fedBuffers->FEDData(idx);
83 if (singleFED.
size() > 0) {
84 memcpy(bufPtr, singleFED.
data(), singleFED.
size());
85 *bufPtr += singleFED.
size();
91 templateConsumer_->doOutputEvent(
msg);
94 template <
class Consumer>
97 templateConsumer_->start();
100 template <
class Consumer>
103 templateConsumer_->stop();
EventNumber_t event() const
FRDEventOutputModule(edm::ParameterSet const &ps)
virtual void writeRun(edm::RunPrincipal const &)
virtual void write(edm::EventPrincipal const &e)
edm::LuminosityBlockNumber_t luminosityBlock() const
std::auto_ptr< Consumer > templateConsumer_
size_t size() const
Lenght of the data buffer in bytes.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void writeLuminosityBlock(edm::LuminosityBlockPrincipal const &)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
virtual void beginRun(edm::RunPrincipal const &)
virtual void endRun(edm::RunPrincipal const &)