casa
5.7.0-16
|
Class to generate and manage flag versions for Tables containing flag columns. More...
#include <FlagVersion.h>
Public Member Functions | |
FlagVersion (casacore::String intab, casacore::String dataflagcolname, casacore::String rowflagcolname) | |
Constructor. More... | |
virtual | ~FlagVersion () |
Destructor. More... | |
FlagVersion & | operator= (const FlagVersion &) |
Operator= Equate by reference. More... | |
casacore::Vector < casacore::String > | getVersionList () |
Get a list of entries from the version-list file for this table. More... | |
casacore::Bool | attachFlagColumns (casacore::String version, casacore::ScalarColumn< casacore::Bool > &rowflag, casacore::ArrayColumn< casacore::Bool > &flags, casacore::Table &subtab) |
Specify the casacore::Table column names to use as flag columns. More... | |
casacore::Bool | saveFlagVersion (casacore::String versionname, casacore::String comment, casacore::String merge=casacore::String("replace")) |
Save current main table flags into a separate version These keeps a copy in the main table too. More... | |
casacore::Bool | restoreFlagVersion (casacore::String versionname, casacore::String merge=casacore::String("replace")) |
Copy flags from a flag version, into the main table. More... | |
casacore::Bool | deleteFlagVersion (casacore::String versionname) |
Delete a version. More... | |
casacore::Bool | clearAllFlags () |
Clear all main table flags. More... | |
Private Member Functions | |
void | FlagVersionError (casacore::String msg) |
casacore::Bool | readVersionList () |
casacore::Bool | saveFlagsInto (casacore::Table &fromFTab, casacore::Table &toFTab, casacore::String merge=casacore::String("replace")) |
casacore::Bool | doesVersionExist (casacore::String versionname) |
Static Private Attributes | |
static casacore::String | clname |
Class to generate and manage flag versions for Tables containing flag columns.
Manages Flag Versions.
This class creates and manages flag versions. A flag version as defined in this class has the following structure.
xxxx.ms xxxx.ms.flagversions
When first opened, a flagversions directory is created parallel to the original Table. This directory contains a text file : FLAG_VERSION_LIST that holds a list of string pairs version name : comment for this version.
The FLAG and FLAG_ROW columns of the main table are copied into new Tables with only two columns, whenever a new flag version is created. Flag versions can be merged using logical 'and', logical 'or', and 'replace' semantics. Flag versions can be restored to the main table of the MS.
At the end of a "save" or "restore" operation, the latest flags are always also in the main table.
Definition at line 110 of file FlagVersion.h.
casa::FlagVersion::FlagVersion | ( | casacore::String | intab, |
casacore::String | dataflagcolname, | ||
casacore::String | rowflagcolname | ||
) |
Constructor.
|
virtual |
Destructor.
casacore::Bool casa::FlagVersion::attachFlagColumns | ( | casacore::String | version, |
casacore::ScalarColumn< casacore::Bool > & | rowflag, | ||
casacore::ArrayColumn< casacore::Bool > & | flags, | ||
casacore::Table & | subtab | ||
) |
Specify the casacore::Table column names to use as flag columns.
For example, for a casacore::MS, they are "FLAG" and "FLAG_ROW".
casacore::Bool casa::FlagVersion::clearAllFlags | ( | ) |
Clear all main table flags.
casacore::Bool casa::FlagVersion::deleteFlagVersion | ( | casacore::String | versionname | ) |
Delete a version.
This does not touch or update the main table
|
private |
|
private |
casacore::Vector<casacore::String> casa::FlagVersion::getVersionList | ( | ) |
Get a list of entries from the version-list file for this table.
|
inline |
Operator= Equate by reference.
Definition at line 121 of file FlagVersion.h.
|
private |
casacore::Bool casa::FlagVersion::restoreFlagVersion | ( | casacore::String | versionname, |
casacore::String | merge = casacore::String("replace") |
||
) |
Copy flags from a flag version, into the main table.
|
private |
casacore::Bool casa::FlagVersion::saveFlagVersion | ( | casacore::String | versionname, |
casacore::String | comment, | ||
casacore::String | merge = casacore::String("replace") |
||
) |
Save current main table flags into a separate version These keeps a copy in the main table too.
"merge" can be one of 'or','and','replace'
|
staticprivate |
Definition at line 173 of file FlagVersion.h.
|
private |
Definition at line 164 of file FlagVersion.h.
|
private |
Definition at line 158 of file FlagVersion.h.
|
private |
Definition at line 165 of file FlagVersion.h.
|
private |
Definition at line 170 of file FlagVersion.h.
|
private |
Definition at line 157 of file FlagVersion.h.
|
private |
Definition at line 165 of file FlagVersion.h.
|
private |
Definition at line 172 of file FlagVersion.h.
|
private |
Definition at line 166 of file FlagVersion.h.
|
private |
Definition at line 159 of file FlagVersion.h.
|
private |
Definition at line 168 of file FlagVersion.h.
|
private |
Definition at line 161 of file FlagVersion.h.
|
private |
Definition at line 162 of file FlagVersion.h.
|
private |
Definition at line 156 of file FlagVersion.h.
|
private |
Definition at line 163 of file FlagVersion.h.