00001 //# MSTransformIterator.h: This file contains the interface definition of the MSTransformManager class. 00002 //# 00003 //# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/) 00004 //# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved. 00005 //# Copyright (C) European Southern Observatory, 2011, All rights reserved. 00006 //# 00007 //# This library is free software; you can redistribute it and/or 00008 //# modify it under the terms of the GNU Lesser General Public 00009 //# License as published by the Free software Foundation; either 00010 //# version 2.1 of the License, or (at your option) any later version. 00011 //# 00012 //# This library is distributed in the hope that it will be useful, 00013 //# but WITHOUT ANY WARRANTY, without even the implied warranty of 00014 //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 //# Lesser General Public License for more details. 00016 //# 00017 //# You should have received a copy of the GNU Lesser General Public 00018 //# License along with this library; if not, write to the Free Software 00019 //# Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00020 //# MA 02111-1307 USA 00021 //# $Id: $ 00022 00023 #ifndef MSTransformIterator_H_ 00024 #define MSTransformIterator_H_ 00025 00026 // Where TransformingVi2 interface is defined 00027 #include <msvis/MSVis/TransformingVi2.h> 00028 00029 // Class containing the actual transformation logic 00030 #include <mstransform/MSTransform/MSTransformManager.h> 00031 00032 // VisBuffer class only accessible from this class 00033 #include <mstransform/MSTransform/MSTransformBufferImpl.h> 00034 #include <casa/Utilities/CountedPtr.h> 00035 00036 namespace casa { 00037 00038 class MSTransformIterator : public vi::TransformingVi2 00039 { 00040 00041 public: 00042 00043 MSTransformIterator( vi::ViImplementation2 * inputVii, 00044 SHARED_PTR<MSTransformManager>); 00045 ~MSTransformIterator(); 00046 00047 const MeasurementSet & ms () const {return *transformedMS_p;}; 00048 00049 vi::VisBuffer2 * getVisBuffer (const vi::VisibilityIterator2 *) {return buffer_p;} 00050 vi::VisBuffer2 * getVisBuffer () {return buffer_p;} 00051 00052 void originChunks (); 00053 Bool moreChunks () const; 00054 void nextChunk (); 00055 00056 void origin (); 00057 Bool more () const; 00058 void next (); 00059 00060 void writeFlag (const Cube<Bool> & flag); 00061 void writeFlagRow (const Vector<Bool> & rowflags); 00062 00063 protected: 00064 00065 void propagateChanAvgFlags (const Cube<Bool> &avgFlagCube, Cube<Bool> &expandedFlagCube); 00066 00067 private: 00068 String tmpMSFileName_p; 00069 SHARED_PTR<MSTransformManager> manager_p; 00070 MSTransformBufferImpl *buffer_p; 00071 MeasurementSet *transformedMS_p; 00072 }; 00073 00074 } //# NAMESPACE CASA - END 00075 00076 00077 #endif /* MSTransformIterator_H_ */ 00078