Source
void ROCTIter::casfparam(Cube<Float>& f,String what) const { iROCTMainCols_->fparamArray(f,what); };
//# CTIter.cc: Implementation of CTIter.h
//# Copyright (C) 2011
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//----------------------------------------------------------------------------
using namespace casacore;
namespace casa { //# NAMESPACE CASA - BEGIN
//----------------------------------------------------------------------------
ROCTIter::ROCTIter(NewCalTable tab, const Block<String>& sortcol) :
sortCols_(sortcol.begin( ),sortcol.end( )),
singleSpw_(false),
calCol_(nullptr),
ti_(nullptr),
inct_(nullptr),
iROCTMainCols_(nullptr),
init_uvw_(false),
thisfield_(-1),
lastfield_(-1),
thistime_(0.0),
lasttime_(0.0)
{
ti_=new TableIterator(tab,sortcol);
// Attach initial accessors:
attach();
calCol_ = new ROCTColumns(tab);
epoch_ = calCol_->timeMeas()(0);
// If SPW a sort column, then
singleSpw_=anyEQ(sortCols_,String("SPECTRAL_WINDOW_ID"));
/*
cout << "singleSpw_ = " << boolalpha << singleSpw_ << endl;
cout << "inct_->nrow() = " << inct_->nrow() << endl;
cout << "this->nrow() = " << this->nrow() << endl;
cout << "iROCTMainCols_->spwId() = " << iROCTMainCols_->spwId().getColumn() << endl;
cout << "iROCTMainCols_->spwId()(0) = " << iROCTMainCols_->spwId()(0) << endl;
cout << "thisSpw() = " << this->thisSpw() << endl;
cout << "done." << endl;
*/
};
//----------------------------------------------------------------------------
ROCTIter::~ROCTIter()
{
if (calCol_!=nullptr) delete calCol_;
if (ti_!=nullptr) delete ti_;
if (iROCTMainCols_!=nullptr) delete iROCTMainCols_;
if (inct_!=nullptr) delete inct_;
};
void ROCTIter::setCTColumns(const NewCalTable& tab) {
delete calCol_;
calCol_ = new ROCTColumns(tab);
}
void ROCTIter::reset() {