casacore
|
#include <TableTrace.h>
Public Types | |
enum | ColType { SCALAR , ARRAY , RECORD } |
enum | Oper { READ , WRITE } |
Static Public Member Functions | |
static int | traceColumn (const ColumnDesc &) |
Does the given column have to be traced for read and/or write? bit 0 set means read tracing; bit 1 write tracing. More... | |
static int | traceTable (const String &tableName, char oper) |
If needed, write a trace message for table open or create. More... | |
static void | traceClose (const String &tableName) |
If needed, trace closing a table. More... | |
static void | traceFile (int tabid, const String &oper) |
If needed, trace an operation on a table. More... | |
static void | traceRefTable (const String &parentName, char oper) |
If needed, write a trace message for reftable open, create, or close. More... | |
static void | trace (int tabid, const String &columnName, char oper) |
If needed, write a trace message Write a trace message for a scalar column. More... | |
static void | trace (int tabid, const String &columnName, char oper, Int64 row) |
Write a trace message for a scalar row. More... | |
static void | trace (int tabid, const String &columnName, char oper, const RefRows &rownrs) |
Write a trace message for ranges of scalar rows. More... | |
static void | trace (int tabid, const String &columnName, char oper, const IPosition &shape) |
Write a trace message for an array column. More... | |
static void | trace (int tabid, const String &columnName, char oper, Int64 row, const IPosition &shape) |
Write a trace message for an array row. More... | |
static void | trace (int tabid, const String &columnName, char oper, const RefRows &rownrs, const IPosition &shape) |
Write a trace message for ranges of array rows. More... | |
static void | trace (int tabid, const String &columnName, char oper, const IPosition &shape, const IPosition &blc, const IPosition &trc, const IPosition &inc) |
Write a trace message for an array column slice. More... | |
static void | trace (int tabid, const String &columnName, char oper, Int64 row, const IPosition &shape, const IPosition &blc, const IPosition &trc, const IPosition &inc) |
Write a trace message for an array row slice. More... | |
static void | trace (int tabid, const String &columnName, char oper, const RefRows &rownrs, const IPosition &shape, const IPosition &blc, const IPosition &trc, const IPosition &inc) |
Write a trace message for ranges of array rows slice. More... | |
Static Private Member Functions | |
static void | initTracing () |
Initialize the tracing mechanism which should be done only once. More... | |
static void | initOper () |
static void | initColumn () |
static int | findTable (const String &name) |
Find the table name in the vector. More... | |
static void | writeTraceFirst (int tabid, const String &name, char oper) |
Write the first part of the trace message. More... | |
static void | writeRefRows (const RefRows &rownrs) |
Write the RefRows as vector of rows or slices. More... | |
static void | writeSlice (const IPosition &blc, const IPosition &trc, const IPosition &inc) |
Write the blc, trc, and inc of an array slice. More... | |
Static Private Attributes | |
static std::once_flag | theirCallOnceFlag |
static std::mutex | theirMutex |
static std::ofstream | theirTraceFile |
static std::ostream * | theirStream |
static int | theirDoTrace |
static int | theirOper |
static int | theirColType |
static std::vector< Regex > | theirColumns |
static std::vector< String > | theirTables |
Class with static functions for tracing column IO
Internal
This class contains some static functions to enable table and column tracing. It maintains a map of table name to table-id.
The following aipsrc variables variables determine if tracing will be done, and if so, which columns and operations will be traced.
table.trace.filename
gives the name of the file in which the trace will be written. If empty (default), no tracing will be done. If 'stdout' is given, tracing is done to stdout. If 'stderr' is given, tracing is done to stderr. table.trace.operation
gives the operation to trace. be traced. It can be one or more of: table.trace.columntype
gives the types of columns to trace for read and/or write. It can be one or more of: table.trace.column
gives names of additional columns to trace for read and/or write. The names are separated by commas without any whitespace. Each name can be a glob-like pattern. If both table.trace.columntype
and table.trace.column
have an empty value, all array columns are traced.
Definition at line 92 of file TableTrace.h.
Enumerator | |
---|---|
SCALAR | |
ARRAY | |
RECORD |
Definition at line 95 of file TableTrace.h.
Enumerator | |
---|---|
READ | |
WRITE |
Definition at line 100 of file TableTrace.h.
|
staticprivate |
Find the table name in the vector.
-1 is returned if not found.
|
staticprivate |
|
staticprivate |
|
staticprivate |
Initialize the tracing mechanism which should be done only once.
|
static |
If needed, write a trace message Write a trace message for a scalar column.
|
static |
Write a trace message for an array column.
|
static |
Write a trace message for an array column slice.
|
static |
Write a trace message for ranges of scalar rows.
|
static |
Write a trace message for ranges of array rows.
|
static |
Write a trace message for ranges of array rows slice.
|
static |
Write a trace message for a scalar row.
|
static |
Write a trace message for an array row.
|
static |
Write a trace message for an array row slice.
|
static |
If needed, trace closing a table.
It removes the table from the map.
|
static |
Does the given column have to be traced for read and/or write? bit 0 set means read tracing; bit 1 write tracing.
|
static |
If needed, trace an operation on a table.
|
static |
If needed, write a trace message for reftable open, create, or close.
|
static |
If needed, write a trace message for table open or create.
It adds the table to the map and returns the table-id.
|
staticprivate |
Write the RefRows as vector of rows or slices.
|
staticprivate |
Write the blc, trc, and inc of an array slice.
|
staticprivate |
Write the first part of the trace message.
|
staticprivate |
Definition at line 178 of file TableTrace.h.
|
staticprivate |
Definition at line 184 of file TableTrace.h.
|
staticprivate |
Definition at line 185 of file TableTrace.h.
|
staticprivate |
Definition at line 182 of file TableTrace.h.
|
staticprivate |
Definition at line 179 of file TableTrace.h.
|
staticprivate |
Definition at line 183 of file TableTrace.h.
|
staticprivate |
Definition at line 181 of file TableTrace.h.
|
staticprivate |
Definition at line 186 of file TableTrace.h.
|
staticprivate |
Definition at line 180 of file TableTrace.h.