Line data Source code
1 : //# MSTransformIterator.h: This file contains the interface definition of the MSTransformManager class. 2 : //# 3 : //# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/) 4 : //# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved. 5 : //# Copyright (C) European Southern Observatory, 2011, All rights reserved. 6 : //# 7 : //# This library is free software; you can redistribute it and/or 8 : //# modify it under the terms of the GNU Lesser General Public 9 : //# License as published by the Free software Foundation; either 10 : //# version 2.1 of the License, or (at your option) any later version. 11 : //# 12 : //# This library is distributed in the hope that it will be useful, 13 : //# but WITHOUT ANY WARRANTY, without even the implied warranty of 14 : //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 : //# Lesser General Public License for more details. 16 : //# 17 : //# You should have received a copy of the GNU Lesser General Public 18 : //# License along with this library; if not, write to the Free Software 19 : //# Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20 : //# MA 02111-1307 USA 21 : //# $Id: $ 22 : 23 : #ifndef MSTransformIterator_H_ 24 : #define MSTransformIterator_H_ 25 : 26 : // Where TransformingVi2 interface is defined 27 : #include <msvis/MSVis/TransformingVi2.h> 28 : 29 : // Class containing the actual transformation logic 30 : #include <mstransform/MSTransform/MSTransformManager.h> 31 : 32 : // VisBuffer class only accessible from this class 33 : #include <mstransform/MSTransform/MSTransformBufferImpl.h> 34 : #include <casacore/casa/Utilities/CountedPtr.h> 35 : 36 : namespace casa { 37 : 38 : class MSTransformIterator : public vi::TransformingVi2 39 : { 40 : 41 : public: 42 : 43 : MSTransformIterator( vi::ViImplementation2 * inputVii, 44 : std::shared_ptr<MSTransformManager>); 45 : ~MSTransformIterator(); 46 : 47 0 : const casacore::MeasurementSet & ms () const {return *transformedMS_p;}; 48 : 49 0 : virtual vi::VisBuffer2 * getVisBuffer () const {return buffer_p;} 50 : 51 : virtual casacore::String ViiType() const ; 52 : 53 : ViImplementation2 * getInputViIterator () const { return inputVii_p; } 54 : 55 : void originChunks (); 56 : casacore::Bool moreChunks () const; 57 : void nextChunk (); 58 : 59 : void origin (); 60 : casacore::Bool more () const; 61 : void next (); 62 : 63 : void writeFlag (const casacore::Cube<casacore::Bool> & flag); 64 : void writeFlagRow (const casacore::Vector<casacore::Bool> & rowflags); 65 : 66 : protected: 67 : 68 : void propagateChanAvgFlags (const casacore::Cube<casacore::Bool> &avgFlagCube, casacore::Cube<casacore::Bool> &expandedFlagCube); 69 : 70 : private: 71 : casacore::String tmpMSFileName_p; 72 : std::shared_ptr<MSTransformManager> manager_p; 73 : MSTransformBufferImpl *buffer_p; 74 : casacore::MeasurementSet *transformedMS_p; 75 : }; 76 : 77 : } //# NAMESPACE CASA - END 78 : 79 : 80 : #endif /* MSTransformIterator_H_ */ 81 :