23 #ifndef ADF_NarvalInterface
24 #define ADF_NarvalInterface
25 #define ADF_NARVALINTERFACE_H ADF_NarvalInterface
58 std::string fConfPath;
71 static std::string ConfPath;
73 static UInt_t ProcessID;
82 {
return fProcessID; }
94 {
return G::ConfPath; }
172 static void process_config(
const Char_t * , UInt_t * , Short_t do_adf_conf = 0);
196 std::cout <<
"NarvalInterface::process_stop called" <<
std::endl;
255 fAttachedInputBlock = block;
263 if ( fAttachedInputBlock ) {
283 UInt_t size_of_input_buffer,
378 fAttachedInputBlock = block;
386 if ( fAttachedInputBlock ) {
400 fAttachedOutputBlock = block;
408 if ( fAttachedOutputBlock ) {
432 UInt_t size_of_input_buffer,
434 UInt_t size_of_output_buffer,
435 UInt_t *used_size_of_output_buffer,
476 fAttachedOutputBlock = block;
484 if ( fAttachedOutputBlock ) {
505 UInt_t size_of_output_buffer,
506 UInt_t *used_size_of_output_buffer,
virtual Int_t GetNbInput() const
for this actor, it gives the current number of entry lines attached.
virtual Int_t GetNbOutput() const
for this actor, it gives the current number of output lines attached.
virtual Int_t GetNbInput() const
for this actor, it gives the current number of entry lines attached.
virtual void process_reset(UInt_t *error_code)
To reset the internal values (real destructor)
UInt_t GetPID() const
To get the ID number for that algorithm.
virtual Int_t GetNbOutput() const
for this actor, it gives the current number of entry lines attached.
static std::string GetGlobalConfPath()
global conf path keep since passed in static method and needed in init method
virtual ConfAgent * GetConfAgent() const
It defines the interface needed to be a narval actor (producer).
static void process_config(const Char_t *, UInt_t *, Short_t do_adf_conf=0)
Have to be overwritten and called in your implementation.
virtual void process_resume(UInt_t *error_code)
this method is called every time the system resumes data acquisition
static void process_config(const Char_t *, UInt_t *)
Have to be overwritten and called in your implementation.
virtual UInt_t ProcessBlocks()
process blocks attached by AttachInput/AttachOutput. No need to overwrite it if ProcessBlock(FrameBlo...
virtual void process_stop(UInt_t *error_code)
This method is called every time the daq stops.
virtual Int_t GetMaxInput() const
for this actor, it gives the max number of entry lines it can handle : one for a consumer ...
virtual Int_t GetNbOutput() const
for this actor, it gives the current number of output lines attached.
virtual void process_block(void *input_buffer, UInt_t size_of_input_buffer, UInt_t *error_code)
Narval interface, Ask the algorithm to process the input data block.
static void process_config(const Char_t *, UInt_t *)
Narval interface.
virtual UInt_t ProcessBlocks()=0
generic ProcessBlocks method for any kind of actor. Intput/Output should be attached using the Attach...
virtual ~NarvalConsumer()
virtual Int_t GetNbOutput() const
for this actor, it gives the current number of entry lines attached.
virtual void process_start(UInt_t *error_code)
This method is called every time the daq starts.
FrameIO fFrameIO
Frame IO.
static void process_config(const Char_t *algo_path, UInt_t *error_code)
virtual UInt_t ProcessBlocks()
process blocks attached by AttachInput/AttachOutput. No need to overwrite it if ProcessBlock(FrameBlo...
virtual void process_block(void *input_buffer, UInt_t size_of_input_buffer, void *output_buffer, UInt_t size_of_output_buffer, UInt_t *used_size_of_output_buffer, UInt_t *error_code)
Ask the algorithm to process the data block.
virtual void process_reset(UInt_t *error_code)=0
To reset the internal values (real destructor)
One stream as an input and one in output.
virtual Int_t GetNbInput() const
for this actor, it gives the current number of entry lines attached.
virtual UInt_t ProcessBlocks()
process blocks attached by AttachInput/AttachOutput. No need to overwrite it if ProcessBlock(FrameBlo...
virtual Int_t GetMaxInput() const
for this actor, it gives the max number of entry lines it can handle ==> Only one for a filter ...
static Int_t GetGlobalParameter(const char *name, UShort_t &val)
to get from narval a parameter () ... IS IT mandatory to have there a static method ...
virtual Int_t AttachOutput(FrameBlock *block, Int_t slot=-1)
Attach a block as output for a given slot number.
const std::string & GetConfPath()
To get the algo path associated with the current actor.
Base class for version numbers.
static Int_t SetGlobalParameter(const char *name, const UShort_t &)
virtual Int_t GetNbInput() const
for this actor, it gives the current number of entry lines attached.
virtual UInt_t ProcessBlocks()
generic ProcessBlocks method for any kind of actor. Intput/Output should be attached using the Attach...
static void process_config(const Char_t *, UInt_t *)
Have to be overwritten and called in your implementation.
It defines the interface needed to be a consumer.
FrameIO fFrameIO
Frame IO ... should be private ...
virtual Int_t AttachInput(FrameBlock *block, Int_t slot=-1)
Attach a block as input for a given slot number.
virtual Int_t AttachOutput(FrameBlock *block, Int_t slot=-1)
Attach a block as output for a given slot number.
virtual Int_t AttachInput(FrameBlock *block, Int_t slot=-1)
Attach a block as input for a given slot number.
Base class for a Log message.
virtual Int_t GetMaxInput() const
for this actor, it gives the max number of entry lines it can handle (max included).
virtual UInt_t ProcessBlock(FrameBlock &)=0
virtual method to be implemented
virtual ConfAgent * GetConfAgent() const
header file for FrameIO.cpp
ADF::LogMessage & endl(ADF::LogMessage &log)
virtual Int_t GetMaxOutput() const
for this actor, it gives the max number of output lines it can handle ==> Only one for a producer ...
Version fVersion
Algo version (used to check determine suitable frame version ?)
virtual Bool_t SetNbInput(Int_t)
virtual void process_initialise(UInt_t *error_code)=0
To init the internal values (real constructor)
virtual Int_t GetMaxOutput() const
for this actor, it gives the max number of output lines it can handle ==> Only one for a filter ...
Base class for an actor with N input and M output : main purpose is to structure the dataflow...
ConfAgent * GetConfAgent() const
Return the agent which keeps the current configuration for that FrameIO.
virtual UInt_t ProcessBlock(FrameBlock &)=0
process one block, virtual method to be implemented
virtual ConfAgent * GetConfAgent() const
virtual ~NarvalProducer()
virtual UInt_t ProcessBlock(FrameBlock &, FrameBlock &)=0
virtual method to be implemented
LogMessage Log
to send messages to the log server
It defines the general interface needed to be a narval actor.
FrameIO fFrameIO
Frame IO.
It implements an in-memory block of Frames.
virtual Int_t AttachOutput(FrameBlock *, Int_t=-1)
Attach a block as output for a given slot number.
virtual ~NarvalInterface()
virtual ConfAgent * GetConfAgent() const
virtual void process_block(void *output_buffer, UInt_t size_of_output_buffer, UInt_t *used_size_of_output_buffer, UInt_t *error_code)
Ask the algorithm to process the data block.
virtual Int_t AttachInput(FrameBlock *, Int_t=-1)
Attach a block as input for a given slot number.
It defines the interface needed to be a narval actor (Filter).
virtual void process_pause(UInt_t *error_code)
This method is called every time the system pauses data acquisition.
virtual Bool_t SetNbOutput(Int_t)
virtual Int_t GetMaxOutput() const
for this actor, it gives the max number of output lines it can handle (max included).