casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotLogger.h
Go to the documentation of this file.
1 //# PlotLogger.h: Classes to perform various logging actions for the plotter.
2 //# Copyright (C) 2009
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id: $
27 #ifndef PLOTLOGGER_H_
28 #define PLOTLOGGER_H_
29 
31 
34 
35 #include <map>
36 #include <time.h>
37 #include <vector>
38 
39 namespace casa {
40 
41 //# Forward declarations
42 class PlotCanvas;
43 class Plotter;
44 
45 
46 // Superclass for all messages going through the PlotLogger. This class has
47 // been refactored to just be a thin layer on top of LogMessage.
49 public:
50  // Static //
51 
52  // Default event type.
53  static const int DEFAULT_EVENT_TYPE;
54 
55 
56  // Non-Static //
57 
58  // Constructor which takes an optional priority.
60 
61  // Constructor which takes the origin(s) and an optional priority.
62  PlotLogMessage(const casacore::String& origin1, const casacore::String& origin2,
64 
65  // Constructor which takes the origin(s), the message, and an optional
66  // priority.
67  PlotLogMessage(const casacore::String& origin1, const casacore::String& origin2,
69 
70  // Copy constructor.
72 
73  // Destructor.
74  virtual ~PlotLogMessage();
75 
76 
77  // Returns the event type of this message.
78  virtual int eventType() const;
79 
80 protected:
81  // Event type, either a value from PlotLogger::Event, or a custom
82  // user-defined value.
84 };
85 
86 
87 // Used to report time and memory measurements. This functionality can be
88 // accessed either directly with a PlotLogMeasurement object or indirectly
89 // through the PlotLogger class. Message is:
90 // END.\tTime: [time] [timeUnits]. casacore::Memory: [memory] [memoryUnits].
91 // If the measurement has not been ended, calls stopMeasurement() first.
93 public:
94  // Static //
95 
96  // Available time units. Currently only seconds because that's all that
97  // C++ natively supports.
98  enum TimeUnit {
100  };
101 
102  // Available memory units.
103  enum MemoryUnit {
105  };
106 
107  // Default units.
108  // <group>
111  // </group>
112 
113  // Get a string representation of the given time/memory unit.
114  // <group>
117  // </group>
118 
119 
120  // Non-Static //
121 
122  // Constructor which takes the origin(s), optional time and memory
123  // units, and an optional priority. Also calls startMeasurement().
124  PlotLogMeasurement(const casacore::String& origin1, const casacore::String& origin2,
128 
129  // Copy constructor.
131 
132  // Destructor.
134 
135 
136  // Returns the time/memory when the measurement started.
137  // <group>
138  time_t startTime() const;
139  unsigned int startMemory() const;
140  // </group>
141 
142  // Returns the time/memory difference between when the measurement started
143  // and when the measurement ended. Invalid if the measurement was never
144  // started and ended.
145  // <group>
146  double time() const;
147  double memory() const;
148  // </group>
149 
150  // Returns the time/memory units for this measurement.
151  // <group>
152  TimeUnit timeUnit() const;
153  MemoryUnit memoryUnit() const;
154  // </group>
155 
156  // Starts the measurement by setting the start time and memory.
157  // Measurement automatically begins when the object is constructed, but
158  // can be restarted as desired.
159  void startMeasurement();
160 
161  // Calculates the measurements from the last starting point to this point,
162  // and generates the log message.
163  void stopMeasurement();
164 
165 private:
166  // Start time
167  time_t m_startTime;
168 
169  // Start memory
170  unsigned int m_startMemory;
171 
172  // casacore::Time and memory differences
173  double m_time, m_memory;
174 
175  // casacore::Time unit
177 
178  // casacore::Memory unit
180 };
181 
182 
183 // Used to report located indices. Basically just a container for the results
184 // of a PlotCanvas::locate.
186 public:
187  // Static //
188 
189  // Convenience access to PlotCanvas::locate() to return a PlotLogLocate
190  // message.
191  static PlotLogLocate canvasLocate(PlotCanvas* canvas,
192  const PlotRegion& region);
193 
194 
195  // Non-Static //
196 
197  // Constructor which takes the two origins, the region that was located,
198  // and the located indices (see PlotCanvas::locate()). If
199  // deleteIndicesOnDestruction is true, the given indices vector will be
200  // deleted when this message is destroyed. This should be used with care
201  // if multiple PlotLogLocates using the same located indices are being
202  // used.
203  PlotLogLocate(const casacore::String& origin1, const casacore::String& origin2,
204  const PlotRegion& locateRegion,
205  std::vector<std::vector<std::pair<unsigned int,unsigned int> > >* locatedIndices,
207  bool deleteIndicesOnDestruction = true);
208 
209  // Copy constructor. NOTE: will set the deleteIndicesOnDestruction flag on
210  // the original to false so that the indices won't be deleted from out
211  // under the copy.
213 
214  // Destructor.
215  ~PlotLogLocate();
216 
217 
218  // Returns the region that was located.
219  const PlotRegion& locateRegion() const;
220 
221  // Returns the total number of points that were located.
222  unsigned int numLocatedIndices() const;
223 
224  // Returns the number of plots that were searched.
225  unsigned int numSearchedPlots() const;
226 
227  // Returns the located indices.
228  std::vector<std::vector<std::pair<unsigned int, unsigned int> > >* indices() const;
229 
230  // Returns the located indices for the plot at the given index, or NULL for
231  // invalid.
232  std::vector<std::pair<unsigned int, unsigned int> >* plotIndices(
233  unsigned int index) const;
234 
235  // Returns whether or not this message will delete the indices vector on
236  // destruction or not.
237  bool willDeleteIndices() const;
238 
239 private:
240  // Region.
242 
243  // Indices.
244  std::vector<std::vector<std::pair<unsigned int, unsigned int> > >* m_indices;
245 
246  // Should delete indices.
248 };
249 
250 
251 // Subclass of PlotLogMessage to unify messages for method entering/exiting.
253 public:
254  // Constructor which takes the class and method names, a flag for whether
255  // the method is entering or exiting, and an optional additional message
256  // and priority.
257  PlotLogMethod(const casacore::String& className, const casacore::String& methodName,
258  bool entering, const casacore::String& message = casacore::String(),
260 
261  // Destructor.
262  ~PlotLogMethod();
263 };
264 
265 
266 // Subclass of PlotLogMessage to unify messages for object creation/deletion.
268 public:
269  // Constructor which takes the class name and object address, a flag for
270  // whether the object is being created or destroyed, and an optional
271  // additional message and priority.
272  PlotLogObject(const casacore::String& className, void* address, bool creation,
275 
276  // Destructor.
277  ~PlotLogObject();
278 };
279 
280 
281 // Subclass of casacore::LogFilterInterface to filter on both event flags and minimum
282 // priority.
284 public:
285  // Constructor which takes optional event flags and minimum priority.
287 
288  // Destructor.
290 
291  // Implements casacore::LogFilterInterface::clone().
293 
294  // Implements casacore::LogFilterInterface::pass().
295  casacore::Bool pass(const casacore::LogMessage& message) const;
296 
297  // Gets/Sets the event flags.
298  // <group>
299  int eventFlags() const;
300  void setEventFlags(int flags);
301  // </group>
302 
303  // Gets/Sets the minimum priority.
304  // <group>
307  // </group>
308 
309 private:
310  // Event flags.
312 
313  // Minimum priority.
315 };
316 
317 
318 // A PlotLogger is used to log messages to an underlying CASA log object, as
319 // well as provide access to different logging functionality like measurements.
320 // PlotLogger is associated with a single Plotter object and should be used by
321 // all children of that Plotter (canvases, plot items, etc.) to report their
322 // behavior if the proper flag is turned on. The logger can also filter out
323 // messages by priority. Therefore a message must BOTH have its event type
324 // flag turned on, AND meet the priority minimum in order to be posted to the
325 // log. The exception to this is for the MSG_* event types, which are logged
326 // as long as they meet the filtered priority requirement. The actual log can
327 // either be the global sink, or can be set to a file.
328 class PlotLogger {
329 public:
330  // Static //
331 
332  // Event types //
333 
334  // Event types that are always allowed.
335  // <group>
336  static const int MSG_INFO = -1;
337  static const int MSG_WARN = -2;
338  static const int MSG_ERROR = -3;
339  // </group>
340 
341  // Miscellaneous debugging messages.
342  static const int MSG_DEBUG = 1;
343 
344  // Replotting/redrawing the whole GUI.
345  static const int DRAW_TOTAL = 2;
346 
347  // Replotting/redrawing each plot item.
348  static const int DRAW_INDIVIDUAL = 4;
349 
350  // Entering/exiting major methods.
351  static const int METHODS_MAJOR = 8;
352 
353  // Creation/deletion of major objects.
354  static const int OBJECTS_MAJOR = 16;
355 
356  // Exporting canvases to file.
357  static const int EXPORT_TOTAL = 32;
358 
359 
360  // No events.
361  static const int NO_EVENTS = 0;
362 
363  // All events as a flag.
364  static int ALL_EVENTS_FLAG();
365 
366  // All events as a vector.
367  static std::vector<int> ALL_EVENTS();
368 
369 
370  // Registers an extended event type with the given name and optional
371  // priority and returns its value.
372  static int REGISTER_EVENT_TYPE(const casacore::String& name,
374 
375  // Unregisters the given extended event type. If a priority has been set,
376  // it is NOT removed.
377  // <group>
378  static void UNREGISTER_EVENT_TYPE(int event);
379  static void UNREGISTER_EVENT_TYPE(const casacore::String& name);
380  // </group>
381 
382  // Returns all the event names.
383  static std::vector<casacore::String> EVENT_NAMES();
384 
385  // Converts between an event type and its name.
386  // <group>
387  static casacore::String EVENT(int type);
388  static int EVENT(const casacore::String& name);
389  // </group>
390 
391  // Returns an event flag from the given vector.
392  // <group>
393  static int FLAG_FROM_EVENTS(const std::vector<int>& events);
394  static int FLAG_FROM_EVENTS(const std::vector<casacore::String>& names);
395  // </group>
396 
397  // Returns an event flag for all events that meet the given minimum
398  // priority.
399  static int FLAG_FROM_PRIORITY(casacore::LogMessage::Priority minPriority);
400 
401 
402  // Gets/Sets the message priority for the given log event. Uses a default
403  // if the event has not been set.
404  // <group>
406  static void SET_EVENT_PRIORITY(int event, casacore::LogMessage::Priority priority);
407  // </group>
408 
409 
410  // Disables the global sink until enableGlobalSink() is called. Can be
411  // used when something posts undesirably to both the local and global logs.
412  static void disableGlobalSink();
413 
414  // Re-enables the global sink. See disableGlobalSink().
415  static void enableGlobalSink();
416 
417 
418  // Non-Static //
419 
420  // Constructor which takes the Plotter this logger is associated with. The
421  // global log sink is used, and the minimum priority filter is set.
424 
425  // Destructor.
426  virtual ~PlotLogger();
427 
428 
429  // Log IO Methods //
430 
431  // Gets the log sink interface.
432  // <group>
435  // </group>
436 
437  // Gets a copy of the log sink interface, IF it is not the global.
439 
440  // Gets/Sets the log sink file location. If the filename is empty, it
441  // means the global sink.
442  // <group>
443  const casacore::String& sinkLocation() const;
444  void setSinkLocation(const casacore::String& logFile);
445  // </group>
446 
447  // Returns true if the logger is currently using the global sink, false
448  // otherwise.
449  bool usingGlobalSink() const { return sinkLocation().empty(); }
450 
451 
452  // Filtering Methods //
453 
454  // Gets/Sets the log filter priority level.
455  // <group>
458  // </group>
459 
460  // Gets/Sets the log filter event flag for a single event type.
461  // <group>
462  bool filterEventFlag(int flag) const;
463  void setFilterEventFlag(int flag, bool on);
464  // </group>
465 
466  // Gets/Sets the log filter event flag(s). The flag should be a bitwise-or
467  // of one or more values in PlotLogger events and any extended event types.
468  // <group>
469  int filterEventFlags() const;
470  void setFilterEventFlags(int flags);
471  // <group>
472 
473 
474  // Message Methods //
475 
476  // Posts the given message to the underlying log sink.
477  // <group>
478  void postMessage(const PlotLogMessage& message);
479  void postMessage(const casacore::String& origin1, const casacore::String& origin2,
480  const casacore::String& message,
481  int eventType = PlotLogMessage::DEFAULT_EVENT_TYPE);
482  // </group>
483 
484 
485  // Measurement Methods //
486 
487  // Marks the logger to begin a time/memory measurement. Measurement marks
488  // can be recursive. Returns a generic message saying that measurement has
489  // begun, which will be also posted to the log if postStartMessage is true.
490  PlotLogMessage markMeasurement(const casacore::String& origin1,const casacore::String& origin2,
491  int eventType = PlotLogMessage::DEFAULT_EVENT_TYPE,
492  bool postStartMessage = true);
493 
494  // Gets the measurement since the last mark. The message will also be
495  // posted to the log if postReleaseMessage is true.
496  PlotLogMeasurement releaseMeasurement(bool postReleaseMessage = true);
497 
498 
499  // Locate Methods //
500 
501  // Calls locate on the given canvas and returns the result as a message
502  // that will also be posted if postLocateMessage is true.
503  PlotLogLocate locate(PlotCanvas* canvas, const PlotRegion& region,
504  int eventType = MSG_INFO, bool postLocateMessage = true);
505 
506 private:
507  // Log sink.
509 
510  // Log filter.
512 
513  // Log sink location.
515 
516  // Current measurement marks.
517  std::vector<PlotLogMeasurement> m_measurements;
518 
519 
520  // Static //
521 
522  // Registered extended types.
523  static std::vector<int> EXTENDED_TYPES;
524 
525  // Registered extended type names.
526  static std::vector<casacore::String> EXTENDED_NAMES;
527 
528  // casacore::Map from log event to priority.
529  static std::map<int, casacore::LogMessage::Priority> EVENT_PRIORITIES;
530 
531  // Disabled old global filter, or null.
533 };
535 
536 }
537 
538 #endif /* PLOTLOGGER_H_ */
unsigned int numSearchedPlots() const
Returns the number of plots that were searched.
casacore::CountedPtr< casacore::LogSinkInterface > m_logger
Log sink.
Definition: PlotLogger.h:508
static const int NO_EVENTS
No events.
Definition: PlotLogger.h:361
static std::vector< int > ALL_EVENTS()
All events as a vector.
void setFilterEventFlags(int flags)
int m_eventType
Event type, either a value from PlotLogger::Event, or a custom user-defined value.
Definition: PlotLogger.h:83
Abstract base class for filtering LogMessages.
void setFilterEventFlag(int flag, bool on)
static int FLAG_FROM_EVENTS(const std::vector< int > &events)
Returns an event flag from the given vector.
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
static void SET_EVENT_PRIORITY(int event, casacore::LogMessage::Priority priority)
static const int DRAW_TOTAL
Replotting/redrawing the whole GUI.
Definition: PlotLogger.h:345
static const int DRAW_INDIVIDUAL
Replotting/redrawing each plot item.
Definition: PlotLogger.h:348
virtual ~PlotLogMessage()
Destructor.
casacore::LogMessage::Priority filterMinPriority() const
Filtering Methods //.
time_t m_startTime
Start time.
Definition: PlotLogger.h:167
static const TimeUnit DEFAULT_TIME_UNIT
Default units.
Definition: PlotLogger.h:109
Subclass of PlotLogMessage to unify messages for object creation/deletion.
Definition: PlotLogger.h:267
PlotLogMessage(int eventType=DEFAULT_EVENT_TYPE)
Non-Static //.
casacore::String m_loggerLocation
Log sink location.
Definition: PlotLogger.h:514
static const int MSG_DEBUG
Miscellaneous debugging messages.
Definition: PlotLogger.h:342
static const int MSG_ERROR
Definition: PlotLogger.h:338
const PlotRegion & locateRegion() const
Returns the region that was located.
virtual Type type()
Return the type enum.
std::vector< std::pair< unsigned int, unsigned int > > * plotIndices(unsigned int index) const
Returns the located indices for the plot at the given index, or NULL for invalid. ...
time_t startTime() const
Returns the time/memory when the measurement started.
static const int MSG_INFO
Static //.
Definition: PlotLogger.h:336
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > * m_indices
Indices.
Definition: PlotLogger.h:244
unsigned int numLocatedIndices() const
Returns the total number of points that were located.
PlotLogLocate locate(PlotCanvas *canvas, const PlotRegion &region, int eventType=MSG_INFO, bool postLocateMessage=true)
Locate Methods //.
int eventFlags() const
Gets/Sets the event flags.
static void UNREGISTER_EVENT_TYPE(int event)
Unregisters the given extended event type.
void setMinimumPriority(casacore::LogMessage::Priority minPriority)
PlotLogMeasurement(const casacore::String &origin1, const casacore::String &origin2, TimeUnit timeUnit=DEFAULT_TIME_UNIT, MemoryUnit memoryUnit=DEFAULT_MEMORY_UNIT, int eventType=DEFAULT_EVENT_TYPE)
Non-Static //.
static int FLAG_FROM_PRIORITY(casacore::LogMessage::Priority minPriority)
Returns an event flag for all events that meet the given minimum priority.
PlotLogLocate(const casacore::String &origin1, const casacore::String &origin2, const PlotRegion &locateRegion, std::vector< std::vector< std::pair< unsigned int, unsigned int > > > *locatedIndices, int eventType=DEFAULT_EVENT_TYPE, bool deleteIndicesOnDestruction=true)
Non-Static //.
casacore::Bool pass(const casacore::LogMessage &message) const
Implements casacore::LogFilterInterface::pass().
static const int EXPORT_TOTAL
Exporting canvases to file.
Definition: PlotLogger.h:357
static int REGISTER_EVENT_TYPE(const casacore::String &name, casacore::LogMessage::Priority priority=casacore::LogMessage::NORMAL)
Registers an extended event type with the given name and optional priority and returns its value...
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
MemoryUnit m_memoryUnit
casacore::Memory unit
Definition: PlotLogger.h:179
const casacore::String & sinkLocation() const
Gets/Sets the log sink file location.
A Plotter can be thought of as a frame that holds one or more PlotCanvases in a configuration determi...
Definition: Plotter.h:43
PlotLoggerFilter m_filter
Log filter.
Definition: PlotLogger.h:511
Subclass of PlotLogMessage to unify messages for method entering/exiting.
Definition: PlotLogger.h:252
TimeUnit m_timeUnit
casacore::Time unit
Definition: PlotLogger.h:176
A PlotLogger is used to log messages to an underlying CASA log object, as well as provide access to d...
Definition: PlotLogger.h:328
bool filterEventFlag(int flag) const
Gets/Sets the log filter event flag for a single event type.
~PlotLoggerFilter()
Destructor.
double memory() const
~PlotLogMethod()
Destructor.
void setSinkLocation(const casacore::String &logFile)
PlotLogObject(const casacore::String &className, void *address, bool creation, const casacore::String &message=casacore::String(), int eventType=DEFAULT_EVENT_TYPE)
Constructor which takes the class name and object address, a flag for whether the object is being cre...
static std::vector< casacore::String > EXTENDED_NAMES
Registered extended type names.
Definition: PlotLogger.h:526
Accepts LogMessages and posts them to some destination.
~PlotLogLocate()
Destructor.
PlotRegion m_region
Region.
Definition: PlotLogger.h:241
int m_eventFlags
Event flags.
Definition: PlotLogger.h:311
PlotLoggerFilter(int eventFlags, casacore::LogMessage::Priority minPriority)
Constructor which takes optional event flags and minimum priority.
casacore::CountedPtr< casacore::LogSinkInterface > sink()
Log IO Methods //.
casacore::LogMessage::Priority m_minPriority
Minimum priority.
Definition: PlotLogger.h:314
void stopMeasurement()
Calculates the measurements from the last starting point to this point, and generates the log message...
static const int OBJECTS_MAJOR
Creation/deletion of major objects.
Definition: PlotLogger.h:354
static std::vector< casacore::String > EVENT_NAMES()
Returns all the event names.
MemoryUnit
Available memory units.
Definition: PlotLogger.h:103
void setFilterMinPriority(PlotLogMessage::Priority minPriority)
Low priority - primarily used for findding problems or tracing execution.
Definition: LogMessage.h:108
const String & message() const
Get the message text.
static PlotLogLocate canvasLocate(PlotCanvas *canvas, const PlotRegion &region)
Static //.
double m_time
casacore::Time and memory differences
Definition: PlotLogger.h:173
static casacore::LogMessage::Priority EVENT_PRIORITY(int event)
Gets/Sets the message priority for the given log event.
static casacore::String EVENT(int type)
Converts between an event type and its name.
static void disableGlobalSink()
Disables the global sink until enableGlobalSink() is called.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
~PlotLogMeasurement()
Destructor.
casacore::LogFilterInterface * clone() const
Implements casacore::LogFilterInterface::clone().
void setEventFlags(int flags)
bool willDeleteIndices() const
Returns whether or not this message will delete the indices vector on destruction or not...
double time() const
Returns the time/memory difference between when the measurement started and when the measurement ende...
PlotLogMethod(const casacore::String &className, const casacore::String &methodName, bool entering, const casacore::String &message=casacore::String(), int eventType=DEFAULT_EVENT_TYPE)
Constructor which takes the class and method names, a flag for whether the method is entering or exit...
PlotLogMeasurement releaseMeasurement(bool postReleaseMessage=true)
Gets the measurement since the last mark.
static casacore::LogFilterInterface * DISABLED_GLOBAL_FILTER
Disabled old global filter, or null.
Definition: PlotLogger.h:532
casacore::LogMessage::Priority minimumPriority() const
Gets/Sets the minimum priority.
std::vector< PlotLogMeasurement > m_measurements
Current measurement marks.
Definition: PlotLogger.h:517
static casacore::String memoryUnits(MemoryUnit m)
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > * indices() const
Returns the located indices.
casacore::CountedPtr< PlotLogger > PlotLoggerPtr
Definition: PlotLogger.h:534
virtual int eventType() const
Returns the event type of this message.
PlotCanvas is an area for different PlotItems to be attached and drawn.
Definition: PlotCanvas.h:83
MemoryUnit memoryUnit() const
PlotLogMessage markMeasurement(const casacore::String &origin1, const casacore::String &origin2, int eventType=PlotLogMessage::DEFAULT_EVENT_TYPE, bool postStartMessage=true)
Measurement Methods //.
unsigned int m_startMemory
Start memory.
Definition: PlotLogger.h:170
Priority
An &quot;importance&quot; which is assigned to each LogMessage.
Definition: LogMessage.h:105
TimeUnit timeUnit() const
Returns the time/memory units for this measurement.
virtual ~PlotLogger()
Destructor.
static void enableGlobalSink()
Re-enables the global sink.
static const int MSG_WARN
Definition: PlotLogger.h:337
static const int METHODS_MAJOR
Entering/exiting major methods.
Definition: PlotLogger.h:351
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of but is it too vague to be useful Since the interface is meant to be a simple plotter
Definition: PlotData.h:48
Used to report time and memory measurements.
Definition: PlotLogger.h:92
String: the storage and methods of handling collections of characters.
Definition: String.h:223
bool m_shouldDelete
Should delete indices.
Definition: PlotLogger.h:247
static const MemoryUnit DEFAULT_MEMORY_UNIT
Definition: PlotLogger.h:110
static std::map< int, casacore::LogMessage::Priority > EVENT_PRIORITIES
casacore::Map from log event to priority.
Definition: PlotLogger.h:529
Superclass for all messages going through the PlotLogger.
Definition: PlotLogger.h:48
int filterEventFlags() const
Gets/Sets the log filter event flag(s).
bool usingGlobalSink() const
Returns true if the logger is currently using the global sink, false otherwise.
Definition: PlotLogger.h:449
void startMeasurement()
Starts the measurement by setting the start time and memory.
Subclass of casacore::LogFilterInterface to filter on both event flags and minimum priority...
Definition: PlotLogger.h:283
static std::vector< int > EXTENDED_TYPES
Static //.
Definition: PlotLogger.h:523
PlotLogger(Plotter *plotter, int filterEventFlags=NO_EVENTS, casacore::LogMessage::Priority filterMinPriority=casacore::LogMessage::DEBUGGING)
Non-Static //.
A PlotRegion is basically just a wrapper for two PlotCoordinates: an upper left coordinate and a lowe...
Definition: PlotOptions.h:682
casacore::LogSinkInterface * localSinkCopy() const
Gets a copy of the log sink interface, IF it is not the global.
Used to report located indices.
Definition: PlotLogger.h:185
Informational log messages with with time, priority, and origin.
Definition: LogMessage.h:101
static const int DEFAULT_EVENT_TYPE
Static //.
Definition: PlotLogger.h:53
static casacore::String timeUnits(TimeUnit t)
Get a string representation of the given time/memory unit.
static int ALL_EVENTS_FLAG()
All events as a flag.
Bool empty() const
Test for empty.
Definition: String.h:375
~PlotLogObject()
Destructor.
void postMessage(const PlotLogMessage &message)
Message Methods //.
unsigned int startMemory() const