casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VLATimeFilter.h
Go to the documentation of this file.
1 //# VLATimeFilter.h:
2 //# Copyright (C) 1999,2000
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id$
28 
29 #ifndef NRAO_VLATIMEFILTER_H
30 #define NRAO_VLATIMEFILTER_H
31 
32 #include <casa/aips.h>
33 #include <nrao/VLA/VLAFilter.h>
34 #include <casa/Quanta/MVEpoch.h>
35 
36 #include <casa/namespace.h>
37 class VLALogicalRecord;
38 
39 // <summary>
40 // </summary>
41 
42 // <use visibility=export>
43 
44 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
45 // </reviewed>
46 
47 // <prerequisite>
48 // <li> SomeClass
49 // <li> SomeOtherClass
50 // <li> some concept
51 // </prerequisite>
52 //
53 // <etymology>
54 // </etymology>
55 //
56 // <synopsis>
57 // Note the start and stop times are the values at the center if the
58 // integration.
59 // </synopsis>
60 //
61 // <example>
62 // </example>
63 //
64 // <motivation>
65 // </motivation>
66 //
67 // <templating arg=T>
68 // <li>
69 // <li>
70 // </templating>
71 //
72 // <thrown>
73 // <li>
74 // <li>
75 // </thrown>
76 //
77 // <todo asof="yyyy/mm/dd">
78 // <li> add this feature
79 // <li> fix this bug
80 // <li> start discussion of this possible extension
81 // </todo>
82 
83 class VLATimeFilter: public VLAFilter
84 {
85 public:
86  // The default constructor creats a filter that does not filter
87  // anything. ie., the passThru() function always returns true;
88  VLATimeFilter();
89 
90  // Creates a filter that filters all records except those with a observation
91  // time that is between the specified start and end times. The reference
92  // frame is always assumed to be TAI.
94 
95  // The copy constructor uses copy semantics.
96  VLATimeFilter(const VLATimeFilter& other);
97 
98  // The destructor is trivial
99  virtual ~VLATimeFilter();
100 
101  // The assignment operator uses copy semantics.
102  VLATimeFilter& operator=(const VLATimeFilter& other);
103 
104  // Reset the start time.
105  void startTime(const casacore::MVEpoch& startTime);
106 
107  // Reset the stop time.
108  void stopTime(const casacore::MVEpoch& startTime);
109 
110  // returns true if the supplied record has an observation time
111  // that is between the specified start and end times.
112  virtual casacore::Bool passThru(const VLALogicalRecord& record) const;
113 
114  // Return a pointer to a copy of the VLATimeFilter object upcast to a
115  // VLAFilter object. The class that uses this function is responsible for
116  // deleting the pointer. This is used to implement a virtual copy
117  // constructor.
118  virtual VLAFilter* clone() const;
119 
120  // casacore::Function which checks the internal data of this class for correct
121  // dimensionality and consistant values. Returns true if everything is fine
122  // otherwise returns false.
123  virtual casacore::Bool ok() const;
124 
125 private:
128 };
129 #endif
130 
131 
This class interprets a VLA logical record.
virtual ~VLATimeFilter()
The destructor is trivial.
void stopTime(const casacore::MVEpoch &startTime)
Reset the stop time.
VLATimeFilter()
The default constructor creats a filter that does not filter anything.
casacore::MVEpoch itsStop
casacore::MVEpoch itsStart
virtual casacore::Bool ok() const
casacore::Function which checks the internal data of this class for correct dimensionality and consis...
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
VLATimeFilter & operator=(const VLATimeFilter &other)
The assignment operator uses copy semantics.
void startTime(const casacore::MVEpoch &startTime)
Reset the start time.
A class for high precision time.
Definition: MVEpoch.h:90
virtual VLAFilter * clone() const
Return a pointer to a copy of the VLATimeFilter object upcast to a VLAFilter object.
virtual casacore::Bool passThru(const VLALogicalRecord &record) const
returns true if the supplied record has an observation time that is between the specified start and e...