Source
MSIter2(const casacore::Block<casacore::MeasurementSet>& mss, const casacore::Block<int>& sortColumns,
//# MSIter2.h: MSIter w/ smarter interval handling
//# Copyright (C) 1996,1999,2000,2001,2002
//# 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
//#
//# $Id$
namespace casa { //# NAMESPACE CASA - BEGIN
namespace vi { //# NAMESPACE VI - BEGIN
//# forward decl
//class MSColumns;
//class TableIterator;
// <summary>
// Small helper class to specify an 'interval' comparison
// </summary>
// <synopsis>
// Small helper class to specify an 'interval' comparison for table iteration
// by time interval.
// </synopsis>
class MSSmartInterval : public casacore::MSInterval
{
public:
explicit MSSmartInterval(casacore::Double interval,
casacore::Vector<casacore::Double>& timeboundaries);
virtual ~MSSmartInterval() {}
virtual void setOffset(casacore::Double offset);
virtual int comp(const void * obj1, const void * obj2) const;
private:
// Local versions of MSInterval::interval_p,offset_p so we
// can avoid function calls and obj copies in comp()
casacore::Double interval2_;
mutable casacore::Double offset2_;
// A list of enforced interval time boundaries (e.g., scan bounds).
// the interval grid will be re-registered to each
// of the values in this Vector as supplied times cross them
casacore::Vector<casacore::Double> timeBounds_;
int nBounds_;
// Is specified interval effectively zero?
casacore::Bool zeroInterval_;
// Utility variables used in comp
mutable casacore::Bool found_;
mutable int bidx_;
mutable double t1_,t2_;
};
// <summary>
// An iterator class for MeasurementSets
// </summary>
// <use visibility=export>
// <prerequisite>
// <li> <linkto class="MeasurementSet:description">MeasurementSet</linkto>
// </prerequisite>
//
// <etymology>
// MSIter stands for the MeasurementSet Iterator class.