Source
xxxxxxxxxx
//# RFABase.h: this defines RFABase
//# Copyright (C) 2000,2001
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//# $Id$
namespace casa { //# NAMESPACE CASA - BEGIN
// <summary>
// Abstract RedFlagger Agent base class
// </summary>
// <use visibility=local>
// <reviewed reviewer="" date="" tests="" demos="">
// </reviewed>
// <synopsis>
// RFABase defines the interface for a flagging agent
// </synopsis>
//
// <motivation>
// RedFlagger works with objetcs called flagging agents. This class
// defines the complete interface between RedFlagger and agents.
// </motivation>
//
// <todo asof="2001/04/16">
// <li> add this feature
// </todo>
class RFABase : public FlaggerEnums
{
public:
// iteration modes
enum IterMode {
STOP = 0,
DRY = 1,
DATA = 2,
CONT = 3
};
// An agent is always constructed from a chunk stats accessor, and a
// record of parameters. No other constructors are defined, and no others
// may be used.
RFABase ( RFChunkStats &ch,const casacore::RecordInterface &parm );
// Destructor
virtual ~RFABase () {};
// This method is called after constructing the agent.
virtual void init ();
// This method is called before iterating over a chunk, to inquire the
// expected memory use. Should return the max desired memory footprint, in MB.
// Available physical memory is divided between agents in proportion to their
// requests.
virtual casacore::uInt estimateMemoryUse () { return 1; }
// Called before iterating over a chunk. Returns true if agent will
// process this chunk, or false if this the agent is unable to process it.
// (this can happen if, e.g., the requisite correlations are not present).
// The casacore::Int & maxmem argument is the number of MB memory which is still
// available in the memory pool. The agent class should plan its memory