23 #ifndef ADF_DUMMYFILTER_H
27 #ifndef ADF_AgataKeyFactory
30 #ifndef ADF_AgataFrameFactory
47 fTrigger(
"Generic Trigger")
55 std::string t2 =
"152Dy";
73 NarvalInterface::process_config(directory_path,error_code);
75 if ( (*error_code) == 0u ) {
127 resultframe->
Reset();
143 UInt_t error_code = 0u;
147 { error_code = 1u;
break; }
152 { error_code = 2u;
break; }
155 if ( error_code == 1u ) {
157 <<
"During processing : SetInput -> Process -> SetOuput() " <<
nline;
159 if ( error_code == 2u ) {
161 <<
"During Record() " <<
nline;
176 conffile +=
"TestFIO.conf";
179 Bool_t ok =
false, is_universal =
false;
181 std::ifstream filein(conffile.data());
184 if ( !filein.good() )
189 while ( filein.good() ) {
191 UShort_t kmin, kmaj, fmin, fmaj, cons, proxy;
Version vkey, vframe;
193 filein >> tmp >> type >> kmin >> kmaj >> fmin >> fmaj >> cons >> proxy;
194 if ( !filein.good() )
199 vkey(kmin,kmaj); vframe(fmin,fmaj);
202 Log <<
"Cannot allocate output frame " << type.data() <<
nline ;
206 if (
fTrigger.
Add(type.data(),vkey,vframe,cons==1u) == 0x0 )
207 Log <<
"Cannot allocate input frame " << type.data() <<
nline ;
211 is_universal = (kmin == 1u);
212 fDoRead = (kmaj == 1u);
213 fDoOutput = (fmin == 1u);
214 fDoWrite = (fmaj == 1u);
215 fDoRecord = (cons == 1u);
236 NarvalFilter::process_reset(error_code);
256 Log <<
" Parameter NP_US from ADA " << t1 <<
nline;
258 Log <<
" Cannot get Parameter NP_US from ADA " << t1 <<
nline ;
260 std::string t2 =
"-";
262 Log <<
" Parameter NP_STRING from ADA " << t2 <<
nline ;
264 Log <<
" Cannot get Parameter NP_STRING from ADA " << t2 <<
nline ;
270 std::cout <<
"process_pause called with GetPID()" <<
GetPID() <<
std::endl;
275 std::cout <<
"process_resume called with GetPID()" <<
GetPID() <<
std::endl;
285 #if HAVE_NARVAL_H == 1 && DUMMY_FILTER == 1
286 void process_config (
const char *directory_path, UInt_t *error_code)
291 TestFIO *process_register (UInt_t *error_code) {
return new TestFIO(); }
298 void process_block (
TestFIO *algo_data,
300 UInt_t size_of_input_buffer,
302 UInt_t size_of_output_buffer,
303 UInt_t *used_size_of_output_buffer,
306 algo_data->
process_block (input_buffer, size_of_input_buffer,
307 output_buffer, size_of_output_buffer,
308 used_size_of_output_buffer, error_code);
311 void process_initialise (
TestFIO *algo_data, UInt_t *error_code)
315 void process_reset (
TestFIO *algo_data,UInt_t *error_code)
319 void process_start (
TestFIO *algo_data, UInt_t *error_code)
323 void process_stop (
TestFIO *algo_data,UInt_t *error_code)
327 void process_pause (
TestFIO *algo_data,UInt_t *error_code)
331 void process_resume (
TestFIO *algo_data, UInt_t *error_code)
UInt_t GetPID() const
To get the ID number for that algorithm.
header file for AgataFrameFactory.cpp
LogMessage & error(LogMessage &)
virtual void process_pause(UInt_t *error_code)
This method is called every time the system pauses data acquisition.
virtual UInt_t Read()
It reads the content into dedicated structures from the Frame (data part)
virtual void process_start(UInt_t *error_code)
This method is called every time the daq starts.
TestFIO algorithm embedded in Narval.
virtual SharedFP * Add(const FactoryItem &key_item, const FactoryItem &frame_item, bool iscons=true, const Char_t *option="")
Add a frame to the list of required frames.
header file for TrackedFrame.cpp
virtual UInt_t SetOutput()
LogMessage & nline(LogMessage &)
void SetModel(ConfAgent::EModel model)
header file for CrystalFrame.cpp
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 Bool_t Register(DFTrigger *)
To register a trigger.
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 ...
header file for PSAFrame.cpp
virtual void process_resume(UInt_t *error_code)
this method is called every time the system resumes data acquisition
const std::string & GetConfPath()
To get the algo path associated with the current actor.
Base class for version numbers.
virtual UInt_t SetInput()
virtual SharedFP * SetOutputFrame(Frame *frame)
Once a trigger has fired, the result of the algorithm is set through this.
virtual void Detach(FrameBlock *in, FrameBlock *out)
static Int_t SetGlobalParameter(const char *name, const UShort_t &)
void SetStatus(EStatus stat)
virtual void SetProcessMethod(const char *)
To set the current method.
header file for AgataKeyFactory.cpp
LogMessage & dolog(LogMessage &)
virtual void process_stop(UInt_t *error_code)
This method is called every time the daq stops.
virtual void ClearMessage()
To clear the current message.
virtual void process_initialise(UInt_t *error_code)
Constructor implementation.
ADF::AgataFrameTrigger fTrigger
The Trigger.
virtual Frame * GetOutputFrame()
to get back the output frame
virtual void Reset()=0
Reset the current frame.
virtual void Stallion(UInt_t repetition=4u)=0
Fill the frame with a given pattern (used for ADF test)
ADF::LogMessage & endl(ADF::LogMessage &log)
virtual UInt_t ProcessBlock(ADF::FrameBlock &, ADF::FrameBlock &)
To process just a block of data.
header file for TestFIO.cpp
static void process_config(const Char_t *, UInt_t *)
to init globals (static) from a directory
virtual void Attach(FrameBlock *in, FrameBlock *out)
Attach a block to this. Rewind called if DoRewind set to true (Default)
virtual void process_reset(UInt_t *error_code)
Destructor implementation.
virtual std::string & GetProcessName()
To get the Process name.
void Universal(Bool_t b=true)
Set this trigger as universal or not.
virtual Frame * GetInputFrame(UInt_t which=0u)
to get back the frames that define this trigger
LogMessage Log
to send messages to the log server
virtual void SetName(const char *name)
It defines the interface needed to be a narval actor (Filter).