/* templrd_ep.C */ /*************************************************************************** SIA - system for advanced seismic data analysis Copyright (c) 1995-2004, I. B. Morozov ****************************************************************************/ #define DEBUG #include "templrd.h" extern "C" { void *templrd_init() { return new TEMPLRD; } } /*=== the name of the program for the GUI ====*/ CHARSTR TEMPLRD::module_name( boolean active ) { CHARSTR name("Trace read template"); if ( active ) // the module is turned on { read_params(); name << " (" << key.length << " values) <- " << file_name; } return name; } /*================================================================= Constructor ==================================================================*/ TEMPLRD::TEMPLRD() : SIA_MODULE(), _count(0) { } void TEMPLRD::read_params() { /*--- read the parameters described in .mpar file ----*/ if ( file_name.param("FNAME") == PARAM_NORMAL ) { file_name.edit(); // perform symbolic substitutions, if present param1.read("PARAM1",REAL); // input header or constant value key_header.define("KEYHDR",INTEGER,FROM_JOB); // define an output header // with a user-specified name } } /*========================================================================== Edit phase - called once to load the parameters of the tool ==========================================================================*/ int TEMPLRD::edit() { read_params(); // read module parameters return EOF_MODULE; // input module needs to be called with no data at input }