Line data Source code
1 : //# CalibratingVi2FactoryI.cc: Implementation of the CalibratingVi2FactoryI class. 2 : //# 3 : //# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/) 4 : //# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved. 5 : //# Copyright (C) European Southern Observatory, 2011, All rights reserved. 6 : //# 7 : //# This library is free software; you can redistribute it and/or 8 : //# modify it under the terms of the GNU Lesser General Public 9 : //# License as published by the Free software Foundation; either 10 : //# version 2.1 of the License, or (at your option) any later version. 11 : //# 12 : //# This library is distributed in the hope that it will be useful, 13 : //# but WITHOUT ANY WARRANTY, without even the implied warranty of 14 : //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 : //# Lesser General Public License for more details. 16 : //# 17 : //# You should have received a copy of the GNU Lesser General Public 18 : //# License along with this library; if not, write to the Free Software 19 : //# Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20 : //# MA 02111-1307 USA 21 : //# $Id: $ 22 : 23 : #include <msvis/MSVis/CalibratingVi2FactoryI.h> 24 : #include <casacore/casa/Exceptions.h> 25 : 26 : using namespace casacore; 27 : namespace casa { //# NAMESPACE CASA - BEGIN 28 : namespace vi { //# NAMESPACE VI - BEGIN 29 : 30 : CalibratingVi2FactoryI::CalViFacGenerator CalibratingVi2FactoryI::generator_p=0; 31 : CalibratingVi2FactoryI::CalViFac_byRec_Generator CalibratingVi2FactoryI::byRec_generator_p=0; 32 : 33 : 34 : // ----------------------------------------------------------------------- 35 : CalibratingVi2FactoryI* 36 0 : CalibratingVi2FactoryI::generate() { 37 : 38 0 : ThrowIf (generator_p==0, "No CalibratingVi2FactoryI::generator (generic) available!"); 39 : 40 : //cout << "CVFI::generate()" << endl; 41 : 42 0 : return generator_p(); 43 : 44 : } 45 : // ----------------------------------------------------------------------- 46 : CalibratingVi2FactoryI* 47 0 : CalibratingVi2FactoryI::generate(MeasurementSet* ms, 48 : const Record& calrec, 49 : const IteratingParameters& iterpar) { 50 : 51 0 : ThrowIf (byRec_generator_p==0, "No CalibratingVi2FactoryI::generator (by Record) available!"); 52 : 53 : //cout << "CVFI::generate(ms,calrec,iterpar)" << endl; 54 : 55 0 : return byRec_generator_p(ms,calrec,iterpar); 56 : 57 : } 58 : 59 : // ----------------------------------------------------------------------- 60 : Bool 61 8 : CalibratingVi2FactoryI::setGenerator(CalViFacGenerator cvfg) { 62 : 63 8 : generator_p=cvfg; 64 : 65 8 : return true; 66 : 67 : } 68 : // ----------------------------------------------------------------------- 69 : Bool 70 8 : CalibratingVi2FactoryI::set_byRec_Generator(CalViFac_byRec_Generator cvfg) { 71 : 72 8 : byRec_generator_p=cvfg; 73 : 74 8 : return true; 75 : 76 : } 77 : 78 : 79 : } //# NAMESPACE VI - END 80 : } //# NAMESPACE CASA - END 81 : 82 :