205 std::vector<std::vector<std::pair<unsigned int,unsigned int> > >* locatedIndices,
207 bool deleteIndicesOnDestruction =
true);
228 std::vector<std::vector<std::pair<unsigned int, unsigned int> > >*
indices()
const;
232 std::vector<std::pair<unsigned int, unsigned int> >*
plotIndices(
233 unsigned int index)
const;
244 std::vector<std::vector<std::pair<unsigned int, unsigned int> > >*
m_indices;
383 static std::vector<casacore::String>
EVENT_NAMES();
492 bool postStartMessage =
true);
504 int eventType =
MSG_INFO,
bool postLocateMessage =
true);
unsigned int numSearchedPlots() const
Returns the number of plots that were searched.
casacore::CountedPtr< casacore::LogSinkInterface > m_logger
Log sink.
static const int NO_EVENTS
No events.
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.
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.
static const int DRAW_INDIVIDUAL
Replotting/redrawing each plot item.
virtual ~PlotLogMessage()
Destructor.
casacore::LogMessage::Priority filterMinPriority() const
Filtering Methods //.
time_t m_startTime
Start time.
static const TimeUnit DEFAULT_TIME_UNIT
Default units.
Subclass of PlotLogMessage to unify messages for object creation/deletion.
PlotLogMessage(int eventType=DEFAULT_EVENT_TYPE)
Non-Static //.
casacore::String m_loggerLocation
Log sink location.
static const int MSG_DEBUG
Miscellaneous debugging messages.
static const int MSG_ERROR
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 //.
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > * m_indices
Indices.
unsigned int numLocatedIndices() const
Returns the total number of points that were located.
PlotLogLocate locate(PlotCanvas *canvas, const PlotRegion ®ion, 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.
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
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...
PlotLoggerFilter m_filter
Log filter.
Subclass of PlotLogMessage to unify messages for method entering/exiting.
TimeUnit m_timeUnit
casacore::Time unit
A PlotLogger is used to log messages to an underlying CASA log object, as well as provide access to d...
bool filterEventFlag(int flag) const
Gets/Sets the log filter event flag for a single event type.
~PlotLoggerFilter()
Destructor.
~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.
Accepts LogMessages and posts them to some destination.
~PlotLogLocate()
Destructor.
PlotRegion m_region
Region.
int m_eventFlags
Event flags.
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.
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.
static std::vector< casacore::String > EVENT_NAMES()
Returns all the event names.
MemoryUnit
Available memory units.
void setFilterMinPriority(PlotLogMessage::Priority minPriority)
Low priority - primarily used for findding problems or tracing execution.
const String & message() const
Get the message text.
static PlotLogLocate canvasLocate(PlotCanvas *canvas, const PlotRegion ®ion)
Static //.
double m_time
casacore::Time and memory differences
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.
~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.
casacore::LogMessage::Priority minimumPriority() const
Gets/Sets the minimum priority.
std::vector< PlotLogMeasurement > m_measurements
Current measurement marks.
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
virtual int eventType() const
Returns the event type of this message.
PlotCanvas is an area for different PlotItems to be attached and drawn.
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.
Priority
An "importance" which is assigned to each LogMessage.
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
static const int METHODS_MAJOR
Entering/exiting major methods.
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
Used to report time and memory measurements.
String: the storage and methods of handling collections of characters.
bool m_shouldDelete
Should delete indices.
static const MemoryUnit DEFAULT_MEMORY_UNIT
static std::map< int, casacore::LogMessage::Priority > EVENT_PRIORITIES
casacore::Map from log event to priority.
Superclass for all messages going through the PlotLogger.
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.
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...
static std::vector< int > EXTENDED_TYPES
Static //.
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...
casacore::LogSinkInterface * localSinkCopy() const
Gets a copy of the log sink interface, IF it is not the global.
Used to report located indices.
Informational log messages with with time, priority, and origin.
static const int DEFAULT_EVENT_TYPE
Static //.
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.
~PlotLogObject()
Destructor.
void postMessage(const PlotLogMessage &message)
Message Methods //.
unsigned int startMemory() const