From 1453b252dd48768c8c069130e6a6d19c20632636 Mon Sep 17 00:00:00 2001 From: Furkan Date: Thu, 1 Dec 2022 15:37:23 +0100 Subject: [PATCH] Some minor modifications --- src/ParamOutputImpl/Download/DownloadOutput.cc | 37 +++++++++++++++++++++++-------------- test/FitNesseRoot/ReleaseS/SecondPart/ReLease1/SprinT2/UserStory43/.txt | 2 +- test/FitNesseRoot/ReleaseS/TmaAmda/ReLease4/DownloadTableParams/content.txt | 14 +++++++------- 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/src/ParamOutputImpl/Download/DownloadOutput.cc b/src/ParamOutputImpl/Download/DownloadOutput.cc index f965134..75c1a04 100644 --- a/src/ParamOutputImpl/Download/DownloadOutput.cc +++ b/src/ParamOutputImpl/Download/DownloadOutput.cc @@ -168,6 +168,15 @@ namespace AMDA // init parameter LOG4CXX_DEBUG(gLogger, "DownloadOutput::init - " << paramProperties->getOutputId()); _parameterManager.getParameter(paramProperties->getOutputId())->init(this, _timeIntervalList); + + AMDA::Info::ParamInfoSPtr paramInfo = AMDA::Info::ParamMgr::getInstance()->getParamInfoFromId(paramProperties->getOriginalId()); + // adding tableParams + std::map> tables = paramInfo->getTables(); + + if (!tables.empty()) + { + _tableParamsList.push_back(paramProperties->getOriginalId()); + } } catch (...) { @@ -245,20 +254,20 @@ namespace AMDA // build too small interval file if needed if (isNeedToGenerateTooSmallIntervalFile()) buildTooSmallIntervalCatalog(); - // if (!_tableParamsList.empty()) - // { - // std::string filePath = getTableInfoFilePath(_fileWriter->getExtension()); - // if (!_fileWriter->createNewFile(filePath)) - // { - // LOG4CXX_ERROR(_logger, "DownloadOutput::apply : Cannot create table info file " << filePath); - // BOOST_THROW_EXCEPTION(AMDA::Parameters::ParamOutput_exception()); - // } - // _files.push_back(filePath); - // // write info - // writeAMDAInfo(); - // _fileWriter->writeTableParamsInfo(_tableParamsList, 0); - // _fileWriter->finalize(true); - // } + if (!_tableParamsList.empty() && _fileWriter->getExtension() != "cdf") + { + std::string filePath = getTableInfoFilePath(_fileWriter->getExtension()); + if (!_fileWriter->createNewFile(filePath)) + { + LOG4CXX_ERROR(_logger, "DownloadOutput::apply : Cannot create table info file " << filePath); + BOOST_THROW_EXCEPTION(AMDA::Parameters::ParamOutput_exception()); + } + _files.push_back(filePath); + // write info + writeAMDAInfo(); + _fileWriter->writeTableParamsInfo(_tableParamsList, 0); + _fileWriter->finalize(true); + } } catch (...) { diff --git a/test/FitNesseRoot/ReleaseS/SecondPart/ReLease1/SprinT2/UserStory43/.txt b/test/FitNesseRoot/ReleaseS/SecondPart/ReLease1/SprinT2/UserStory43/.txt index 1337964..25f58b1 100644 --- a/test/FitNesseRoot/ReleaseS/SecondPart/ReLease1/SprinT2/UserStory43/.txt +++ b/test/FitNesseRoot/ReleaseS/SecondPart/ReLease1/SprinT2/UserStory43/.txt @@ -6,4 +6,4 @@ # ListStopDate: 0001-01-01T00:00:00:00.000Z # Contact: None # Historic: ; -# Creation Date: 2021-11-05T09:24:47; +# Creation Date: 2022-11-25T08:27:50; diff --git a/test/FitNesseRoot/ReleaseS/TmaAmda/ReLease4/DownloadTableParams/content.txt b/test/FitNesseRoot/ReleaseS/TmaAmda/ReLease4/DownloadTableParams/content.txt index f8331a2..c8c9c26 100644 --- a/test/FitNesseRoot/ReleaseS/TmaAmda/ReLease4/DownloadTableParams/content.txt +++ b/test/FitNesseRoot/ReleaseS/TmaAmda/ReLease4/DownloadTableParams/content.txt @@ -32,29 +32,29 @@ |reference|downloadTable: id 01|id test| |note|!- Paramètre DDServeur avec table variable dans des fichiers ASCII -!| |check|executeWithInfo|${executable}|command|${path}request_01.xml|args|0| -|check|execute|diff|command|output-mav_sta_c0_2_mavpds_sta_c0_swp_ind_2018239000000000.txt ${path}/download_01_REF.txt|args|0| -|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| +|check|execute|diff|command|output-mav_sta_c0_2_2018239000000000.txt ${path}/download_01_REF.txt|args|0| +|check|execute|diff|command|output-mav_sta_c0_2_info_table.txt ${path}/download_table_01_REF.txt|args|0| !|script|TestAmdaCommandLine| |reference|downloadTable: id 02|id test| |note|!- Paramètre DDServeur avec table variable dans des fichiers ASCII -!| |check|executeWithInfo|${executable}|command|${path}request_02.xml|args|0| -|check|execute|diff|command|output-tha_el_sp_tha_esa_l2e_Energy_2015068000000000.txt ${path}/download_02_REF.txt|args|0| +|check|execute|diff|command|output-tha_el_sp_2015068000000000.txt ${path}/download_02_REF.txt|args|0| !|script|TestAmdaCommandLine| |reference|downloadTable: id 03|id test| |note|!- Paramètre DDServeur avec table variable dans des fichiers ASCII -!| |check|executeWithInfo|${executable}|command|${path}request_03.xml|args|0| -|check|execute|diff|command|output-jedi_e90_counts_0_juno_jedi_e090_Mode_2008060032000000.txt ${path}/download_03_REF.txt|args|0| -|check|execute|diff|command|output-jedi_e90_counts_0_juno_jedi_e090_Mode_info_table.txt ${path}/download_table_03_REF.txt|args|0| +|check|execute|diff|command|output-jedi_e90_counts_0_2008060032000000.txt ${path}/download_03_REF.txt|args|0| +|check|execute|diff|command|output-jedi_e90_counts_0_info_table.txt ${path}/download_table_03_REF.txt|args|0| !|script|TestAmdaCommandLine| |reference|downloadTable: id 04|id test| |note|!- Paramètre DDServeur avec table variable dans des fichiers ASCII -!| |check|executeWithInfo|${executable}|command|${path}request_04.xml|args|0| -|check|execute|diff|command|output-mex_els_spec_0_mex_els_all_EnergyTable_2007049190000000.txt ${path}/download_04_REF.txt|args|0| -|check|execute|diff|command|output-mex_els_spec_0_mex_els_all_EnergyTable_info_table.txt ${path}/download_table_04_REF.txt|args|0| +|check|execute|diff|command|output-mex_els_spec_0_2007049190000000.txt ${path}/download_04_REF.txt|args|0| +|check|execute|diff|command|output-mex_els_spec_0_info_table.txt ${path}/download_table_04_REF.txt|args|0| ----- !contents -R2 -g -p -f -h -- libgit2 0.21.2