Commit 1453b252dd48768c8c069130e6a6d19c20632636

Authored by Erdogan Furkan
1 parent c2e1eb0f

Some minor modifications

src/ParamOutputImpl/Download/DownloadOutput.cc
... ... @@ -168,6 +168,15 @@ namespace AMDA
168 168 // init parameter
169 169 LOG4CXX_DEBUG(gLogger, "DownloadOutput::init - " << paramProperties->getOutputId());
170 170 _parameterManager.getParameter(paramProperties->getOutputId())->init(this, _timeIntervalList);
  171 +
  172 + AMDA::Info::ParamInfoSPtr paramInfo = AMDA::Info::ParamMgr::getInstance()->getParamInfoFromId(paramProperties->getOriginalId());
  173 + // adding tableParams
  174 + std::map<int, boost::shared_ptr<AMDA::Info::ParamTable>> tables = paramInfo->getTables();
  175 +
  176 + if (!tables.empty())
  177 + {
  178 + _tableParamsList.push_back(paramProperties->getOriginalId());
  179 + }
171 180 }
172 181 catch (...)
173 182 {
... ... @@ -245,20 +254,20 @@ namespace AMDA
245 254 // build too small interval file if needed
246 255 if (isNeedToGenerateTooSmallIntervalFile())
247 256 buildTooSmallIntervalCatalog();
248   - // if (!_tableParamsList.empty())
249   - // {
250   - // std::string filePath = getTableInfoFilePath(_fileWriter->getExtension());
251   - // if (!_fileWriter->createNewFile(filePath))
252   - // {
253   - // LOG4CXX_ERROR(_logger, "DownloadOutput::apply : Cannot create table info file " << filePath);
254   - // BOOST_THROW_EXCEPTION(AMDA::Parameters::ParamOutput_exception());
255   - // }
256   - // _files.push_back(filePath);
257   - // // write info
258   - // writeAMDAInfo();
259   - // _fileWriter->writeTableParamsInfo(_tableParamsList, 0);
260   - // _fileWriter->finalize(true);
261   - // }
  257 + if (!_tableParamsList.empty() && _fileWriter->getExtension() != "cdf")
  258 + {
  259 + std::string filePath = getTableInfoFilePath(_fileWriter->getExtension());
  260 + if (!_fileWriter->createNewFile(filePath))
  261 + {
  262 + LOG4CXX_ERROR(_logger, "DownloadOutput::apply : Cannot create table info file " << filePath);
  263 + BOOST_THROW_EXCEPTION(AMDA::Parameters::ParamOutput_exception());
  264 + }
  265 + _files.push_back(filePath);
  266 + // write info
  267 + writeAMDAInfo();
  268 + _fileWriter->writeTableParamsInfo(_tableParamsList, 0);
  269 + _fileWriter->finalize(true);
  270 + }
262 271 }
263 272 catch (...)
264 273 {
... ...
test/FitNesseRoot/ReleaseS/SecondPart/ReLease1/SprinT2/UserStory43/.txt
... ... @@ -6,4 +6,4 @@
6 6 # ListStopDate: 0001-01-01T00:00:00:00.000Z
7 7 # Contact: None
8 8 # Historic: ;
9   -# Creation Date: 2021-11-05T09:24:47;
  9 +# Creation Date: 2022-11-25T08:27:50;
... ...
test/FitNesseRoot/ReleaseS/TmaAmda/ReLease4/DownloadTableParams/content.txt
... ... @@ -32,29 +32,29 @@
32 32 |reference|downloadTable: id 01|id test|
33 33 |note|!- Paramètre DDServeur avec table variable dans des fichiers ASCII -!|
34 34 |check|executeWithInfo|${executable}|command|${path}request_01.xml|args|0|
35   -|check|execute|diff|command|output-mav_sta_c0_2_mavpds_sta_c0_swp_ind_2018239000000000.txt ${path}/download_01_REF.txt|args|0|
36   -|check|execute|diff|command|output-mav_sta_c0_2_mavpds_sta_c0_swp_ind_info_table.txt ${path}/download_table_01_REF.txt|args|0|
  35 +|check|execute|diff|command|output-mav_sta_c0_2_2018239000000000.txt ${path}/download_01_REF.txt|args|0|
  36 +|check|execute|diff|command|output-mav_sta_c0_2_info_table.txt ${path}/download_table_01_REF.txt|args|0|
37 37  
38 38  
39 39 !|script|TestAmdaCommandLine|
40 40 |reference|downloadTable: id 02|id test|
41 41 |note|!- Paramètre DDServeur avec table variable dans des fichiers ASCII -!|
42 42 |check|executeWithInfo|${executable}|command|${path}request_02.xml|args|0|
43   -|check|execute|diff|command|output-tha_el_sp_tha_esa_l2e_Energy_2015068000000000.txt ${path}/download_02_REF.txt|args|0|
  43 +|check|execute|diff|command|output-tha_el_sp_2015068000000000.txt ${path}/download_02_REF.txt|args|0|
44 44  
45 45 !|script|TestAmdaCommandLine|
46 46 |reference|downloadTable: id 03|id test|
47 47 |note|!- Paramètre DDServeur avec table variable dans des fichiers ASCII -!|
48 48 |check|executeWithInfo|${executable}|command|${path}request_03.xml|args|0|
49   -|check|execute|diff|command|output-jedi_e90_counts_0_juno_jedi_e090_Mode_2008060032000000.txt ${path}/download_03_REF.txt|args|0|
50   -|check|execute|diff|command|output-jedi_e90_counts_0_juno_jedi_e090_Mode_info_table.txt ${path}/download_table_03_REF.txt|args|0|
  49 +|check|execute|diff|command|output-jedi_e90_counts_0_2008060032000000.txt ${path}/download_03_REF.txt|args|0|
  50 +|check|execute|diff|command|output-jedi_e90_counts_0_info_table.txt ${path}/download_table_03_REF.txt|args|0|
51 51  
52 52 !|script|TestAmdaCommandLine|
53 53 |reference|downloadTable: id 04|id test|
54 54 |note|!- Paramètre DDServeur avec table variable dans des fichiers ASCII -!|
55 55 |check|executeWithInfo|${executable}|command|${path}request_04.xml|args|0|
56   -|check|execute|diff|command|output-mex_els_spec_0_mex_els_all_EnergyTable_2007049190000000.txt ${path}/download_04_REF.txt|args|0|
57   -|check|execute|diff|command|output-mex_els_spec_0_mex_els_all_EnergyTable_info_table.txt ${path}/download_table_04_REF.txt|args|0|
  56 +|check|execute|diff|command|output-mex_els_spec_0_2007049190000000.txt ${path}/download_04_REF.txt|args|0|
  57 +|check|execute|diff|command|output-mex_els_spec_0_info_table.txt ${path}/download_table_04_REF.txt|args|0|
58 58  
59 59 -----
60 60 !contents -R2 -g -p -f -h
... ...