Commit 02be51e5ef7fcd0b67e48b62b0ec1a4d191d1290

Authored by Hacene SI HADJ MOHAND
1 parent 311e70b2
Exists in rm_6616_bis

progress

src/ExternLib/GetMavenStaticEnergy/GetMavenStaticEnergyProcess.cc
... ... @@ -51,11 +51,11 @@ TimeStamp GetMavenStaticEnergyProcess::init() {
51 51 dynamic_cast<Base::GetMavenStaticEnergy*>(_operation)->init(*_parameterInput,_attributList);
52 52 _paramData = ParamDataSPtr(_operation->getParamOutput());
53 53 _paramData->setMinSampling(_paramInput->getMinSampling());
54   - // initSemiVariableTableElements();
  54 + setSemiVariableTableElements(getSemiVariableTableElements());
55 55 return timeStamp;
56 56 }
57   -/*
58   -void GetMavenStaticEnergyProcess::initSemiVariableTableElements(){
  57 +
  58 +AMDA::Parameters::SemiVariableTableElements GetMavenStaticEnergyProcess::getSemiVariableTableElements(){
59 59 AMDA::Parameters::SemiVariableTableElements semiVariableTableElements;
60 60 Parameter::InfoList lInfoList = _parameterInput->getInfoList();
61 61 int nbMass = (*lInfoList["nmass"].get())[0];
... ... @@ -77,9 +77,8 @@ void GetMavenStaticEnergyProcess::initSemiVariableTableElements(){
77 77 }
78 78 semiVariableTableElements.energyValues[k]=values;
79 79 }
80   - setSemiVariableTableElements(semiVariableTableElements);
  80 + return semiVariableTableElements ;
81 81 }
82   - * **/
83 82  
84 83 } /* namespace MavenStatic */
85 84 } /* namespace AMDA */
... ...
src/ExternLib/GetMavenStaticEnergy/GetMavenStaticEnergyProcess.hh
... ... @@ -38,7 +38,7 @@ namespace MavenStatic {
38 38 */
39 39 AMDA::Parameters::TimeStamp init();
40 40  
41   - void initSemiVariableTableElements();
  41 + AMDA::Parameters::SemiVariableTableElements getSemiVariableTableElements();
42 42  
43 43 };
44 44  
... ...
src/Info/ParamInfo.cc
... ... @@ -113,7 +113,7 @@ std::vector&lt;std::pair&lt;std::string,std::string&gt;&gt; ParamInfo::getInfoMap(ParameterM
113 113 table.second->addTableInfo(parameterManager, table.first, infoMap);
114 114 }
115 115 }
116   - /**
  116 +
117 117 //adjout des info de tables
118 118 ParameterSPtr param = parameterManager->getParameter(getId());
119 119 Process* lProcess = dynamic_cast<Process*>(param->getDataWriterTemplate().get());
... ... @@ -137,7 +137,6 @@ std::vector&lt;std::pair&lt;std::string,std::string&gt;&gt; ParamInfo::getInfoMap(ParameterM
137 137 }
138 138 }
139 139 }
140   - */
141 140  
142 141  
143 142 }
... ... @@ -169,7 +168,7 @@ std::vector&lt;std::pair&lt;std::string,std::string&gt;&gt; ParamInfo::getInfoMap(ParameterM
169 168 table.second->addTableInfo(parameterManager, table.first, infoMap);
170 169 }
171 170 }
172   - /**
  171 +
173 172 ParameterSPtr pParam = parameterManager->getParameter(getId());
174 173 Process* lProcess = dynamic_cast<Process*>(pParam->getDataWriterTemplate().get());
175 174 if( lProcess != NULL){
... ... @@ -196,7 +195,7 @@ std::vector&lt;std::pair&lt;std::string,std::string&gt;&gt; ParamInfo::getInfoMap(ParameterM
196 195  
197 196 }
198 197 }
199   - */
  198 +
