VIMOS DRS Reference Manual 2.9.3
Functions
CPL interface

Functions

int vmCplFramesetExport (const cpl_frameset *set, PilSetOfFrames *sof)
 Export a CPL frameset.
int vmCplFramesetImport (cpl_frameset *set, const PilSetOfFrames *sof)
 Imports products to a CPL frameset.
int vmCplParlistExport (const cpl_parameterlist *list)
 Export a CPL parameter list.
PilMsgSeverity vmCplMsgSeverityExport (cpl_msg_severity level)
 Convert the messaging severity level.
int vmCplRecipeTimerStart (PilTime *time)
 Start the recipe execution timer.
int vmCplRecipeTimerStop (PilTime *time)
 Stop the recipe execution timer.
int vmCplRecipeStart (const char *recipe, const char *version)
 Initialize the VIMOS recipe subsystems.
int vmCplRecipeStop (void)
 Shutdown the VIMOS recipe subsystems.
int vmCplPostProcessFrames (PilSetOfFrames *sof, char *recipename)
 Apply post processing steps to all frames in a set of frames.

Detailed Description

This module provides the necessary adaptor functionality in order to execute data reduction tasks using the CPL recipe interface.


Function Documentation

int vmCplFramesetExport ( const cpl_frameset *  set,
PilSetOfFrames *  sof 
)

Export a CPL frameset.

Parameters:
setThe CPL frameset to export.
sofThe set of frames to fill.
Returns:
The function returns 0 on success or a non-zero value otherwise.

The function fills an existing set of frames object sof with the converted contents of the source CPL frame set set. If set is empty, or if set is NULL, the target set of frames is left unchanged.

The intended use of this function is to convert an input CPL frameset into a set of frames structure. The function therefore does not deal with other frame and product attributes than the frame group. Calling this function for a frameset containing products with extended attributes will propagate only the frame group to the created set of frames.

In most case this is exactly what is needed, since the product attributes are only used to help the calling application to write the frames to the disk. On input to a subsequent data reduction task the file name, the tag and the frame group are sufficient.

See also:
vmCplImportSof()
int vmCplFramesetImport ( cpl_frameset *  set,
const PilSetOfFrames *  sof 
)

Imports products to a CPL frameset.

Parameters:
setThe CPL frameset to be updated.
sofThe set of frames from which products are imported.
Returns:
The function returns 0 on success or a non-zero value otherwise.

The function updates an existing CPL frame set set with the product frames found in the set of frames sof. The target CPL frame set must exist. If set is NULL the function returns an error. If the source set of frames sof is empty, or if it is NULL the target frame set is left unchanged, otherwise all product frames found in sof are converted to CPL frames and inserted in set.

See also:
vmCplExportFrameset()
PilMsgSeverity vmCplMsgSeverityExport ( cpl_msg_severity  level)

Convert the messaging severity level.

Parameters:
levelMessage severity level to convert.
Returns:
The converted message severity level.

The function translates a CPL message severity level to a VIMOS message severity level.

int vmCplParlistExport ( const cpl_parameterlist *  list)

Export a CPL parameter list.

Parameters:
listThe CPL parameter list to export.
Returns:
The function returns 0 on success or a non-zero value otherwise.

The function fills the recipe configuration database with the contents of the CPL parameter list list. The recipe configuration database must be initialized before this function is called. If the parameter list is empty, or if list is NULL, the recipe configuration database is left unchanged.

int vmCplPostProcessFrames ( PilSetOfFrames *  sof,
char *  recipename 
)

Apply post processing steps to all frames in a set of frames.

Parameters:
sofSet of frames to process.
Returns:
The function returns 0 on success, or a non-zero value otherwise.

The function finalizes the set of frames after the data reduction task has completed. For registered product frames, for instance, the FITS header entries are completed with generic product information.

int vmCplRecipeStart ( const char *  recipe,
const char *  version 
)

Initialize the VIMOS recipe subsystems.

Parameters:
recipeThe name of the recipe to initialize.
Returns:
The function returns 0 on success or a non-zero value otherwise.

The function uses the current CPL subsystem settings to initialize the corresponding VIMOS recipe subsystems in the same way.

int vmCplRecipeStop ( void  )

Shutdown the VIMOS recipe subsystems.

Returns:
The function returns 0 on success or a non-zero value otherwise.

The function stops the VIMOS recipe subsystems initialized by a call to vmCplRecipeStart(). the corresponding VIMOS recipe subsystems in the same way.

int vmCplRecipeTimerStart ( PilTime *  time)

Start the recipe execution timer.

Parameters:
timeAddress of the variable where the start time will be stored.
Returns:
The function returns 0 on success and a non-zero values in case of an error.

The function starts the recipe's execution timer and saves the start time to the recipe information structure. In addition, if time is not NULL, the recipe's start time is stored in the variable pointed to by time.

int vmCplRecipeTimerStop ( PilTime *  time)

Stop the recipe execution timer.

Parameters:
timeAddress of the variable where the stop time will be stored.
Returns:
The function returns 0 on success and a non-zero values in case of an error.

The function stops the recipe's execution timer and saves the stop time to the recipe information structure. In addition, if time is not NULL, the recipe's stop time is stored in the variable pointed to by time.