#include <TestConsumer.h>
Public Member Functions | |
void | bufferReady () |
void | sendRegistry (void *buf, int len) |
void | stop () |
TestConsumer (edm::ParameterSet const &ps, edm::EventBuffer *buf) | |
~TestConsumer () | |
Private Attributes | |
edm::EventBuffer * | bufs_ |
boost::shared_ptr< Worker > | worker_ |
Definition at line 13 of file TestConsumer.h.
edmtest::TestConsumer::TestConsumer | ( | edm::ParameterSet const & | ps, |
edm::EventBuffer * | buf | ||
) |
Definition at line 95 of file TestConsumer.cc.
: worker_(new Worker(ps.getParameter<std::string>("fileName"), ps.getUntrackedParameter<int>("numPerFile",1<<31))), bufs_(buf) { // first write out all the product registry data into the front // of the output file (in text format) }
edmtest::TestConsumer::~TestConsumer | ( | ) |
Definition at line 105 of file TestConsumer.cc.
{ }
void edmtest::TestConsumer::bufferReady | ( | ) |
Definition at line 109 of file TestConsumer.cc.
References edm::EventBuffer::OperateBuffer< T >::buffer(), bufs_, edm::EventBuffer::OperateBuffer< T >::size(), and worker_.
{ worker_->checkCount(); EventBuffer::ConsumerBuffer cb(*bufs_); int sz = cb.size(); worker_->ost_->write((const char*)(&sz),sizeof(int)); worker_->ost_->write((const char*)cb.buffer(),sz); }
void edmtest::TestConsumer::sendRegistry | ( | void * | buf, |
int | len | ||
) |
Definition at line 127 of file TestConsumer.cc.
References worker_.
void edmtest::TestConsumer::stop | ( | ) |
Definition at line 121 of file TestConsumer.cc.
References bufs_, and edm::EventBuffer::OperateBuffer< T >::commit().
{ EventBuffer::ProducerBuffer pb(*bufs_); pb.commit(); }
edm::EventBuffer* edmtest::TestConsumer::bufs_ [private] |
Definition at line 27 of file TestConsumer.h.
Referenced by bufferReady(), and stop().
boost::shared_ptr<Worker> edmtest::TestConsumer::worker_ [private] |
Definition at line 26 of file TestConsumer.h.
Referenced by bufferReady(), and sendRegistry().