Difference: DpHipeTools (20 vs. 21)

Revision 212008-07-08 - JuanCarlosSegovia

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Adding Tools to HIPE

Line: 30 to 30
 Up to now you have made you task globally available to the system by specifying an instance of that task within the __init__.py file of your sub-system, e.g.:
    # __init__.py file

Changed:
<
<
myTask=MyTask()
>
>
compute=ComputeTask()
 

To make your task appear in the "Run Tools" view, you need to add the following lines:

    from herschel.ia.task.views import TaskToolFactory

Changed:
<
<
TaskToolFactory.register(MyTask())
>
>
TaskToolFactory.register(compute)
 

For PCSS (PACS' builds) users, this __init__.py file is located at $install_dir/data/toolbox/your_sub_system.

Changed:
<
<
You can also specify that your task belongs to one or more categories:
>
>
You can also specify that your task belongs to one or more categories ###http://www.rssd.esa.int/SD-general/Projects/Herschel/hscdt/releases/doc/api/herschel/ia/gui/kernel/Tool.Category.html:
 
    from herschel.ia.gui.kernel.Tool import Category

Changed:
<
<
TaskToolFactory.register(MyTask(), [Category.IMAGE, Category.PACS]))
>
>
TaskToolFactory.register(compute, [Category.IMAGE, Category.PACS]))
  Your task will now be enabled whenever a session variable is selected which matches the type of the first input parameter within your task!
 
This site is powered by the TWiki collaboration platform Powered by Perl