casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
FlagReport.h
Go to the documentation of this file.
00001 //# FlagReport.h: This file contains the interface definition of the FlagReport 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 FLAGREPORT_H_
00024 #define FLAGREPORT_H_
00025 
00026 // .casarc interface
00027 #include <casa/System/AipsrcValue.h>
00028 
00029 // Records interface
00030 #include <casa/Containers/Record.h>
00031 
00032 // System utilities (for profiling macros)
00033 #include <casa/OS/HostInfo.h>
00034 #include <sys/time.h>
00035 
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 
00038 // Everything going into the FlagReport is by value
00039 // Everything going out of it is by reference
00040 class FlagReport : public Record
00041 {
00042         public:
00043                 FlagReport(String type=String("none"),String name=String(""), 
00044                                  String title=String(""), 
00045                                  String xlabel=String(""), String ylabel=String("") );
00046                  // TODO : By value. Change to by-reference
00047                 FlagReport(String type, String name, const Record &other); 
00048                 FlagReport(const Record &other);
00049                 ~FlagReport();
00050 
00051                 // Add, query and access reports from a "list" type FlagReport
00052                 Bool addReport(FlagReport inpReport); 
00053                 Int nReport();
00054                 Bool accessReport(Int index, FlagReport &outReport);
00055 
00056                 // Add and query data to plot, for FlagReports of type "plotraster","plotline","plotscatter"
00057                 Bool addData(Array<Float> data);
00058                 //Bool addData(Vector<Float> xdata,Vector<Float> ydata, String label);
00059                 Bool addData(String plottype, Vector<Float> xdata,Vector<Float> ydata, String errortype, Vector<Float> error, String label);
00060                 Int nData();
00061 
00062                 String reportType();
00063                 // Check validity of FlagReport.
00064                 Bool verifyFields();
00065 
00066         protected:
00067 
00068         private:
00069                 casa::LogIO logger_p;
00070 };
00071 
00072 
00073 
00074 
00075 } //# NAMESPACE CASA - END
00076 
00077 #endif /* FLAGDATAHANDLER_H_ */