English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / DataServer: TDataSpecification.h Source File
Uranie / DataServer  v4.10.0
/* @license-end */
TDataSpecification.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2024 CEA/DES
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published
6 // by the Free Software Foundation, either version 3 of the License, or any
7 // later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 // $Id$
19 // $Author$
20 // $Date$
21 // $Revision$
22 // $State$
24 
35 #ifndef TDataSpecification_H
36 #define TDataSpecification_H
37 
38 // STL
39 #include <string>
40 
41 #include <iostream>
42 using std::cout;
43 using std::endl;
44 
45 // ROOT
46 #include "TList.h"
47 
48 //Uranie
49 #include "TAttribute.h"
50 #include "DataServer.h"
51 
59 namespace URANIE
60 {
61 namespace DataServer
62 {
63 class TDataSpecification: public TNamed
64 {
65 protected:
66  //---------------------------------------------
70  Bool_t _blog;
71  TString _relationName;
73  void clear();
76 
77 public:
78  //---------------------------------------------
85  TDataSpecification(const char *name, const char* title);
89  virtual ~TDataSpecification();
91 
92  //---------------------------------------------
96  TString GetClassName() const
97  {
98  return TString("TDataSpecification");
99  }
100 
102  TString getRelationName() const
103  {
104  return _relationName;
105  }
106  void setRelationName(TString name)
107  {
108  _relationName = name;
109  }
110 
111  TString getVariablesNames(TString separator = ":", bool noIterator=false);
112  TString getVariablesTypes(TString separator = ":", bool noIterator=false);
113  TString getVariablesNamesTypes(TString separator = ":", bool noIterator=false);
115  bool isComparableToTDSP(TDataSpecification *tdsp, bool isJustContained=false);
116  bool isComparableToTDSP(TString namestypes, bool isJustContained=false);
118 
119  //---------------------------------------------
123  Int_t getNAttributes(bool onlyAttribute=false) const;
125  Int_t getNOutputAttributes() const;
126  Int_t getNInputAttributes() const;
128  void addAttribute(TAttribute*, bool dontAddSizeOne=false);
130  void delAttribute(TString name);
132 
135  TAttribute* getAttribute(TString name) const;
137  TAttribute* getAttribute(Int_t index, bool onlyAttribute=false) const;
139 
143  Int_t getAttributeIndex(TAttribute* att, bool onlyAttribute=false) const;
144 
146 
150  Int_t getAttributeIndex(TString name, bool onlyAttribute=false) const;
151 
153 
156  Bool_t isAttribute(TString name) const;
157 
159 
162  TList * getListOfAttributes(const char* sListOfAttributes = "*", bool onlyAttribute=false);
163 
165 
166  //---------------------------------------------
170  void setLog()
171  {
172  _blog = kTRUE;
173  }
174  void unsetLog()
175  {
176  _blog = kFALSE;
177  }
178  void changeLog()
179  {
180  _blog = _blog ? kFALSE : kTRUE;
181  }
182  Bool_t getLog()
183  {
184  return _blog;
185  }
186  void printLog();
188 
189  ClassDef(URANIE::DataServer::TDataSpecification, ID_DATASERVER)
190  //Sp�cification des variables contenues dans un serveur de donn�es
191 
192 };
193 } // Fin du namespace DataServer
194 } // Fin du namespace URANIE
195 
196 #endif
ROOT.
Definition: TAttribute.h:104
void clear()
Clear the list of attributes.
TString _relationName
Relation name.
Definition: TDataSpecification.h:71
void changeLog()
Definition: TDataSpecification.h:178
Bool_t isAttribute(TString name) const
Checks if the attribute given by a name exists.
TString getRelationName() const
Defines the realtion name.
Definition: TDataSpecification.h:102
TAttribute * getAttribute(TString name) const
Returns the attribute given by the name.
void setRelationName(TString name)
Definition: TDataSpecification.h:106
Bool_t getLog()
Definition: TDataSpecification.h:182
TString getVariablesNamesTypes(TString separator=":", bool noIterator=false)
void addAttribute(TAttribute *, bool dontAddSizeOne=false)
Adds an attribute in the TList.
TString getVariablesNames(TString separator=":", bool noIterator=false)
virtual ~TDataSpecification()
Default Desctructor.
TDataSpecification()
Default constructor.
void delAttribute(TString name)
Deletes an attribute given by this name.
TString GetClassName() const
Definition: TDataSpecification.h:96
TList * getListOfAttributes(const char *sListOfAttributes="*", bool onlyAttribute=false)
Gets the list of attributes from a string.
The collection of attributes specifying how to interpret the input data attributes.
Definition: TDataSpecification.h:63
void setLog()
Definition: TDataSpecification.h:170
void unsetLog()
Definition: TDataSpecification.h:174
Int_t getNAttributes(bool onlyAttribute=false) const
Gets the number of Attributes.
Int_t getAttributeIndex(TAttribute *att, bool onlyAttribute=false) const
Returns the index of an attribute.
bool isComparableToTDSP(TDataSpecification *tdsp, bool isJustContained=false)
Check that content is equivalent (the boolean is for partial)
Description of a variable (field).
Definition: TAttribute.h:136
Bool_t _blog
Log printing.
Definition: TDataSpecification.h:70
TString getVariablesTypes(TString separator=":", bool noIterator=false)
Interface file for the class URANIE::DataServer::TAttribute.
TList * _listOfAttributes
Definition: TDataSpecification.h:72