casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
FlagAgentElevation.h
Go to the documentation of this file.
00001 //# FlagAgentElevation.h: This file contains the interface definition of the FlagAgentElevation class.
00002 //#
00003 //#  CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
00004 //#  Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved.
00005 //#  Copyright (C) European Southern Observatory, 2011, All rights reserved.
00006 //#
00007 //#  This library is free software; you can redistribute it and/or
00008 //#  modify it under the terms of the GNU Lesser General Public
00009 //#  License as published by the Free software Foundation; either
00010 //#  version 2.1 of the License, or (at your option) any later version.
00011 //#
00012 //#  This library is distributed in the hope that it will be useful,
00013 //#  but WITHOUT ANY WARRANTY, without even the implied warranty of
00014 //#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 //#  Lesser General Public License for more details.
00016 //#
00017 //#  You should have received a copy of the GNU Lesser General Public
00018 //#  License along with this library; if not, write to the Free Software
00019 //#  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00020 //#  MA 02111-1307  USA
00021 //# $Id: $
00022 
00023 #ifndef FlagAgentElevation_H_
00024 #define FlagAgentElevation_H_
00025 
00026 #include <flagging/Flagging/FlagAgentBase.h>
00027 
00028 namespace casa { //# NAMESPACE CASA - BEGIN
00029 
00030 class FlagAgentElevation : public FlagAgentBase {
00031 
00032 public:
00033 
00034         FlagAgentElevation(FlagDataHandler *dh, Record config, Bool writePrivateFlagCube = false, Bool flag = true);
00035         ~FlagAgentElevation();
00036 
00037 protected:
00038 
00039         // Common functionality for each visBuffer (don't repeat at the row level)
00040         void preProcessBuffer(const vi::VisBuffer2 &visBuffer);
00041 
00042         // Common preProcessing code for the single/multiple agent cases
00043         void preProcessBufferCore(const vi::VisBuffer2 &visBuffer);
00044 
00045         // Compute flags afor a given mapped visibility point
00046         bool computeRowFlags(const vi::VisBuffer2 &visBuffer, FlagMapper &flags, uInt row);
00047 
00048         // Parse configuration parameters
00049         void setAgentParameters(Record config);
00050 
00051 private:
00052 
00054         Double lowerlimit_p;
00055         Double upperlimit_p;
00056 
00057         // Declaration of static members for common pre-processing
00058         uShort agentNumber_p;
00059         static vector< vector<Double> > antennaPointingMap_p;
00060         static casa::async::Mutex staticMembersMutex_p;
00061         static vector<bool> startedProcessing_p;
00062         static bool preProcessingDone_p;
00063         static uShort nAgents_p;
00064 };
00065 
00066 
00067 } //# NAMESPACE CASA - END
00068 
00069 #endif /* FlagAgentElevation_H_ */
00070