| 
    EIRAM
    
   atomic and molecular data in form of polynomial fits 
   | 
 
CGI (Common Gateway Interface) for EIRAM. More...
Go to the source code of this file.
Functions/Subroutines | |
| program | eiram_cgi | 
| subroutine | getpoints (fileName, reactionType, reactionIndex, arg1s_str, arg2s_str, xs, ys) | 
| Calculate the points for the given reaction and arguments.  More... | |
| character(150+2 *(14 *size(xs)+2)) function | pointstojsonstring (fileName, reactionType, reactionIndex, xs, ys) | 
| Return a string which represents a JSON object suitable for plotting of the given reaction data.  More... | |
| subroutine | getcsvparameter (dict, parameterName, errMsg, values, nValues) | 
| Parse values of a comma separated CGI parameter.  More... | |
| subroutine | sendavailablereactions () | 
| Send the list of all available reactions to the server.  More... | |
| subroutine | initallfiles () | 
| Initialize EIRAM with all available data.  More... | |
| character(dict_value_length *2) function | getlastmessage () | 
| Return two last lines printed into the temporary output unit.  More... | |
| subroutine | split (string, c, array) | 
| Split one line into individual strings for each comma separated substring.  More... | |
| subroutine | parsevector (strArr, realArr) | 
| Converts octave-like string vector representation into an array of reals.  More... | |
| character(1024 *n) function | getreactionsasjson (REACTIONS, N, err) | 
| Transfer reactions stored in the arrays REACTIONS into a string which represents a JSON (JavaScript Object Notation) object - list of reactions.  More... | |
CGI (Common Gateway Interface) for EIRAM.
CGI (Common Gateway Interface) for EIRAM
GET request parameters
files: comma separated list of file names
types: comma separated list of type names
reactions: comma separated list of reaction indices
arg1s: comma separated list of first arguments, may be single values or vectors in start[:delta]:end notation
arg2s: comma separated list of second arguments, may be "-", single values or vectors in start[:delta]:end notation; if arg2 is "-", tnen only one argument arg1 taken for this reaction
epsfilter: real number; tolerance parameter for the energy filter. The filter takes away nodes with values which are equal within relative accuracy defined by epsfilter. [default: epsfilter=0, ie. no filtering]
All lists must have the same length.
If the query string does not contain '=', then a JSON (JavaScript Object Notation) format list of available combinations is returned.
In case of an error 400 Bad Request is returned. The body of the response contains a rough description of the error.
examples for query strings:
Definition in file eiram_cgi.f90.
| program eiram_cgi | ( | ) | 
Definition at line 60 of file eiram_cgi.f90.
References cgi_protocol::cgi_begin(), cgi_protocol::cgi_end(), cgi_protocol::cgi_error(), eiram::eiram_deallocate(), eiram::eiram_unit, getcsvparameter(), getpoints(), initallfiles(), cgi_protocol::output_no_header, pointstojsonstring(), and sendavailablereactions().

| subroutine eiram_cgi::getpoints | ( | character(*), intent(in) | fileName, | 
| character(*), intent(in) | reactionType, | ||
| character(*), intent(in) | reactionIndex, | ||
| character(*), intent(in) | arg1s_str, | ||
| character(*), intent(in) | arg2s_str, | ||
| real(kind=eiram_dp), dimension(:), intent(out), allocatable | xs, | ||
| real(kind=eiram_dp), dimension(:), intent(out), allocatable | ys | ||
| ) | 
Calculate the points for the given reaction and arguments.
| [in] | filename | file name for the reaction | 
| [in] | reactiontype | type name for the reaction | 
| [in] | reactionindex | index of the reaction | 
| [in] | arg1s_str | argument 1, single numeric value or min:delta:max string | 
| [in] | arg2s_str | argument 2, "-", single numeric value or min:delta:max string if arg2 /= "-", then only the first value from arg1s is used | 
| [out] | xs | the x values for which the function is calculated | 
| [out] | ys | the y values | 
Definition at line 140 of file eiram_cgi.f90.
References cgi_protocol::cgi_error(), eiram_matlab_calc1(), eiram_matlab_calc2(), getlastmessage(), and parsevector().
Referenced by eiram_cgi().


