Source
xxxxxxxxxx
( (thisType=="plotpoints") && (!isDefined(String("xdata")+String::toString(dat)) || !isDefined(String("ydata")+String::toString(dat)) ) ) )
//# FlagReport.cc: This file contains the implementation of the FlagReport 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: $
using namespace casacore;
namespace casa { //# NAMESPACE CASA - BEGIN
////////////////////////////////////
/// FlagReport implementation ///
////////////////////////////////////
// All FlagReports must have 'type' and 'name' defined.
FlagReport::FlagReport(String type,String name, String title, String xlabel,
String ylabel):Record(),logger_p()
{
logger_p.origin(LogOrigin("FlagReport",__FUNCTION__,WHERE));
// Type of report. Options : none, list, plotraster, plotpoints
if( ! ( type == "list" || type == "none" || type == "plotraster"
|| type == "plotpoints") )
{
logger_p << LogIO::WARN << "Invalid FlagReport type : " << type << ". Setting to 'none' " << LogIO::POST;
type="none";
}
define( RecordFieldId("type") , type );
if( type == "list" ) // List of reports
{
define( RecordFieldId("nreport") , (Int)0 );
}
else // One report
{
define( RecordFieldId("name") , name );
}
// One report of type "plot"
if( type == "plotraster" || type == "plotpoints")
{
define( RecordFieldId("title") , title );
define( RecordFieldId("xlabel") , xlabel );
define( RecordFieldId("ylabel") , ylabel );
define( RecordFieldId("ndata") , (Int)0 );
}
}
FlagReport::FlagReport(String type, String name, const Record &other)
{
assign(other);
logger_p = casacore::LogIO();
// Type of report. Options : none, summary
if( ! ( type == "summary" || type == "rflag" || type == "none" ) )
{
logger_p << LogIO::WARN << "Invalid FlagReport type : " << type << ". Setting to 'none' " << LogIO::POST;
type="none";
}
if( isDefined("type") )
{
logger_p << LogIO::WARN << "Overwriting field 'type' of input record by that supplied in this FlagReport constructor : " << type << LogIO::POST;
}
define( RecordFieldId("type") , type );
if( isDefined("name") )
{
logger_p << LogIO::WARN << "Overwriting field 'name' of input record by that supplied in this FlagReport constructor : " << type << LogIO::POST;
}