casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Private Attributes
casa::RFABase Class Reference

Abstract RedFlagger Agent base class. More...

#include <RFABase.h>

Inheritance diagram for casa::RFABase:
casa::FlaggerEnums casa::RFAFlagCubeBase casa::RFADiffBase casa::RFANewMedianClip casa::RFASelector casa::RFASpectralRej casa::RFATimeFreqCrop casa::RFAUVBinner casa::RFADiffMapBase casa::RFAFlagExaminer casa::RFAFreqMedian casa::RFATimeMedian

List of all members.

Public Types

enum  IterMode {
  STOP,
  DRY,
  DATA,
  CONT
}
 iteration modes More...

Public Member Functions

 RFABase (RFChunkStats &ch, const RecordInterface &parm)
 An agent is always constructed from a chunk stats accessor, and a record of parameters.
virtual ~RFABase ()
 Destructor.
virtual void init ()
 This method is called after constructing the agent.
virtual uInt estimateMemoryUse ()
 This method is called before iterating over a chunk, to inquire the expected memory use.
virtual Bool newChunk (Int &)
 Called before iterating over a chunk.
virtual void endChunk ()
 Called once finished with a chunk.
virtual void startData (bool)
 Called before starting a data pass on a chunk.
virtual void startDry (bool)
 Called before starting a dry pass on a chunk.
virtual void startFlag (bool)
 Called before starting the fetch-flags pass.
virtual IterMode endData ()
 Called after a pass is completed successfully (i.e., not stopped by start or iter methods).
virtual IterMode endDry ()
 Called after a dry pass is complete.
virtual void endFlag ()
 Called after a flag pass is complete.
virtual void endRows (uInt)
 Called at end of time chunk.
virtual IterMode iterTime (uInt)
 Iteration methods for a data pass.
virtual IterMode iterRow (uInt)
 iterRow() is called once per each row in the VisBuffer.
virtual IterMode iterDry (uInt)
 Iteration method for a dry pass.
virtual void iterFlag (uInt)
 Iteration method for a flag pass.
virtual String getDesc ()
 called to obtain a short description of this RFA
virtual String getStats ()
 called (before endChunk()) to obtain a statistics report
virtual void printFlaggingReport ()
virtual String getID ()
const Stringname ()
 returns the name of this RFA (set in myname)
Bool isActive ()
 returns the active status
LogIOlogSink ()
 accessor to a LogIO for this agent
virtual Record getResult ()
virtual void finalize ()
virtual void initialize ()
 Initialize chunk.
virtual void initializeIter (uInt)
virtual void finalizeIter (uInt)
virtual void setNAgent (uInt n)
virtual void setOnlySelector (bool only_sel)

Static Public Member Functions

static void setIndexingBase (uInt base)
 static method for setting the indexing base for agent arguments

Protected Member Functions

uInt num (StatEnums which)
RFlagWord corrMask ()

Static Protected Member Functions

static uInt indexingBase ()
 global flag indicates that Glish (1-based) indexing is in use for agent arguments

Protected Attributes

uInt nAgent
RFChunkStatschunk
Record params
String myname
bool only_selector
RFlagWord corrmask
 Bit mask of correlations which are used & flagged by this RFA.
Bool active
 flag: agent is active for this chunk (set in newChunk)
LogIO os

Static Private Attributes

static uInt indexing_base

Detailed Description

Abstract RedFlagger Agent base class.

Intended use:

Internal

Synopsis

RFABase defines the interface for a flagging agent

Motivation

RedFlagger works with objetcs called flagging agents. This class defines the complete interface between RedFlagger and agents.

To Do

Definition at line 59 of file RFABase.h.


Member Enumeration Documentation

iteration modes

Enumerator:
STOP 
DRY 
DATA 
CONT 

Definition at line 63 of file RFABase.h.


Constructor & Destructor Documentation

casa::RFABase::RFABase ( RFChunkStats ch,
const RecordInterface parm 
)

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.

virtual casa::RFABase::~RFABase ( ) [inline, virtual]

Destructor.

Definition at line 76 of file RFABase.h.


Member Function Documentation

RFlagWord casa::RFABase::corrMask ( ) [inline, protected]

Definition at line 188 of file RFABase.h.

References corrmask.

Referenced by casa::RFADiffMapBase::newCorrMask().

virtual void casa::RFABase::endChunk ( ) [inline, virtual]
virtual IterMode casa::RFABase::endData ( ) [inline, virtual]

Called after a pass is completed successfully (i.e., not stopped by start or iter methods).

Return value: STOP to stop, DATA for another data pass, DRY for another dry pass.

Reimplemented in casa::RFADiffBase, casa::RFATimeFreqCrop, casa::RFASpectralRej, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFAFlagCubeBase, and casa::RFATimeMedian.

Definition at line 115 of file RFABase.h.

References STOP.

virtual IterMode casa::RFABase::endDry ( ) [inline, virtual]

Called after a dry pass is complete.

Reimplemented in casa::RFADiffBase, casa::RFAUVBinner, casa::RFANewMedianClip, and casa::RFAFlagCubeBase.

Definition at line 118 of file RFABase.h.

References STOP.

virtual void casa::RFABase::endFlag ( ) [inline, virtual]

Called after a flag pass is complete.

Reimplemented in casa::RFAFlagExaminer.

Definition at line 121 of file RFABase.h.

virtual void casa::RFABase::endRows ( uInt  ) [inline, virtual]

Called at end of time chunk.

Reimplemented in casa::RFASelector.

Definition at line 124 of file RFABase.h.

virtual uInt casa::RFABase::estimateMemoryUse ( ) [inline, virtual]

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.

Reimplemented in casa::RFADiffBase, casa::RFASelector, casa::RFASpectralRej, casa::RFAUVBinner, casa::RFANewMedianClip, and casa::RFAFlagCubeBase.

Definition at line 85 of file RFABase.h.

virtual void casa::RFABase::finalize ( ) [inline, virtual]

Reimplemented in casa::RFAFlagExaminer.

Definition at line 166 of file RFABase.h.

virtual void casa::RFABase::finalizeIter ( uInt  ) [inline, virtual]

Reimplemented in casa::RFAFlagExaminer.

Definition at line 170 of file RFABase.h.

virtual String casa::RFABase::getDesc ( ) [inline, virtual]
virtual String casa::RFABase::getID ( ) [inline, virtual]

Reimplemented in casa::RFAFlagExaminer, and casa::RFAFlagCubeBase.

Definition at line 152 of file RFABase.h.

References String.

virtual Record casa::RFABase::getResult ( ) [inline, virtual]

Reimplemented in casa::RFAFlagExaminer.

Definition at line 164 of file RFABase.h.

virtual String casa::RFABase::getStats ( ) [inline, virtual]

called (before endChunk()) to obtain a statistics report

Reimplemented in casa::RFAFlagCubeBase.

Definition at line 148 of file RFABase.h.

uInt casa::RFABase::indexingBase ( ) [inline, static, protected]

global flag indicates that Glish (1-based) indexing is in use for agent arguments

Definition at line 204 of file RFABase.h.

References indexing_base.

virtual void casa::RFABase::init ( ) [virtual]

This method is called after constructing the agent.

virtual void casa::RFABase::initialize ( ) [inline, virtual]

Initialize chunk.

Reimplemented in casa::RFAFlagExaminer.

Definition at line 168 of file RFABase.h.

virtual void casa::RFABase::initializeIter ( uInt  ) [inline, virtual]

Reimplemented in casa::RFAFlagExaminer.

Definition at line 169 of file RFABase.h.

returns the active status

Definition at line 157 of file RFABase.h.

References active.

virtual IterMode casa::RFABase::iterDry ( uInt  ) [inline, virtual]

Iteration method for a dry pass.

Called once per each time slot. Return value: STOP to finish iterating, CONT/DRY to continue, or DATA to cancel the dry pass and request another data pass.

Reimplemented in casa::RFADiffBase, casa::RFAUVBinner, casa::RFANewMedianClip, and casa::RFAFlagCubeBase.

Definition at line 140 of file RFABase.h.

References CONT.

virtual void casa::RFABase::iterFlag ( uInt  ) [inline, virtual]

Iteration method for a flag pass.

Called once per each VisBuffer.

Reimplemented in casa::RFATimeFreqCrop, casa::RFASelector, casa::RFAFlagCubeBase, and casa::RFAFlagExaminer.

Definition at line 143 of file RFABase.h.

virtual IterMode casa::RFABase::iterRow ( uInt  ) [inline, virtual]

iterRow() is called once per each row in the VisBuffer.

Iterating over rows is perhaps preferrable in terms of performance, at least for data iterations.

Reimplemented in casa::RFAFreqMedian, casa::RFATimeFreqCrop, casa::RFASelector, casa::RFASpectralRej, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFAFlagExaminer, and casa::RFATimeMedian.

Definition at line 135 of file RFABase.h.

References CONT.

virtual IterMode casa::RFABase::iterTime ( uInt  ) [inline, virtual]

Iteration methods for a data pass.

Either or both may be implemented. iterTime() is called once for each new VisBuffer (= new time slot) Return value: STOP to finish iterating, CONT/DATA to continue, or DRY to cancel the data pass and request a dry pass.

Reimplemented in casa::RFADiffMapBase, casa::RFADiffBase, casa::RFATimeFreqCrop, casa::RFASpectralRej, casa::RFASelector, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFAFlagCubeBase, and casa::RFATimeMedian.

Definition at line 130 of file RFABase.h.

References CONT.

LogIO & casa::RFABase::logSink ( ) [inline]

accessor to a LogIO for this agent

Definition at line 214 of file RFABase.h.

References os.

const String & casa::RFABase::name ( ) [inline]

returns the name of this RFA (set in myname)

Definition at line 218 of file RFABase.h.

References myname.

virtual Bool casa::RFABase::newChunk ( Int ) [inline, virtual]

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 Int & maxmem argument is the number of MB memory which is still available in the memory pool. The agent class should plan its memory use accordingly, and subtract its expected memory use from maxmem. In effect, the agent "reserves" some amount of memory. This is used by RedFlagger to contain the total memory footprint. Note that only a rough reckoning is sufficient, so only bother estimating the biggest data structures. See implementations in RFADiffBase and RFATimeMedian for good examples. nAgent is the total number of agents.

Reimplemented in casa::RFAFreqMedian, casa::RFADiffBase, casa::RFATimeFreqCrop, casa::RFAFlagExaminer, casa::RFASelector, casa::RFASpectralRej, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFAFlagCubeBase, and casa::RFATimeMedian.

Definition at line 98 of file RFABase.h.

References active, and casa::False.

uInt casa::RFABase::num ( StatEnums  which) [inline, protected]

Definition at line 182 of file RFABase.h.

References chunk, and casa::RFChunkStats::num().

Referenced by casa::RFATimeMedian::slider(), and casa::RFANewMedianClip::slider().

virtual void casa::RFABase::printFlaggingReport ( ) [inline, virtual]

Definition at line 150 of file RFABase.h.

void casa::RFABase::setIndexingBase ( uInt  base) [inline, static]

static method for setting the indexing base for agent arguments

Definition at line 209 of file RFABase.h.

References indexing_base.

virtual void casa::RFABase::setNAgent ( uInt  n) [inline, virtual]

Definition at line 172 of file RFABase.h.

References nAgent.

virtual void casa::RFABase::setOnlySelector ( bool  only_sel) [inline, virtual]

Definition at line 173 of file RFABase.h.

References only_selector.

virtual void casa::RFABase::startData ( bool  ) [inline, virtual]
virtual void casa::RFABase::startDry ( bool  ) [inline, virtual]

Called before starting a dry pass on a chunk.

Reimplemented in casa::RFADiffBase, casa::RFAUVBinner, casa::RFANewMedianClip, and casa::RFAFlagCubeBase.

Definition at line 107 of file RFABase.h.

virtual void casa::RFABase::startFlag ( bool  ) [inline, virtual]

Called before starting the fetch-flags pass.

Reimplemented in casa::RFATimeFreqCrop, casa::RFAFlagExaminer, and casa::RFAFlagCubeBase.

Definition at line 110 of file RFABase.h.


Member Data Documentation

flag: agent is active for this chunk (set in newChunk)

Definition at line 191 of file RFABase.h.

Referenced by isActive(), and newChunk().

Bit mask of correlations which are used & flagged by this RFA.

This mask is used to (a) interpret the pre-flags of the FLAG column, and (b) apply the resulting flags to the FLAG column

Reimplemented in casa::RFAFlagCubeBase.

Definition at line 182 of file RFABase.h.

Referenced by corrMask().

Definition at line 201 of file RFABase.h.

Referenced by indexingBase(), and setIndexingBase().

Definition at line 179 of file RFABase.h.

Referenced by name().

Definition at line 173 of file RFABase.h.

Referenced by setNAgent().

bool casa::RFABase::only_selector [protected]

Definition at line 180 of file RFABase.h.

Referenced by setOnlySelector().

LogIO casa::RFABase::os [protected]

Definition at line 193 of file RFABase.h.

Referenced by logSink().

Definition at line 178 of file RFABase.h.


The documentation for this class was generated from the following file: