casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SynthesisIterBot.h
Go to the documentation of this file.
00001 //# SynthesisDeconvolver.h: Imager functionality sits here; 
00002 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#
00025 //# $Id$
00026 
00027 #ifndef SYNTHESIS_SYNTHESISITERBOT_H
00028 #define SYNTHESIS_SYNTHESISITERBOT_H
00029 
00030 #include <casa/aips.h>
00031 #include <casa/OS/Timer.h>
00032 #include <casa/Containers/Record.h>
00033 #include <ms/MeasurementSets/MeasurementSet.h>
00034 #include <casa/Arrays/IPosition.h>
00035 #include <casa/Quanta/Quantum.h>
00036 #include <measures/Measures/MDirection.h>
00037 #include <synthesis/MeasurementEquations/SIIterBot.h>
00038 #include <boost/thread/thread.hpp>
00039 
00040 //#include<casa/random.h>
00041 
00042 #include <boost/scoped_ptr.hpp>
00043 
00044 namespace casa { //# NAMESPACE CASA - BEGIN
00045 
00046 // Forward declarations
00047 class MeasurementSet;
00048 class ViewerProxy;
00049 template<class T> class ImageInterface;
00050 
00051 // <summary> Class that contains functions needed for imager </summary>
00052 
00053 class SynthesisIterBot
00054 {
00055  public:
00056   // Default constructor
00057 
00058   SynthesisIterBot();
00059   ~SynthesisIterBot();
00060 
00061   // Copy constructor and assignment operator
00062 
00063   // launch thread which opens DBus connection...
00064   void openDBus( );
00065 
00066   // make all pure-inputs const
00067   void setupIteration(Record iterpars);
00068 
00069   void setInteractiveMode(Bool interactiveMode);
00070   void   setIterationDetails(Record iterpars);
00071   Record getIterationDetails();
00072   Record getIterationSummary();
00073 
00074   bool cleanComplete();
00075 
00076   Record getSubIterBot();
00077 
00078   void startMinorCycle(Record& initializationRecord);
00079   void endMinorCycle(Record& executionRecord);
00080 
00081   void endMajorCycle();
00082 
00083 protected:
00084 
00085   void pauseForUserInteraction();
00086 
00088 
00089         std::tr1::shared_ptr<SIIterBot_callback> actionRequestSync;
00090         std::tr1::shared_ptr<SIIterBot_state> itsLoopController;
00091 
00093 
00094  private:
00095   static string generateServiceName();
00096   boost::thread  *dbus_thread;
00097   void dbus_thread_launch_pad( );
00098 };
00099 
00100 
00101 } //# NAMESPACE CASA - END
00102 
00103 #endif