GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RootAFP.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 _RootAFP
24 #define _RootAFP
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 #include <vector>
37 
39 
43 {
44 private:
46  ADF::FileBlock fSourceOfFrames;
47 private:
49  std::string fPath;
51  std::string fBaseForName;
53  FILE *fCurrentFile;
55  UInt_t fCurrentFileNumber;
57  UInt_t fMaxSize;
58 
60  Short_t fConfMode;
62  std::vector< std::string > fListOfFile;
63 
64  unsigned long TotalEntryFileSize;
65  unsigned long ReadEntryFileSize;
66  unsigned long LastReadEntryFileSize;
67 
68 private:
69  ADF::AgataFrameTrigger fEndOfFrame;
70 
71 protected:
72  Bool_t NewFile();
73 
74 public:
75  RootAFP();
76  virtual ~RootAFP();
77 
79  static void process_config (const Char_t *, UInt_t *) ;
80 
82  virtual void process_initialise (UInt_t *error_code);
83 
85  virtual void process_reset (UInt_t *error_code);
86 
88  virtual UInt_t ProcessBlock (ADF::FrameBlock &) ;
89 };
90 
91 #endif
header file for FrameBlock.cpp
It defines the interface needed to be a narval actor (producer).
virtual UInt_t ProcessBlock(ADF::FrameBlock &)
Produce one block of data.
Definition: RootAFP.cpp:151
virtual ~RootAFP()
Definition: RootAFP.cpp:61
A Block of Frames.
Definition: FrameBlock.h:43
virtual void process_initialise(UInt_t *error_code)
Constructor implementation.
Definition: RootAFP.cpp:216
virtual void process_reset(UInt_t *error_code)
Destructor implementation.
Definition: RootAFP.cpp:323
RootAFP.
Definition: RootAFP.h:42
header file for Trigger.cpp
static void process_config(const Char_t *, UInt_t *)
to init globals (static) from a directory
Definition: RootAFP.cpp:142
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
RootAFP()
Definition: RootAFP.cpp:34
Bool_t NewFile()
Definition: RootAFP.cpp:67
header file for NarvalInterface.cpp