200 199 //Process* lProcess = ServicesServer::getInstance()->getProcess("sampling_classic", &param);
201 200 }
202 201  
... ...
src/Info/ParamTable.cc
... ... @@ -211,8 +211,6 @@ void ParamTable::addVariableTableInfo(ParameterManager * parameterManager, int d
211 211 infoKey.str("");
212 212 infoKey << VARIABLE_PARAMETER_TABLE << linkedParam.first << "[" << i<< "]";
213 213 PUSHINFO(tableInfo, infoKey.str(), linkedParam.second);
214   - AMDA::Parameters::ParameterSPtr variableTableParam = parameterManager->getParameter(linkedParam.second);
215   -
216 214 // adding balib tables if exist
217 215 ParameterSPtr pParam = parameterManager->getParameter(linkedParam.second);
218 216 Process* lProcess = dynamic_cast<Process*>(pParam->getDataWriterTemplate().get());
... ... @@ -223,8 +221,11 @@ void ParamTable::addVariableTableInfo(ParameterManager * parameterManager, int d
223 221 for(auto h:semiVariableTableElements.tableHeader){
224 222 head<<h<<" ";
225 223 }
226   - PUSHINFO(tableInfo , "" , head.str());
  224 + std::string toto="toto";
  225 + PUSHINFO(tableInfo , "TOTO" , toto);
  226 + PUSHINFO(tableInfo , "TOTO" , head.str());
227 227 }
  228 +
228 229 i++;
229 230 }
230 231 }
... ...
src/Parameters/Process.cc
... ... @@ -28,7 +28,7 @@ Process::Process(Parameter &amp;parameter) :
28 28 AMDA::Parameters::DataWriter(parameter)
29 29 ,DataClient()
30 30 ,_operation(NULL),
31   - _refParameterSPtr(ParameterSPtr()), _gapThreshold(NAN), _isUserProcess(false) {
  31 + _refParameterSPtr(ParameterSPtr()), _gapThreshold(NAN), _isUserProcess(false),_isSemiVariableTable(false) {
32 32 }
33 33  
34 34 /**
... ... @@ -42,6 +42,7 @@ Process::Process(const Process &amp;pProcess, Parameter &amp;parameter) :
42 42 , _description(pProcess._description)
43 43 ,_operation(NULL), //No need clone of the operation, it is done in the 'init' method implementation
44 44 _refParameterSPtr(pProcess._refParameterSPtr), _gapThreshold(pProcess._gapThreshold), _isUserProcess(pProcess._isUserProcess)
  45 +, _isSemiVariableTable(pProcess._isSemiVariableTable)
45 46 {
46 47  
47 48 }
... ...
src/Parameters/Process.hh
... ... @@ -18,6 +18,8 @@
18 18 #include "DataWriter.hh"
19 19 #include "DataClient.hh"
20 20 #include "Parameter.hh"
  21 +#include <vector>
  22 +#include <iostream>
21 23  
22 24  
23 25 namespace AMDA {
... ... @@ -29,9 +31,9 @@ namespace Parameters {
29 31 struct Process_exception: virtual AMDA_exception { };
30 32  
31 33 struct SemiVariableTableElements{
32   - std::vector<std::string> tableHeader;
33   - std::map<unsigned int, std::vector<double>> energyValues;
34   -};
  34 + std::vector<std::string> tableHeader;
  35 + std::map<unsigned int, std::vector<double> > energyValues;
  36 + };
35 37  
36 38 class Operation;
37 39  
... ... @@ -42,6 +44,7 @@ class Operation;
42 44 */
43 45 class Process : public AMDA::Parameters::DataWriter, public AMDA::Parameters::DataClient {
44 46 public:
  47 +
45 48 typedef std::vector<std::string > AttributeList;
46 49 /**
47 50 *
... ... @@ -69,6 +72,10 @@ public:
69 72 bool isUserProcess() {
70 73 return _isUserProcess;
71 74 }
  75 +
  76 + bool isSemiVariableTable(){
  77 + return _isSemiVariableTable;
  78 + }
72 79  
73 80 // Set methods
74 81 void setExpression(const std::string& expression) { _expression = expression; }
... ... @@ -83,6 +90,10 @@ public:
83 90 void setIsUserProcess(bool isUserProcess) {
84 91 _isUserProcess = isUserProcess;
85 92 }
  93 +
  94 + void setIsSemiVariableTable(bool isSemiVariableTable){
  95 + _isSemiVariableTable = isSemiVariableTable;
  96 + }
86 97  
87 98 // Others methods
88 99  
... ... @@ -94,16 +105,14 @@ public:
94 105 std::list<std::string> clbInfoList;
95 106 return clbInfoList;
96 107 }
97   -
98   - SemiVariableTableElements getSemiVariableTableElements(){
99   -
100   - return _semiVariableTableElements;
101   - }
  108 +
  109 + virtual SemiVariableTableElements getSemiVariableTableElements(){
  110 + return _semiVariableTableElements;
  111 + };
  112 +
102 113 void setSemiVariableTableElements(SemiVariableTableElements semiVariableTableElements){
103   - _semiVariableTableElements = semiVariableTableElements;
104   -
105   - }
106   -
  114 + _semiVariableTableElements = semiVariableTableElements;
  115 + };
107 116 protected:
108 117 static log4cxx::LoggerPtr _logger;
109 118  
... ... @@ -118,7 +127,8 @@ protected:
118 127 ParameterSPtr _refParameterSPtr;
119 128 double _gapThreshold;
120 129 bool _isUserProcess;
121   - SemiVariableTableElements _semiVariableTableElements;
  130 + bool _isSemiVariableTable;
  131 + SemiVariableTableElements _semiVariableTableElements;
122 132  
123 133 };
124 134  
... ...