1 / 6

The HEADAS Object Oriented Parameter System (HOOPS)

The HEADAS Object Oriented Parameter System (HOOPS). James Peachey, HEASARC. HOOPS Overview. HOOPS is a library for prompting users and returning their input to the client software (i.e. a science tool).

Download Presentation

The HEADAS Object Oriented Parameter System (HOOPS)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The HEADAS Object Oriented Parameter System (HOOPS) James Peachey, HEASARC

  2. HOOPS Overview • HOOPS is a library for prompting users and returning their input to the client software (i.e. a science tool). • Original concept was an object-oriented wrapper for ISDC’s PIL (Parameter Interface Library). • Final design is a more general interface for IRAF-style parameters which uses PIL. PIL usage is encapsulated in such a way that it could be replaced.

  3. Main HOOPS Class Families • IPar: Abstraction of a single IRAF-style parameter. Includes all standard parameter fields (name, type, mode, value, min, max, prompt). • IParGroup: Abstraction of a group (an ordered container) of parameters with generic iterative access. • IParFile: Abstraction of a group of parameters associated with a file. Includes standard file access. • IParPrompt: Abstraction of a group of parameters associated with a particular prompting mechanism.

  4. Advantages of HOOPS • Separate abstractions for parameter groups, files, and prompting mechanisms makes it more flexible. • Use of abstract interface allows other file formats and/or prompting mechanisms to be added (e.g. a GUI). • Includes support for multiple parameter files, allowing separation of parameters which are common to a group of tools.

  5. Sample HOOPS Pseudocode for a Simple, Ballistic Tool int main(int argc, char * argv[]) { // Create a parameter file object. IParFile * pf = PILParFileFactory().Create(argv[0]); // Load parameters from disk into parameter file object. pf->Load(); // Create an object to do the prompting. IParPrompt * prompter = PILPromptFactory().Create(pf, argc - 1, argv + 1); // Cause prompts to be generated as appropriate. prompter->Prompt(); // Get group of parameters. IParGroup & pg = prompter->Group(); // Some parameter conversions to/from primitives. pg[“string_par”] = “This is a string parameter”; double d = pg[“double_par”]; }

  6. Future Work • Correct compilation problems on Windows. • Provide standard code template to give science tools a uniform look and feel. • GUIs? Using Python widgets? • A PIL-free implementation, time permitting.

More Related