casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CacheThread.h
Go to the documentation of this file.
1 //# Copyright (C) 2009
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 
26 #ifndef CACHETHREAD_H_
27 #define CACHETHREAD_H_
28 
34 
36 
37 namespace casa {
38 
39 class PlotMSCacheBase;
40 class PlotMSPlot;
41 
42 class CacheThread : public BackgroundThread {
43 public:
44  CacheThread();
45  void setLoad( bool load );
46  void setSetupPlot( bool usePlot );
47  void setPlot( PlotMSPlot* plot );
48  virtual PlotMSPlot* getPlot();
49  void setCacheBase( PlotMSCacheBase* cacheBase );
50  void setAxes( std::vector<PMS::Axis> axes );
51  void setAxesData( int size );
52  void setAxesData( std::vector<PMS::DataColumn> cachedData );
53  void setName( casacore::String msName );
54  void setSelection( PlotMSSelection selection );
55  void setAveraging( PlotMSAveraging averaging );
56  void setTransformations( PlotMSTransformations transforms );
57  void setCalibration( PlotMSCalibration calibration );
58  virtual ~CacheThread();
59 protected:
60  virtual bool doWork();
61  virtual void finished(){}
62 private:
63  CacheThread( const CacheThread& other );
64  CacheThread operator=( const CacheThread& other );
65 
66  //Log error, set status, and do clean up when an
67  //exception is thrown.
68  void handleError(casacore::String message );
69 
70  bool itsLoad;
73  std::vector<PMS::Axis> workAxes;
74  std::vector<PMS::DataColumn> itsAxesData;
81 };
82 
83 } /* namespace casa */
84 #endif /* CACHETHREAD_H_ */
Specifies averaging parameters for an MS.
PlotMSCalibration itsCalibration
Definition: CacheThread.h:79
casacore::String itsMSName
Definition: CacheThread.h:75
PlotMSAveraging itsAveraging
Definition: CacheThread.h:77
void setCacheBase(PlotMSCacheBase *cacheBase)
void setLoad(bool load)
PlotMSPlot * itsPlot
Definition: CacheThread.h:80
Specifies an casacore::MS selection.
void handleError(casacore::String message)
Log error, set status, and do clean up when an exception is thrown.
size_t size() const
virtual bool doWork()
void setAveraging(PlotMSAveraging averaging)
std::vector< PMS::DataColumn > itsAxesData
Definition: CacheThread.h:74
void setTransformations(PlotMSTransformations transforms)
virtual PlotMSPlot * getPlot()
CacheThread operator=(const CacheThread &other)
std::vector< PMS::Axis > workAxes
Definition: CacheThread.h:73
Class for a single &quot;plot&quot; concept.
Definition: PlotMSPlot.h:57
virtual ~CacheThread()
void setCalibration(PlotMSCalibration calibration)
PlotMSSelection itsSelection
Definition: CacheThread.h:76
void setAxes(std::vector< PMS::Axis > axes)
void setSetupPlot(bool usePlot)
void setSelection(PlotMSSelection selection)
PlotMSCacheBase * itsCache
Definition: CacheThread.h:72
void setName(casacore::String msName)
Specifies averaging parameters for an MS.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Specifies calibration parameters for an MS.
void setAxesData(int size)
void setPlot(PlotMSPlot *plot)
Manages a thread to do a background operation and communicates back to its controller with regard to ...
PlotMSTransformations itsTransformations
Definition: CacheThread.h:78
virtual void finished()
Definition: CacheThread.h:61