GammaWare  Head Version for release 0.9
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TestFIO.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2004 by Olivier Stezowski *
3  * stezow(AT)ipnl.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * aLong_t with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
23 #ifndef _TestFIO
24 #define _TestFIO
25 
26 #ifndef ADF_NarvalInterface
27 #include "NarvalInterface.h"
28 #endif
29 #ifndef ADF_Trigger
30 #include "Trigger.h"
31 #endif
32 
34 
38 class TestFIO : public ADF::NarvalFilter
39 {
40 private:
42  Bool_t fDoRead;
44  Bool_t fDoOutput;
46  Bool_t fDoWrite;
48  Bool_t fDoRecord;
49 
50 protected:
53 
54 protected:
55  virtual UInt_t SetInput();
56  virtual UInt_t Process();
57  virtual UInt_t SetOutput();
58 
59 public:
60  TestFIO();
61  virtual ~TestFIO();
62 
64  static void process_config (const Char_t *, UInt_t *) ;
65 
67  virtual void process_initialise (UInt_t *error_code);
68 
70  virtual void process_reset (UInt_t *error_code);
71 
73 
76  virtual UInt_t ProcessBlock (ADF::FrameBlock &, ADF::FrameBlock &);
77 
78  virtual void process_start (UInt_t *error_code);
79  virtual void process_stop (UInt_t *error_code);
80  virtual void process_pause (UInt_t *error_code);
81  virtual void process_resume (UInt_t *error_code);
82 
83 
84 // virtual void process_unload (UInt_t *error_code);
85 };
86 
87 #if HAVE_NARVAL_H == 1 && DUMMY_FILTER == 1
88 extern "C" {
89 /* you must have the following symbols */
90 /* see John Cresswell document for details : */
91 /* AGATA PSA and Tracking Algorithm Integration*/
93 void process_config (const Char_t *directory_path, UInt_t *error_code);
95 TestFIO *process_register (UInt_t *error_code);
97 void process_unload (TestFIO *algo_data,UInt_t *error_code);
98 
100 void process_block (TestFIO *algo,
101  void *input_buffer,
102  UInt_t size_of_input_buffer,
103  void *output_buffer,
104  UInt_t size_of_output_buffer,
105  UInt_t *used_size_of_output_buffer,
106  UInt_t *error_code);
107 /* optionnal symbols */
108 /* this symbol isn't documented for the moment, it should contain 0 or the */
109 /* maximum size of one event, value 0 is safe */
110 int max_size = 0;
111 void process_initialise (TestFIO *algo_data, UInt_t *error_code);
112 void process_reset (TestFIO *algo_data,UInt_t *error_code);
113 void process_start (TestFIO *algo_data,UInt_t *error_code);
114 void process_stop (TestFIO *algo_data,UInt_t *error_code);
115 void process_pause (TestFIO *algo_data,UInt_t *error_code);
116 void process_resume (TestFIO *algo_data, UInt_t *error_code);
117 } // extern C
118 #endif
119 #endif
virtual void process_pause(UInt_t *error_code)
This method is called every time the system pauses data acquisition.
Definition: TestFIO.cpp:268
virtual void process_start(UInt_t *error_code)
This method is called every time the daq starts.
Definition: TestFIO.cpp:241
TestFIO algorithm embedded in Narval.
Definition: TestFIO.h:38
virtual UInt_t SetOutput()
Definition: TestFIO.cpp:115
A Block of Frames.
Definition: FrameBlock.h:43
virtual ~TestFIO()
Definition: TestFIO.cpp:59
virtual UInt_t Process()
Definition: TestFIO.cpp:107
header file for Trigger.cpp
virtual void process_resume(UInt_t *error_code)
this method is called every time the system resumes data acquisition
Definition: TestFIO.cpp:273
virtual UInt_t SetInput()
Definition: TestFIO.cpp:89
TestFIO()
Definition: TestFIO.cpp:41
To be used for Agata Data Flow.
Definition: Trigger.h:462
virtual void process_stop(UInt_t *error_code)
This method is called every time the daq stops.
Definition: TestFIO.cpp:247
virtual void process_initialise(UInt_t *error_code)
Constructor implementation.
Definition: TestFIO.cpp:170
ADF::AgataFrameTrigger fTrigger
The Trigger.
Definition: TestFIO.h:52
virtual UInt_t ProcessBlock(ADF::FrameBlock &, ADF::FrameBlock &)
To process just a block of data.
Definition: TestFIO.cpp:135
static void process_config(const Char_t *, UInt_t *)
to init globals (static) from a directory
Definition: TestFIO.cpp:65
header file for NarvalInterface.cpp
virtual void process_reset(UInt_t *error_code)
Destructor implementation.
Definition: TestFIO.cpp:232
It defines the interface needed to be a narval actor (Filter).