Commits

C. Enrique Garcia Dabo authored eff9720fb01
The quack is done after the full iterator has been created.

The VisibilityIterator used for preSweep() was reusing the same visibilityIterator_p variable that was later overwritten, creating a dangling object that messed up the status. Fixes partially CAS-9679
No tags

code/flagging/Flagging/FlagMSHandler.cc

Modified
430 430
431 431
432 432 // -----------------------------------------------------------------------
433 433 // Generate Visibility Iterator with a given sort order and time interval
434 434 // -----------------------------------------------------------------------
435 435 bool
436 436 FlagMSHandler::generateIterator()
437 437 {
438 438 if (!iteratorGenerated_p)
439 439 {
440 - // Do quack pre-sweep
441 - if (mapScanStartStop_p)
442 - {
443 - if (visibilityIterator_p) delete visibilityIterator_p;
444 - visibilityIterator_p = new vi::VisibilityIterator2(*selectedMeasurementSet_p,
445 - vi::SortColumns (sortOrder_p, true),
446 - true,NULL, timeInterval_p);
447 - preSweep();
448 - }
449 440
450 441 if (asyncio_enabled_p)
451 442 {
452 443 // Set preFetchColumns
453 444 prefetchColumns_p = new VisBufferComponents2();
454 445 prefetchColumns_p->operator +=(VisBufferComponent2::FlagCube);
455 446 prefetchColumns_p->operator +=(VisBufferComponent2::FlagRow);
456 447 prefetchColumns_p->operator +=(VisBufferComponent2::NRows);
457 448 prefetchColumns_p->operator +=(VisBufferComponent2::FieldId);
458 449
495 486 if(enableChanAvg_p)
496 487 {
497 488 chanAvgFactory.reset(new vi::ChannelAverageTVILayerFactory(chanAvgOptions_p));
498 489 factories.push_back(chanAvgFactory.get());
499 490 }
500 491
501 492 //Create the final visibility iterator
502 493 visibilityIterator_p = new vi::VisibilityIterator2(factories);
503 494 }
504 495
496 + // Do quack pre-sweep
497 + if (mapScanStartStop_p)
498 + preSweep();
505 499
506 500 // Set the table data manager (ISM and SSM) cache size to the full column size, for
507 501 // the columns ANTENNA1, ANTENNA2, FEED1, FEED2, TIME, INTERVAL, FLAG_ROW, SCAN_NUMBER and UVW
508 502 if (slurp_p) visibilityIterator_p->slurp();
509 503
510 504 // Apply channel selection
511 505 // CAS-3959: Channel selection is now going to be handled at the FlagAgent level
512 506 // applyChannelSelection(visibilityIterator_p);
513 507
514 508 // Group all the time stamps in one single buffer

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut