Source
xxxxxxxxxx
for (myAntennaPairMapIterator=flagDataHandler_p->getAntennaPairMap()->begin(); myAntennaPairMapIterator != flagDataHandler_p->getAntennaPairMap()->end(); ++myAntennaPairMapIterator)
//# FlagAgentBase.h: This file contains the implementation of the FlagAgentBase class.
//#
//# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
//# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved.
//# Copyright (C) European Southern Observatory, 2011, All rights reserved.
//#
//# This library is free software; you can redistribute it and/or
//# modify it under the terms of the GNU Lesser General Public
//# License as published by the Free software Foundation; either
//# version 2.1 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
//# Lesser General Public License for more details.
//#
//# You should have received a copy of the GNU Lesser General Public
//# License along with this library; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
//# MA 02111-1307 USA
//# $Id: $
// Headers of every concrete agent, needed for the factory method (create)
using namespace casacore;
namespace casa { //# NAMESPACE CASA - BEGIN
////////////////////////////////////
/// FlagAgentBase implementation ///
////////////////////////////////////
FlagAgentBase::FlagAgentBase(FlagDataHandler *dh, Record config, uShort iterationApproach, Bool writePrivateFlagCube, Bool flag):
logger_p(new LogIO(LogOrigin("FlagAgentBase",__FUNCTION__,WHERE)))
{
// Initialize logger
if (config.fieldNumber ("loglevel") >= 0)
{
logLevel_p = (LogIO::Command)config.asuChar("loglevel");
}
else if (agentName_p.empty())
{
logLevel_p = LogIO::NORMAL;
}
// Initialize members
initialize();
// Set iteration approach
iterationApproach_p = iterationApproach;
// Set private flag cube (needed for flag extension)
writePrivateFlagCube_p = writePrivateFlagCube;
// Retrieve apply mode
if (config.fieldNumber ("apply") >= 0)
{
apply_p = config.asBool("apply");
}
else
{
apply_p = true;
}
// Set apply/unapply
if (apply_p == true)
{
flag_p = flag;
}
else
{
flag_p = !flag;