CFStore.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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 <msvis/MSVis/VisBuffer.h>
00039 namespace casa {
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 }
00094 #endif