English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / DataServer: TDataSpecification.h Source File
Uranie / DataServer v4.9.0
/* @license-end */
TDataSpecification.h
Go to the documentation of this file.
1
2// 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>
42using std::cout;
43using std::endl;
44
45// ROOT
46#include "TList.h"
47
48//Uranie
49#include "TAttribute.h"
50#include "DataServer.h"
51
59namespace URANIE
60{
61namespace DataServer
62{
63class TDataSpecification: public TNamed
64{
65protected:
66 //---------------------------------------------
70 Bool_t _blog;
71 TString _relationName;
74 void clear();
76
77public:
78 //---------------------------------------------
82
85 TDataSpecification(const char *name, const char* title);
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
124 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 }
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
Interface file for the class URANIE::DataServer::TAttribute.
Description of a variable (field).
Definition TAttribute.h:138
The collection of attributes specifying how to interpret the input data attributes.
Definition TDataSpecification.h:64
void clear()
Clear the list of attributes.
TDataSpecification()
Default constructor.
void setRelationName(TString name)
Definition TDataSpecification.h:106
TDataSpecification(const char *name, const char *title)
Default constructor with a name and a title.
TAttribute * getAttribute(TString name) const
Returns the attribute given by the name.
void addAttribute(TAttribute *, bool dontAddSizeOne=false)
Adds an attribute in the TList.
Bool_t isAttribute(TString name) const
Checks if the attribute given by a name exists.
bool isComparableToTDSP(TDataSpecification *tdsp, bool isJustContained=false)
Check that content is equivalent (the boolean is for partial)
bool isComparableToTDSP(TString namestypes, bool isJustContained=false)
virtual ~TDataSpecification()
Default Desctructor.
Int_t getNAttributes(bool onlyAttribute=false) const
Gets the number of Attributes.
TList * getListOfAttributes(const char *sListOfAttributes="*", bool onlyAttribute=false)
Gets the list of attributes from a string.
void setLog()
Definition TDataSpecification.h:170
TString getRelationName() const
Defines the realtion name.
Definition TDataSpecification.h:102
void unsetLog()
Definition TDataSpecification.h:174
TString getVariablesTypes(TString separator=":", bool noIterator=false)
TString GetClassName() const
Definition TDataSpecification.h:96
TString getVariablesNamesTypes(TString separator=":", bool noIterator=false)
TList * _listOfAttributes
Definition TDataSpecification.h:72
Bool_t getLog()
Definition TDataSpecification.h:182
TString getVariablesNames(TString separator=":", bool noIterator=false)
Int_t getAttributeIndex(TString name, bool onlyAttribute=false) const
Returns the index of an attribute given by the name.
Bool_t _blog
Log printing.
Definition TDataSpecification.h:70
TAttribute * getAttribute(Int_t index, bool onlyAttribute=false) const
Returns the attribute given by the index, bool is for removing internal and iterator.
Int_t getAttributeIndex(TAttribute *att, bool onlyAttribute=false) const
Returns the index of an attribute.
TDataSpecification(URANIE::DataServer::TDataSpecification *tdsp)
Copy constructor.
void changeLog()
Definition TDataSpecification.h:178
TString _relationName
Relation name.
Definition TDataSpecification.h:71
void delAttribute(TString name)
Deletes an attribute given by this name.
ROOT.
Definition TAttribute.h:106