main.cc File Reference

This file contains the main function of ARTS, as well as functions to deal with command line parameters. More...

#include "arts.h"
#include <algorithm>
#include <map>
#include "parameters.h"
#include "messages.h"
#include "exceptions.h"
#include "file.h"
#include "auto_wsv.h"
#include "methods.h"
#include "parser.h"
#include "auto_md.h"
#include "absorption.h"
#include "wsv_aux.h"

Go to the source code of this file.

Functions

void define_wsv_pointers (Array< WsvP * > &wsv_pointers, WorkSpace &workspace)
void give_up (const String &message)
 Print the error message and exit.
void executor (WorkSpace &workspace, const Array< MRecord > &tasklist)
 The arts executor.
void polite_goodby ()
 Remind the user of --help and exit return value 1.
void set_reporting_level (Index r)
 Set the reporting level, either the default or based on reporting.
void option_methods (const String &methods)
 React to option `methods'.
void option_input (const String &input)
 React to option `input'.
void option_workspacevariables (const String &workspacevariables)
 React to option `workspacevariables'.
void option_describe (const String &describe)
 React to option `describe'.
void check_built_headers ()
 Checks the dimensions of stuff in generated headers.
int main (int argc, char **argv)
 This is the main function of ARTS.


Detailed Description

This file contains the main function of ARTS, as well as functions to deal with command line parameters.

It also contains the executor, which is the `engine' that executes workspace methods in a controlfile one by one, in order to carry out an ARTS calculations.

Author:
Stefan Buehler
Date:
2001-07-24

Definition in file main.cc.


Function Documentation

void check_built_headers (  ) 

Checks the dimensions of stuff in generated headers.

The header files wsv.h and md.h are generated automatically from the files workspace.cc and methods.cc. This function checks, if at least the dimensions agree between the .h files and the .cc files.

FIXME: Update this, add automatic wsv groups.

Author:
Stefan Buehler
Date:
2000-08-04

Definition at line 648 of file main.cc.

void define_wsv_pointers ( Array< WsvP * > &  wsv_pointers,
WorkSpace workspace 
)

Definition at line 21 of file auto_wsv_pointers.cc.

void executor ( WorkSpace workspace,
const Array< MRecord > &  tasklist 
)

The arts executor.

This executes the methods specified in tasklist on the given workspace. It also checks for errors during the method execution and stops the program if an error has occured.

Parameters:
workspace Output. The workspace to act on.
tasklist The list of methods to execute (including keyword data).
Author:
Stefan Buehler

Definition at line 73 of file main.cc.

void give_up ( const String message  ) 

Print the error message and exit.

Definition at line 57 of file main.cc.

int main ( int  argc,
char **  argv 
)

This is the main function of ARTS.

(You never guessed that, did you?) The getopt_long function is used to parse the command line parameters.

    Overview:
    1. Get command line parameters.
    2. Evaluate the command line parameters. (This also checks if the
       parameters make sense, where necessary.) 
    

Returns:
0=ok, 1=error
Parameters:
argc Number of command line parameters
argv Values of command line parameters
Author:
Stefan Buehler

Definition at line 675 of file main.cc.

void option_describe ( const String describe  ) 

React to option `describe'.

This should print the description String of the given workspace variable or method.

Parameters:
describe What to describe.
Author:
Stefan Buehler

Definition at line 595 of file main.cc.

void option_input ( const String input  ) 

React to option `input'.

Given the name of a variable, it should print all methods that need this variable as input.

Parameters:
methods Name of a variable.
Author:
Stefan Buehler
Date:
2001-07-24

Definition at line 374 of file main.cc.

void option_methods ( const String methods  ) 

React to option `methods'.

If given the argument `all', it should simply prints a list of all methods. If given the name of a variable, it should print all methods that produce this variable as output.

Parameters:
methods All or name of a variable.
Author:
Stefan Buehler

Definition at line 223 of file main.cc.

void option_workspacevariables ( const String workspacevariables  ) 

React to option `workspacevariables'.

If given the argument `all', it should simply prints a list of all variables. If given the name of a method, it should print all variables that are needed by that method.

Parameters:
workspacevariables All or name of a method.
Author:
Stefan Buehler

Definition at line 507 of file main.cc.

void polite_goodby (  ) 

Remind the user of --help and exit return value 1.

Definition at line 167 of file main.cc.

void set_reporting_level ( Index  r  ) 

Set the reporting level, either the default or based on reporting.

If reporting was specified, check if the values make sense. The value -1 for reporting means that it was (probably) not given on the command line, since this is the initialization value.

Parameters:
r Reporting level from Command line.
Author:
Stefan Buehler

Definition at line 180 of file main.cc.


Generated on Wed Feb 4 08:17:24 2009 for ARTS by  doxygen 1.5.6