#include <CProcessor.h> class CProcessor { public: virtual ~CProcessor() {} virtual void process(void* pData, size_t nBytes, CSender& sender) = 0; };
This class is a key abstract base class for the NSCLDAQ parallel processing framework. The class provides interfaces for a process that participates in parallel sequential processing. The idea is that a concrete processor class is encapsulated in a class that accepts data from some source.
When data is received the encapsulating class calls then
process
class handing it both the
data and a CSender
object that can
be used to send data to the next stage of the processing pipeline.
Concrete implementations must implement this
process
method.
virtual =0 void process(void* pData, size_t nBytes, CSender& sender);
This is the method that concrete classes must implement.
When constructing a parallel pgoram, the user normally
creates a set of concrete processors that operate on
work items producing output data. These processor
objects are then encapsulated in an object that has been
bound to a CReceiver
that
accepts work items from the previous stage of the
processing pipeline and a
CSender
that is connected
to the next stage of that pipeline.
The containing object, when run will accept work items
from its CReceiver
and
call its processor's process
method. That method is expected to do whatever
application specific processing is required to produce
output data and to send that output data to the next
stage of the processing pipeline.