##// END OF EJS Templates
Correction for MR
perrinel -
r546:c13ea1918c0c
parent child
Show More
@@ -263,8 +263,7 void VariableController::onDataProvided(QUuid vIdentifier, const SqpRange &range
263 263 const SqpRange &cacheRangeRequested,
264 264 QVector<AcquisitionDataPacket> dataAcquired)
265 265 {
266 auto var = impl->findVariable(vIdentifier);
267 if (var != nullptr) {
266 if (auto var = impl->findVariable(vIdentifier)) {
268 267 var->setRange(rangeRequested);
269 268 var->setCacheRange(cacheRangeRequested);
270 269 qCDebug(LOG_VariableController()) << tr("1: onDataProvided") << rangeRequested;
@@ -284,8 +283,7 void VariableController::onDataProvided(QUuid vIdentifier, const SqpRange &range
284 283
285 284 void VariableController::onVariableRetrieveDataInProgress(QUuid identifier, double progress)
286 285 {
287 auto var = impl->findVariable(identifier);
288 if (var != nullptr) {
286 if (auto var = impl->findVariable(identifier)) {
289 287 impl->m_VariableModel->setDataProgress(var, progress);
290 288 }
291 289 else {
@@ -331,14 +329,14 void VariableController::onAddSynchronized(std::shared_ptr<Variable> variable,
331 329 {
332 330 qCDebug(LOG_VariableController()) << "TORM: VariableController::onAddSynchronized"
333 331 << synchronizationGroupId;
334 auto vToVIdit = impl->m_VariableToIdentifierMap.find(variable);
335 if (vToVIdit != impl->m_VariableToIdentifierMap.cend()) {
336 auto itSynchroGroup
332 auto varToVarIdIt = impl->m_VariableToIdentifierMap.find(variable);
333 if (varToVarIdIt != impl->m_VariableToIdentifierMap.cend()) {
334 auto groupIdToVSGIt
337 335 = impl->m_GroupIdToVariableSynchronizationGroupMap.find(synchronizationGroupId);
338 if (itSynchroGroup != impl->m_GroupIdToVariableSynchronizationGroupMap.cend()) {
336 if (groupIdToVSGIt != impl->m_GroupIdToVariableSynchronizationGroupMap.cend()) {
339 337 impl->m_VariableIdGroupIdMap.insert(
340 std::make_pair(vToVIdit->second, synchronizationGroupId));
341 itSynchroGroup->second->addVariableId(vToVIdit->second);
338 std::make_pair(varToVarIdIt->second, synchronizationGroupId));
339 groupIdToVSGIt->second->addVariableId(varToVarIdIt->second);
342 340 }
343 341 else {
344 342 qCCritical(LOG_VariableController())
@@ -359,13 +357,13 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable>
359 357 {
360 358 // NOTE: oldRange isn't really necessary since oldRange == variable->range().
361 359
362 qCInfo(LOG_VariableController()) << "VariableController::onRequestDataLoading"
360 qCDebug(LOG_VariableController()) << "VariableController::onRequestDataLoading"
363 361 << QThread::currentThread()->objectName();
364 362 // we want to load data of the variable for the dateTime.
365 363 // First we check if the cache contains some of them.
366 364 // For the other, we ask the provider to give them.
367 365
368 foreach (auto var, variables) {
366 for (const auto &var : variables) {
369 367 qCDebug(LOG_VariableController()) << "processRequest for" << var->name();
370 368 impl->processRequest(var, range);
371 369 }
@@ -373,9 +371,9 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable>
373 371 if (synchronise) {
374 372 // Get the group ids
375 373 qCDebug(LOG_VariableController())
376 << "VariableController::onRequestDataLoading for synchro var ENABLE";
374 << "TORM VariableController::onRequestDataLoading for synchro var ENABLE";
377 375 auto groupIds = std::set<QUuid>();
378 foreach (auto var, variables) {
376 for (const auto &var : variables) {
379 377 auto varToVarIdIt = impl->m_VariableToIdentifierMap.find(var);
380 378 if (varToVarIdIt != impl->m_VariableToIdentifierMap.cend()) {
381 379 auto vId = varToVarIdIt->second;
@@ -391,7 +389,7 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable>
391 389 }
392 390
393 391 // We assume here all group ids exist
394 foreach (auto gId, groupIds) {
392 for (const auto &gId : groupIds) {
395 393 auto vSynchronizationGroup = impl->m_GroupIdToVariableSynchronizationGroupMap.at(gId);
396 394 auto vSyncIds = vSynchronizationGroup->getIds();
397 395 qCDebug(LOG_VariableController()) << "Var in synchro group ";
@@ -62,7 +62,9 void AmdaProvider::requestDataLoading(QUuid acqIdentifier, const DataProviderPar
62 62 const auto data = parameters.m_Data;
63 63 for (const auto &dateTime : qAsConst(times)) {
64 64 this->retrieveData(acqIdentifier, dateTime, data);
65 QThread::msleep(200);
65
66 // TORM
67 // QThread::msleep(200);
66 68 }
67 69 }
68 70
@@ -92,7 +94,7 void AmdaProvider::retrieveData(QUuid token, const SqpRange &dateTime, const QVa
92 94 auto endDate = dateFormat(dateTime.m_TEnd);
93 95
94 96 auto url = QUrl{QString{AMDA_URL_FORMAT}.arg(startDate, endDate, productId)};
95 qCInfo(LOG_AmdaProvider()) << tr("AmdaProvider::retrieveData url:") << url;
97 qCInfo(LOG_AmdaProvider()) << tr("TORM AmdaProvider::retrieveData url:") << url;
96 98 auto tempFile = std::make_shared<QTemporaryFile>();
97 99
98 100 // LAMBDA
@@ -128,8 +130,8 void AmdaProvider::retrieveData(QUuid token, const SqpRange &dateTime, const QVa
128 130 auto downloadFileUrl = QUrl{QString{reply->readAll()}};
129 131
130 132
131 qCInfo(LOG_AmdaProvider()) << tr("AmdaProvider::retrieveData downloadFileUrl:")
132 << downloadFileUrl;
133 qCInfo(LOG_AmdaProvider())
134 << tr("TORM AmdaProvider::retrieveData downloadFileUrl:") << downloadFileUrl;
133 135 // Executes request for downloading file //
134 136
135 137 // Creates destination file
General Comments 0
You need to be logged in to leave comments. Login now