GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BasicAFC.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 _BasicAFC
24 #define _BasicAFC
25 
26 #ifndef ADF_NarvalInterface
27 #include "NarvalInterface.h"
28 #endif
29 #ifndef ADF_Counter
30 #include "Counter.h"
31 #endif
32 
33 #include "Trigger.h"
34 
36 
39 {
40 private:
42  ADF::FileBlock fEndOfFrames;
43 
44 private:
46  std::string fPath;
48  std::string fBaseForName;
50  FILE *fCurrentFile;
52  UInt_t fCurrentFileNumber;
54  UInt_t fMaxSize;
56  Int_t fMyID;
57  // current file name
58  std::string fCurrentFileName;
59  std::string fCurrentName;
60 
61 private:
62  ADF::AgataFrameTrigger *fVertex;
63 
64 protected:
66  Bool_t NewFile();
67 
68 public:
69  BasicAFC(Int_t id = -1);
70  virtual ~BasicAFC();
71 
72  void SetID(Int_t id) {fMyID = id;}
73 
75  static void process_config (const Char_t *, UInt_t *) ;
76 
78  virtual void process_initialise (UInt_t *error_code);
79 
81  virtual void process_reset (UInt_t *error_code);
82 
83  virtual UInt_t ProcessBlock (ADF::FrameBlock &) ;
84 
85 };
86 
87 #endif
void SetID(Int_t id)
Definition: BasicAFC.h:72
A Block of Frames.
Definition: FrameBlock.h:43
virtual void process_reset(UInt_t *error_code)
Destructor implementation.
Definition: BasicAFC.cpp:201
header file for Counter.cpp
header file for Trigger.cpp
Frames are extracted/added directly, one by one from/to a file.
Definition: FrameBlock.h:367
virtual void process_initialise(UInt_t *error_code)
Constructor implementation.
Definition: BasicAFC.cpp:164
It defines the interface needed to be a consumer.
To be used for Agata Data Flow.
Definition: Trigger.h:462
static void process_config(const Char_t *, UInt_t *)
to init globals (static) from a directory
Definition: BasicAFC.cpp:67
BasicAFC(Int_t id=-1)
Definition: BasicAFC.cpp:36
virtual UInt_t ProcessBlock(ADF::FrameBlock &)
virtual method to be implemented
Definition: BasicAFC.cpp:128
header file for NarvalInterface.cpp
virtual ~BasicAFC()
Definition: BasicAFC.cpp:61
Bool_t NewFile()
open a new file
Definition: BasicAFC.cpp:77
basic consumer, it counts and dumps Frame in files
Definition: BasicAFC.h:38