HISTORY Every good HISTORY > boy deserves HISTORY >fudge.Becomes the C++ String: "Every good boy deservesfudge." Note the lack of a space between deserves and fudge.
History cards are broken into groups. A group is delimited by
HISTORY AIPS++ START TYPE HISTORY AIPS++ END [TYPE]Where type might be, e.g., LOGTABLE. HISTORY cards not enclosed between START/END pairs are implicitly of type "" (i.e. the empty string). The TYPE is optional on the END statement. It is essentially a comment.
At present, START/END pairs cannot be nested, although this would be an obvious extension.
uInt n; Vector<String> group; String type; ConstFITSKeywordList keys(...); ... keys.first(); while ((n = FITSHistoryUtil::getHistoryGroup(group, type, keys)) != 0) { ... process this history group }strings will have no embedded newlines. strings is not resized if it is more than large enough to hold the number of history cards in the group (i.e. there may be values at the end of strings which are not part of the requested group.
Add history strings of the specified groupType to an existing FitsKeywordList. This function will split long strings across HISTORY cards and set up the group START/END keywords if necessary. nstrings must be specified because strings might have come from something like getHistoryGroup, i.e. it might have garbage entries at the end. The strings may have embedded newlines, but they must have no other non-printable characters.
Some functions to help convert between log tables and FITS HISTORY cards. It is intended that these functions will only be used by the functions in classes like ImageFITSConverter.
Table rows are in AIPS++ format if they have a valid time and priority, otherwise they are in the standard FITS HISTORY format. The history lines are processed by contiguous groups where all lines in that group are either in AIPS++ or HISTORY format. Note that history.nelements() might be greater than nstrings for efficiency (i.e. the history vector will not be shrunk unnecessarily).
Note that these functions are in a separate .cc file so that if they are not used the table function is not linked in if other functions in this class are used.
The strings are assumed to be from or going to the get/addHistoryGroup functions, i.e. strings that span multiple lines are joined, AIPS++ START/END cards are stripped, etc.
The AIPS++ format is: the first line DATE PRIORITY [SRCCODE='xxx'] [OBJID='xxx'] and the second lins is the message. These entries are in an AIPS++ START LOGTABLE history sequence.
toHistory signals that it is done by setting nstrings to 0. The returned value is firstLine + n_lines_read, i.e. use it as firstLine in your next call.
Some functions to help convert between log tables and FITS HISTORY cards. It is intended that these functions will only be used by the functions in classes like ImageFITSConverter.
Table rows are in AIPS++ format if they have a valid time and priority, otherwise they are in the standard FITS HISTORY format. The history lines are processed by contiguous groups where all lines in that group are either in AIPS++ or HISTORY format. Note that history.nelements() might be greater than nstrings for efficiency (i.e. the history vector will not be shrunk unnecessarily).
Note that these functions are in a separate .cc file so that if they are not used the table function is not linked in if other functions in this class are used.
The strings are assumed to be from or going to the get/addHistoryGroup functions, i.e. strings that span multiple lines are joined, AIPS++ START/END cards are stripped, etc.
The AIPS++ format is: the first line DATE PRIORITY [SRCCODE='xxx'] [OBJID='xxx'] and the second lins is the message. These entries are in an AIPS++ START LOGTABLE history sequence.