casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
VLATimeFilter.h
Go to the documentation of this file.
00001 //# VLATimeFilter.h: 
00002 //# Copyright (C) 1999,2000
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //#
00027 //# $Id$
00028 
00029 #ifndef NRAO_VLATIMEFILTER_H
00030 #define NRAO_VLATIMEFILTER_H
00031 
00032 #include <casa/aips.h>
00033 #include <nrao/VLA/VLAFilter.h>
00034 #include <casa/Quanta/MVEpoch.h>
00035 
00036 #include <casa/namespace.h>
00037 class VLALogicalRecord;
00038 
00039 // <summary>
00040 // </summary>
00041 
00042 // <use visibility=export>
00043 
00044 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00045 // </reviewed>
00046 
00047 // <prerequisite>
00048 //   <li> SomeClass
00049 //   <li> SomeOtherClass
00050 //   <li> some concept
00051 // </prerequisite>
00052 //
00053 // <etymology>
00054 // </etymology>
00055 //
00056 // <synopsis>
00057 // Note the start and stop times are the values at the center if the
00058 // integration. 
00059 // </synopsis>
00060 //
00061 // <example>
00062 // </example>
00063 //
00064 // <motivation>
00065 // </motivation>
00066 //
00067 // <templating arg=T>
00068 //    <li>
00069 //    <li>
00070 // </templating>
00071 //
00072 // <thrown>
00073 //    <li>
00074 //    <li>
00075 // </thrown>
00076 //
00077 // <todo asof="yyyy/mm/dd">
00078 //   <li> add this feature
00079 //   <li> fix this bug
00080 //   <li> start discussion of this possible extension
00081 // </todo>
00082 
00083 class VLATimeFilter: public VLAFilter
00084 {
00085 public:
00086   // The default constructor creats a filter that does not filter
00087   // anything. ie., the passThru() function always returns True;
00088   VLATimeFilter();
00089 
00090   // Creates a filter that filters all records except those with a observation
00091   // time that is between the specified start and end times. The reference
00092   // frame is always assumed to be TAI.
00093   VLATimeFilter(const MVEpoch& startTime, const MVEpoch& stopTime);
00094 
00095   // The copy constructor uses copy semantics.
00096   VLATimeFilter(const VLATimeFilter& other);
00097 
00098   // The destructor is trivial
00099   virtual ~VLATimeFilter();
00100 
00101   // The assignment operator uses copy semantics.
00102   VLATimeFilter& operator=(const VLATimeFilter& other);
00103 
00104   // Reset the start time.
00105   void startTime(const MVEpoch& startTime);
00106 
00107   // Reset the stop time.
00108   void stopTime(const MVEpoch& startTime);
00109 
00110   // returns True if the supplied record has an observation time
00111   // that is between the specified start and end times.
00112   virtual Bool passThru(const VLALogicalRecord& record) const;
00113 
00114   // Return a pointer to a copy of the VLATimeFilter object upcast to a
00115   // VLAFilter object. The class that uses this function is responsible for
00116   // deleting the pointer. This is used to implement a virtual copy
00117   // constructor.
00118   virtual VLAFilter* clone() const;
00119 
00120   // Function which checks the internal data of this class for correct
00121   // dimensionality and consistant values. Returns True if everything is fine
00122   // otherwise returns False.
00123   virtual Bool ok() const;
00124 
00125 private:
00126   MVEpoch itsStart;
00127   MVEpoch itsStop;
00128 };
00129 #endif
00130 
00131