RAVE
Lib.rave_pgf_qtools Namespace Reference

Classes

class  PGF_JobQueue
 Queue object based on a dictionary. More...
 
class  PGF_JobQueue_isFull_Error
 Job queue Exception. More...
 

Functions

 pgf_dumps (val)
 
 merge (algorithm, files, arguments, jobid)
 Adds Elements containing files and arguments to the message.
 
 split (elem)
 Convenience function for accessing files and arguments from a message.
 
 List2Element (inlist, tagname)
 Convenience function for retrieving an Element from a Python list.
 
 Element2List (elem, tagname)
 Convenience function for retrieving a Python list from an Element.
 

Detailed Description

Copyright (C) 2010- Swedish Meteorological and Hydrological Institute (SMHI)

This file is part of RAVE.

RAVE is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

RAVE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with RAVE.  If not, see <http://www.gnu.org/licenses/>.

Function Documentation

◆ Element2List()

Lib.rave_pgf_qtools.Element2List ( elem,
tagname )

Convenience function for retrieving a Python list from an Element.

Parameters
elemElement containing the list to retrieve.
tagnamestring the name of the tag to read.
Returns
list

◆ List2Element()

Lib.rave_pgf_qtools.List2Element ( inlist,
tagname )

Convenience function for retrieving an Element from a Python list.

Parameters
inlistinput list.
tagnamestring the name of the tag to create.
Returns
Element

◆ merge()

Lib.rave_pgf_qtools.merge ( algorithm,
files,
arguments,
jobid )

Adds Elements containing files and arguments to the message.

Parameters
algorithmElement in a rave_pgf_registry.PGF_Registry instance.
fileslist of input files
argumentslist of arguments
jobidstring unique ID of that job. several Elements in the queue with the same priority, they will be retrieved in alphabetical order, according to the tag (algorithm) names.

◆ split()

Lib.rave_pgf_qtools.split ( elem)

Convenience function for accessing files and arguments from a message.

Parameters
elemElement containing the algorithm, input file list, and argument list.
Returns
tuple containing algorithm Element, list of files, list of arguments.