CFStore.h

Go to the documentation of this file.
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_TRANSFORM2_CFSTORE_H
00029 #define SYNTHESIS_TRANSFORM2_CFSTORE_H
00030 #include <synthesis/TransformMachines2/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 <msvis/MSVis/VisBuffer2.h>
00039 namespace casa { //# NAMESPACE CASA - BEGIN
00040   using namespace vi;
00041   namespace refim{
00042   using namespace CFDefs;
00043   class CFStore
00044   {
00045   public:
00046     CFStore():data(), rdata(), coordSys(), sampling(), 
00047               xSupport(), ySupport(), 
00048               maxXSupport(-1), maxYSupport(-1),
00049               pa(), mosPointingPos(0) {};
00050 
00051     CFStore(CFType *dataPtr, CoordinateSystem& cs, Vector<Float>& samp,
00052             Vector<Int>& xsup, Vector<Int>& ysup, Int maxXSup, Int maxYSup,
00053             Quantity PA, Int mosPointing):
00054       data(),rdata(), coordSys(cs), sampling(samp),
00055       xSupport(xsup), ySupport(ysup), maxXSupport(maxXSup),
00056       maxYSupport(maxYSup), pa(PA), mosPointingPos(mosPointing)
00057     {data = new CFType(*dataPtr);};
00058 
00059     ~CFStore() {};
00060 
00061     CFStore& operator=(const CFStore& other);
00062     void show(const char *Mesg=NULL,ostream &os=cerr);
00063     Bool null() {return data.null();};
00064     void set(const CFStore& other)
00065     {
00066       coordSys = other.coordSys; sampling.assign(other.sampling); 
00067       xSupport.assign(other.xSupport); ySupport.assign(other.ySupport);
00068       maxXSupport=other.maxXSupport;  maxYSupport=other.maxYSupport; pa=other.pa;
00069       mosPointingPos = other.mosPointingPos;
00070     }
00071     void set(CFType *dataPtr, CoordinateSystem& cs, Vector<Float>& samp,
00072              Vector<Int>& xsup, Vector<Int>& ysup, Int maxXSup, Int maxYSup,
00073              Quantity PA, const Int mosPointing=0)
00074     {
00075       data=dataPtr; coordSys=cs; sampling.assign(samp); 
00076       xSupport.assign(xsup); ySupport.assign(ysup);
00077       maxXSupport=maxXSup;maxYSupport=maxYSup;
00078       pa=PA;
00079       mosPointingPos = mosPointing;
00080     }
00081 
00082     void resize(Int nw, Bool retainValues=False);
00083     void resize(IPosition imShape, Bool retainValues=False);
00084 
00085 
00086     CountedPtr<CFType> data;
00087     CountedPtr<CFTypeReal> rdata;
00088     CoordinateSystem coordSys;
00089     Vector<Float> sampling;
00090     Vector<Int> xSupport,ySupport;
00091     Int maxXSupport, maxYSupport;
00092     Quantity pa;
00093     Int mosPointingPos;
00094   };
00095 } //# NAMESPACE CASA - END
00096 }
00097 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1