1 #ifndef _ots_DataProducerBase_h_
2 #define _ots_DataProducerBase_h_
4 #include "otsdaq/DataManager/CircularBuffer.h"
5 #include "otsdaq/DataManager/DataProcessor.h"
6 #include "otsdaq/Macros/BinaryStringMacros.h"
19 const std::string& bufferUID,
20 const std::string& processorUID,
21 unsigned int bufferSize = 100);
27 template<
class D,
class H>
28 int attachToEmptySubBuffer(D*& data, H*& header)
31 ->getBuffer(DataProcessor::processorUID_)
32 .attachToEmptySubBuffer(data, header);
35 template<
class D,
class H>
36 int setWrittenSubBuffer(
void)
40 ->getBuffer(DataProcessor::processorUID_)
41 .setWrittenSubBuffer();
44 template<
class D,
class H>
45 int write(
const D& buffer)
48 ->getBuffer(DataProcessor::processorUID_)
52 template<
class D,
class H>
53 int write(
const D& buffer,
const H& header)
56 ->getBuffer(DataProcessor::processorUID_)
57 .write(buffer, header);
60 unsigned int getBufferSize(
void)
const {
return bufferSize_; }
63 const unsigned int bufferSize_;
virtual void registerToBuffer(void)
mirror DataConsumer::registerToBuffer