casa
$Rev:20696$
|
00001 // -*- C++ -*- 00002 //# CFStore.h: Definition of the CFStore class 00003 //# Copyright (C) 1997,1998,1999,2000,2001,2002,2003 00004 //# Associated Universities, Inc. Washington DC, USA. 00005 //# 00006 //# This library is free software; you can redistribute it and/or modify it 00007 //# under the terms of the GNU Library General Public License as published by 00008 //# the Free Software Foundation; either version 2 of the License, or (at your 00009 //# option) any later version. 00010 //# 00011 //# This library is distributed in the hope that it will be useful, but WITHOUT 00012 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00014 //# License for more details. 00015 //# 00016 //# You should have received a copy of the GNU Library General Public License 00017 //# along with this library; if not, write to the Free Software Foundation, 00018 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00019 //# 00020 //# Correspondence concerning AIPS++ should be addressed as follows: 00021 //# Internet email: aips2-request@nrao.edu. 00022 //# Postal address: AIPS++ Project Office 00023 //# National Radio Astronomy Observatory 00024 //# 520 Edgemont Road 00025 //# Charlottesville, VA 22903-2475 USA 00026 //# 00027 //# $Id$ 00028 #ifndef SYNTHESIS_CFSTORE_H 00029 #define SYNTHESIS_CFSTORE_H 00030 #include <synthesis/TransformMachines/CFDefs.h> 00031 #include <synthesis/TransformMachines/SynthesisError.h> 00032 #include <coordinates/Coordinates/CoordinateSystem.h> 00033 #include <casa/Logging/LogIO.h> 00034 #include <casa/Logging/LogSink.h> 00035 #include <casa/Logging/LogOrigin.h> 00036 #include <casa/Utilities/CountedPtr.h> 00037 #include <images/Images/ImageInterface.h> 00038 #include <synthesis/MSVis/VisBuffer.h> 00039 namespace casa { //# NAMESPACE CASA - BEGIN 00040 using namespace CFDefs; 00041 class CFStore 00042 { 00043 public: 00044 CFStore():data(), rdata(), coordSys(), sampling(), 00045 xSupport(), ySupport(), 00046 maxXSupport(-1), maxYSupport(-1), 00047 pa(), mosPointingPos(0) {}; 00048 00049 CFStore(CFType *dataPtr, CoordinateSystem& cs, Vector<Float>& samp, 00050 Vector<Int>& xsup, Vector<Int>& ysup, Int maxXSup, Int maxYSup, 00051 Quantity PA, Int mosPointing): 00052 data(),rdata(), coordSys(cs), sampling(samp), 00053 xSupport(xsup), ySupport(ysup), maxXSupport(maxXSup), 00054 maxYSupport(maxYSup), pa(PA), mosPointingPos(mosPointing) 00055 {data = new CFType(*dataPtr);}; 00056 00057 ~CFStore() {}; 00058 00059 CFStore& operator=(const CFStore& other); 00060 void show(const char *Mesg=NULL,ostream &os=cerr); 00061 Bool null() {return data.null();}; 00062 void set(const CFStore& other) 00063 { 00064 coordSys = other.coordSys; sampling.assign(other.sampling); 00065 xSupport.assign(other.xSupport); ySupport.assign(other.ySupport); 00066 maxXSupport=other.maxXSupport; maxYSupport=other.maxYSupport; pa=other.pa; 00067 mosPointingPos = other.mosPointingPos; 00068 } 00069 void set(CFType *dataPtr, CoordinateSystem& cs, Vector<Float>& samp, 00070 Vector<Int>& xsup, Vector<Int>& ysup, Int maxXSup, Int maxYSup, 00071 Quantity PA, const Int mosPointing=0) 00072 { 00073 data=dataPtr; coordSys=cs; sampling.assign(samp); 00074 xSupport.assign(xsup); ySupport.assign(ysup); 00075 maxXSupport=maxXSup;maxYSupport=maxYSup; 00076 pa=PA; 00077 mosPointingPos = mosPointing; 00078 } 00079 00080 void resize(Int nw, Bool retainValues=False); 00081 void resize(IPosition imShape, Bool retainValues=False); 00082 00083 00084 CountedPtr<CFType> data; 00085 CountedPtr<CFTypeReal> rdata; 00086 CoordinateSystem coordSys; 00087 Vector<Float> sampling; 00088 Vector<Int> xSupport,ySupport; 00089 Int maxXSupport, maxYSupport; 00090 Quantity pa; 00091 Int mosPointingPos; 00092 }; 00093 } //# NAMESPACE CASA - END 00094 #endif