| character(150+2*(14*size(xs)+2)) function eiram_cgi::pointstojsonstring | ( | character(*), intent(in) | fileName, | 
| character(*), intent(in) | reactionType, | ||
| character(*), intent(in) | reactionIndex, | ||
| real(kind=eiram_dp), dimension(:), intent(in) | xs, | ||
| real(kind=eiram_dp), dimension(:), intent(in) | ys | ||
| ) | 
Return a string which represents a JSON object suitable for plotting of the given reaction data.
| [in] | filename | file name for the reaction | 
| [in] | reactiontype | type name for the reaction | 
| [in] | reactionindex | index of the reaction | 
| [in] | xs | x values | 
| [in] | ys | y values | 
Definition at line 214 of file eiram_cgi.f90.
References json::eiram_json_getarrayasjson(), and json::eiram_json_writejsonstringproperty().
Referenced by eiram_cgi().


| subroutine eiram_cgi::getcsvparameter | ( | type(dict_struct), intent(in), pointer | dict, | 
| character(*), intent(in) | parameterName, | ||
| character(*), intent(in) | errMsg, | ||
| character(max_param_length), dimension(:), intent(inout), allocatable | values, | ||
| integer, intent(out) | nValues | ||
| ) | 
Parse values of a comma separated CGI parameter.
| [in] | dict | the CGI dictionary | 
| [in] | parametername | the name of the parameter | 
| [in] | errmsg | the cgi error message returned in case the parameter does not exist | 
| [in,out] | values | the array which will hold the parsed values | 
| [out] | nvalues | number of obtained values | 
Definition at line 250 of file eiram_cgi.f90.
References cgi_protocol::cgi_error(), and split().
Referenced by eiram_cgi().


| subroutine eiram_cgi::sendavailablereactions | ( | ) | 
Send the list of all available reactions to the server.
Definition at line 269 of file eiram_cgi.f90.
References cgi_protocol::cgi_end(), cgi_protocol::cgi_error(), eiram::eiram_create_image(), eiram::eiram_deallocate(), getlastmessage(), getreactionsasjson(), and initallfiles().
Referenced by eiram_cgi().


| subroutine eiram_cgi::initallfiles | ( | ) | 
Initialize EIRAM with all available data.
Definition at line 300 of file eiram_cgi.f90.
References cgi_protocol::cgi_error(), eiram::eiram_load(), and getlastmessage().
Referenced by eiram_cgi(), and sendavailablereactions().


| character(dict_value_length*2) function eiram_cgi::getlastmessage | ( | ) | 
Return two last lines printed into the temporary output unit.
Definition at line 312 of file eiram_cgi.f90.
References cgi_protocol::dict_value_length.
Referenced by getpoints(), initallfiles(), and sendavailablereactions().

| subroutine eiram_cgi::split | ( | character(*), intent(in) | string, | 
| character(1), intent(in) | c, | ||
| character(max_param_length), dimension(:), intent(out), allocatable | array | ||
| ) | 
Split one line into individual strings for each comma separated substring.
| [in] | string | c-separated string; must not contain commas (unless c is a comma) or whitespaces | 
| [in] | c | character at which the input string is split | 
Definition at line 321 of file eiram_cgi.f90.
References cgi_protocol::dict_value_length.
Referenced by getcsvparameter(), and parsevector().

| subroutine eiram_cgi::parsevector | ( | character(*), intent(in) | strArr, | 
| real(kind=eiram_dp), dimension(:), intent(out), allocatable | realArr | ||
| ) | 
Converts octave-like string vector representation into an array of reals.
| [in] | strarr | string in the form "<real>", "<real>:<real>", "<real>:<real>:<real>", or "-" "-" will be converted to NEG_INF | 
Definition at line 343 of file eiram_cgi.f90.
References cgi_protocol::cgi_error(), and split().
Referenced by getpoints().


| character(1024*n) function eiram_cgi::getreactionsasjson | ( | type(eiram_data), dimension(n), intent(in) | REACTIONS, | 
| integer, intent(in) | N, | ||
| integer, intent(out) | err | ||
| ) | 
Transfer reactions stored in the arrays REACTIONS into a string which represents a JSON (JavaScript Object Notation) object - list of reactions.
Definition at line 394 of file eiram_cgi.f90.
References json::eiram_json_getarrayasjson(), and json::eiram_json_writejsonstringproperty().
Referenced by sendavailablereactions().


 1.8.9.1