Package Ganga :: Package GPIDev :: Package Lib :: Package JobTree :: Module JobTree' :: Class JobTree
[hide private]
[frames] | no frames]

Class JobTree

source code

          object --+        
                   |        
   Base.Objects.Node --+    
                       |    
Base.Objects.GangaObject --+
                           |
                          JobTree

This is a Ganga.GPI.JobTree implementation class. Refer to Ganga.GPI.JobTree.__doc__ for documentation.

Nested Classes [hide private]
  _proxyClass
The jobtree object in Ganga gives you the possibility to organise jobs in a directory structure.

Inherited from Base.Objects.GangaObject: __metaclass__

Instance Methods [hide private]
 
__get_path(self, path=None) source code
 
__getstate__(self) source code
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__make_dir(self, path) source code
 
__select_dir(self, path) source code
 
__setstate__(self, dict) source code
 
__str__(self, interactive=0)
str(x)
source code
 
_copy(self) source code
 
_display(self, interactive=0) source code
 
_proxy_display(self, interactive=1) source code
 
add(self, job, path=None)
Adds job to the job tree into the current folder.
source code
 
cd(self, path='/')
Changes current directory.
source code
 
cleanlinks(self, path='/')
Removes all references for the jobs not present in the registry.
source code
 
cwd(self, val=None)
This workaround is necessary to prevent overwriting the current directory every time another session changes something
source code
 
exists(self, path)
Checks wether the path exists or not.
source code
 
find(self, id, path=None)
For a job with given id tries to find all references in the job tree.
source code
 
getjobs(self, path=None)
Gives list of all jobs (objects) referenced in current folder or folder in the path if the latter is provided.
source code
 
isdir(self, path)
Checks wether the path points to a folder or not.
source code
 
listdirs(self, path=None)
Lists all subfolders in current folder or folder in the path if the latter is provided.
source code
 
listjobs(self, path=None)
Lists ids of all jobs in current folder or folder in the path if the latter is provided.
source code
 
ls(self, path=None)
Lists content of current folder or folder in the path if the latter is provided.
source code
 
mkdir(self, path)
Makes a folder.
source code
 
printtree(self, path=None)
Prints content of the job tree in a well formatted way.
source code
 
pwd(self)
Returns current folder
source code
 
rm(self, path)
Removes folder or job in the path.
source code

Inherited from Base.Objects.GangaObject: __construct__, __deepcopy__, _attribute_filter__set__, _auto__init__, accept, getJobObject

Inherited from Base.Objects.Node: __copy__, __eq__, __ne__, clone, copyFrom, printSummaryTree, printTree

Inherited from Base.Objects.Node (private): _getParent, _getRoot, _setParent

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from Base.Objects.GangaObject (private): _declared_property

Class Variables [hide private]
  _category = 'jobtrees'
  _cwd = {}
  _exportmethods = ['exists', 'isdir', 'add', 'rm', 'cd', 'mkdir...
  _name = 'JobTree'
  _schema = <Ganga.GPIDev.Schema.Schema.Schema instance at 0x1ea...
  default_registry = 'jobs'
  folders = <Ganga.GPIDev.Base.Objects.Descriptor object at 0x1e...
  name = <Ganga.GPIDev.Base.Objects.Descriptor object at 0x1eb2b90>

Inherited from Base.Objects.GangaObject (private): _hidden, _registry

Inherited from Base.Objects.Node (private): _index_cache, _parent

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__getstate__(self)

source code 
Overrides: Base.Objects.Node.__getstate__

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__setstate__(self, dict)

source code 
Overrides: Base.Objects.Node.__setstate__

__str__(self, interactive=0)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

add(self, job, path=None)

source code 

Adds job to the job tree into the current folder. If path to a folder is provided as a parameter than adds job to that folder.

cd(self, path='/')

source code 

Changes current directory. If path is not provided, than switches to the root folder.

cleanlinks(self, path='/')

source code 

Removes all references for the jobs not present in the registry. Normally you don't need to call this method since it is called automatically whenever job is deleted from the registry.

find(self, id, path=None)

source code 

For a job with given id tries to find all references in the job tree. The return value is a list of found paths.

ls(self, path=None)

source code 

Lists content of current folder or folder in the path if the latter is provided. The return value is a dictionary of the format {'folders':[<list of folders>], 'jobs':[<list of job ids>]}.

mkdir(self, path)

source code 

Makes a folder. If any folders in the path are missing they will be created as well.

rm(self, path)

source code 

Removes folder or job in the path. To clean all use /* as a path.


Class Variable Details [hide private]

_exportmethods

Value:
['exists',
 'isdir',
 'add',
 'rm',
 'cd',
 'mkdir',
 'ls',
 'pwd',
...

_schema

Value:
<Ganga.GPIDev.Schema.Schema.Schema instance at 0x1eaeef0>

folders

Value:
<Ganga.GPIDev.Base.Objects.Descriptor object at 0x1eb2b50>