casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DistributedSynthesisIterBot.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 //# DistributedSynthesisIterBot.h: Parallel imaging iteration control
3 //# Copyright (C) 2016
4 //# Associated Universities, Inc. Washington DC, USA.
5 //#
6 //# This library is free software; you can redistribute it and/or modify it
7 //# under the terms of the GNU Library General Public License as published by
8 //# the Free Software Foundation; either version 2 of the License, or (at your
9 //# option) any later version.
10 //#
11 //# This library is distributed in the hope that it will be useful, but WITHOUT
12 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 //# License for more details.
15 //#
16 //# You should have received a copy of the GNU Library General Public License
17 //# along with this library; if not, write to the Free Software Foundation,
18 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19 //#
20 //# Correspondence concerning AIPS++ should be addressed as follows:
21 //# Internet email: aips2-request@nrao.edu.
22 //# Postal address: AIPS++ Project Office
23 //# National Radio Astronomy Observatory
24 //# 520 Edgemont Road
25 //# Charlottesville, VA 22903-2475 USA
26 //#
27 #ifndef DISTRIBUTED_SYNTHESIS_SYNTHESISITERBOT_H_
28 #define DISTRIBUTED_SYNTHESIS_SYNTHESISITERBOT_H_
29 
30 #include <casa/aips.h>
31 #include <casa/OS/Timer.h>
32 #include <casa/Containers/Record.h>
34 #include <casa/Arrays/IPosition.h>
35 #include <casa/Quanta/Quantum.h>
38 
39 //#include<casa/random.h>
42 
43 #include <thread>
44 
45 namespace casacore{
46 
47 class MeasurementSet;
48 template<class T> class ImageInterface;
49 }
50 
51 namespace casa { //# NAMESPACE CASA - BEGIN
52 
53 // Forward declarations
54 class ViewerProxy;
55 
56 // <summary> Class that contains functions needed for imager </summary>
57 
59 {
60 public:
61  // Default constructor
62 
65 
66  // Copy constructor and assignment operator
67 
68  // launch thread which opens DBus connection...
69  void openDBus();
70 
71  // make all pure-inputs const
72  void setupIteration(casacore::Record iterpars);
73 
74  void setInteractiveMode(casacore::Bool interactiveMode);
75  virtual void setIterationDetails(casacore::Record iterpars);
78 
79  int cleanComplete();
80 
82 
83  void startMinorCycle(const casacore::Vector<casacore::Record> &initializationRecords);
84 
85  void startMinorCycle(const casacore::Record &initializationRecord) {
87  v[0] = initializationRecord;
88  startMinorCycle(v);
89  };
90 
91  void endMinorCycle(const casacore::Vector<casacore::Record> &executionRecords);
92 
93  void endMinorCycle(const casacore::Record &executionRecord) {
95  v[0] = executionRecord;
96  endMinorCycle(v);
97  };
98 
99  void endMajorCycle();
100 
101  void changeStopFlag( casacore::Bool stopflag );
102 
103  virtual void pauseForUserInteraction();
104 
105 protected:
107 
108  std::shared_ptr<SIIterBot_callback> actionRequestSync;
109  std::shared_ptr<DistSIIterBot_state> itsLoopController;
110 
112 
113 private:
114  std::thread *dbus_thread;
115  void dbus_thread_launch_pad( );
116 
118  /* casacore::Vector<casacore::String> itsImageList;
119  casacore::Vector<casacore::Int> itsNTermList;
120  casacore::Vector<casacore::Int> itsActionCodes;
121  casacore::CountedPtr<InteractiveMasking> itsInteractiveMasker;
122  */
123 };
124 
125 
128 {
129 public:
130  // Default constructor
131 
133 
134  void setIterationDetails(casacore::Record iterpars);
136 
137 private:
142 
143  bool is_root;
144 };
145 
146 
147 } //# NAMESPACE CASA - END
148 
149 #endif // DISTRIBUTED_SYNTHESIS_SYNTHESISITERBOT_H_
A 1-D Specialization of the Array class.
void setInteractiveMode(casacore::Bool interactiveMode)
int MPI_Comm
Definition: MPIGlue.h:59
std::shared_ptr< DistSIIterBot_state > itsLoopController
void openDBus()
Copy constructor and assignment operator.
casacore::CountedPtr< InteractiveMasking > itsInteractiveMasker
casacore::Vector< casacore::String > itsImageList
void changeStopFlag(casacore::Bool stopflag)
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
void setIterationDetails(casacore::Record iterpars)
void endMinorCycle(const casacore::Record &executionRecord)
void endMinorCycle(const casacore::Vector< casacore::Record > &executionRecords)
void startMinorCycle(const casacore::Record &initializationRecord)
DistributedSynthesisIterBot(MPI_Comm comm)
Default constructor.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
Class that contains functions needed for imager.
casacore::Record getIterationSummary()
void startMinorCycle(const casacore::Vector< casacore::Record > &initializationRecords)
virtual void setIterationDetails(casacore::Record iterpars)
DistributedSynthesisIterBotWithOldGUI(MPI_Comm comm)
Default constructor.
casacore::Vector< casacore::Bool > itsMultiTermList
void setupIteration(casacore::Record iterpars)
make all pure-inputs const
*std::shared_ptr< SIIterBot_callback > actionRequestSync
casacore::Record getIterationDetails()
casacore::Record getSubIterBot()
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42