GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BasicAFP.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 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 _BasicAFP
24 #define _BasicAFP
25 
26 #ifndef ADF_NarvalInterface
27 #include "NarvalInterface.h"
28 #endif
29 #ifndef ADF_FrameBlock
30 #include "FrameBlock.h"
31 #endif
32 #include "Trigger.h"
33 
34 #include <list>
35 #include <utility>
36 
38 
42 {
43 private:
45  ADF::FileBlock fSourceOfFrames;
46 private:
48  std::string fPath;
50  std::string fBaseForName;
52  FILE *fCurrentFile;
54  UInt_t fCurrentFileNumber;
56  UInt_t fMaxSize;
58  Int_t fMyID;
59  // current file name
60  std::string fCurrentFileName;
61  std::string fCurrentName;
62 
63 private:
64  ADF::AgataFrameTrigger fEndOfFrame;
65 
66 protected:
67  Bool_t NewFile();
68 
69 public:
70  BasicAFP(Int_t id = -1);
71  virtual ~BasicAFP();
72 
73  void SetID(Int_t id) {fMyID = id;}
74 
76  static void process_config (const Char_t *, UInt_t *) ;
77 
79  virtual void process_initialise (UInt_t *error_code);
80 
82  virtual void process_reset (UInt_t *error_code);
83 
85  virtual UInt_t ProcessBlock (ADF::FrameBlock &) ;
86 };
87 
88 #endif
header file for FrameBlock.cpp
It defines the interface needed to be a narval actor (producer).
void SetID(Int_t id)
Definition: BasicAFP.h:73
BasicAFP.
Definition: BasicAFP.h:41
static void process_config(const Char_t *, UInt_t *)
to init globals (static) from a directory
Definition: BasicAFP.cpp:104
virtual ~BasicAFP()
Definition: BasicAFP.cpp:55
A Block of Frames.
Definition: FrameBlock.h:43
Bool_t NewFile()
Definition: BasicAFP.cpp:61
header file for Trigger.cpp
BasicAFP(Int_t id=-1)
Definition: BasicAFP.cpp:33
Frames are extracted/added directly, one by one from/to a file.
Definition: FrameBlock.h:367
To be used for Agata Data Flow.
Definition: Trigger.h:462
virtual UInt_t ProcessBlock(ADF::FrameBlock &)
Produce one block of data.
Definition: BasicAFP.cpp:114
virtual void process_reset(UInt_t *error_code)
Destructor implementation.
Definition: BasicAFP.cpp:206
header file for NarvalInterface.cpp
virtual void process_initialise(UInt_t *error_code)
Constructor implementation.
Definition: BasicAFP.cpp:174