GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConfAgent.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 ADF_ConfAgent
24 #define ADF_ConfAgent
25 
26 #ifndef ADF_DotConf
27 #include "DotConf.h"
28 #endif
29 
30 namespace ADF
31 {
32 
33 class DFAgent;
34 class RunAgent;
35 
37 
63 class ConfAgent : public DotConf
64 {
65 public:
67  enum EMode { kRead, kWrite } ;
70 
71 private:
73  static ConfAgent *gTheGlobalAgent;
74 
75 protected:
76  ConfAgent();
77 
78 public:
79  virtual ~ConfAgent();
80 
82  virtual DFAgent *GetDFAgent() = 0;
83  virtual const DFAgent *GetConstDFAgent() const = 0;
84 
86  virtual RunAgent *GetRunAgent() = 0;
87  virtual const RunAgent *GetConstRunAgent() const = 0;
88 
89  static ConfAgent::EModel GetModel(std::string);
90  static const Char_t *GetStringModel(ConfAgent::EModel);
91 
93  virtual ConfAgent *Clone(const char *comment = "Clone of the global ConfAgent") = 0;
94 
96  static ConfAgent *theGlobalAgent(std::string = "Agata");
97 
99  static void KilltheGlobalAgent();
100 };
101 
102 } // namespace ADF
103 
104 #endif
105 
106 
107 
108 
109 
110 
111 
112 
static void KilltheGlobalAgent()
to kill the global agent
Definition: ConfAgent.cpp:95
DotConf : Utility for class configuration from ascii file or Configuration frames.
Definition: DotConf.h:96
static const Char_t * GetStringModel(ConfAgent::EModel)
Definition: ConfAgent.cpp:78
virtual const RunAgent * GetConstRunAgent() const =0
EMode
Operating mode for frame IO.
Definition: ConfAgent.h:67
virtual ~ConfAgent()
Definition: ConfAgent.cpp:51
virtual DFAgent * GetDFAgent()=0
to get the Data Flow Agent in charge of knowing the structure of the DF
static ConfAgent * theGlobalAgent(std::string="Agata")
to get the global agent
Definition: ConfAgent.cpp:402
RunAgent.
Definition: RunAgent.h:43
static ConfAgent::EModel GetModel(std::string)
Definition: ConfAgent.cpp:66
virtual ConfAgent * Clone(const char *comment="Clone of the global ConfAgent")=0
Clone of the main (global) Agent.
ConfAgent.
Definition: ConfAgent.h:63
virtual const DFAgent * GetConstDFAgent() const =0
A DFAgent contains all the information concerning the structure of the data flow. ...
Definition: DFAgent.h:71
EModel
Model for FrameIO.
Definition: ConfAgent.h:69
header file for DotConf.cpp
virtual RunAgent * GetRunAgent()=0
to get the run Agent in charge of knowing the conditions of the DF being processed ...