Previous: Introduction
Up: DSPACK - Advanced Features
Next: Glossary
Previous Page: Introduction
Next Page: Glossary
- DSPACK provides a simple technique of passing data between the program and the data manager. The interface is identical for fortran and c programs and is designed to accommodate different programming styles.
- All objects are defined dynamically, at execution time. There are many advantages of such an arrangement: object definition may be made dependent on the run-time options or parameters, in interactive programs objects may be created by the user, the histogramming and test/cut packages may create their own objects, etc.
- Object Description Files may be used to define objects or to initialize
them. The format of Object Description Files allows for comments and should
be useful for documentation purposes. (see )
- Object definitions are expandable - the user is free to add data to the
object definition. (see )
- All objects are independent and complete - this means that any reference to an object implies a reference to everything this object depends on. Copying, moving or writing an object to disk or tape produces an entity that is functionally identical to the original. (At least this was the intention and this is the present experience and the author is determined to keep it that way)
- Objects are addressed by a name of up to 16 characters and a handle (pointer to a pointer). The correct handle is returned by all routines accessing data after a successful search for the name. Provided that the programmer does not modify the handle the name is not used in subsequent calls and objects are found using the handle - even if they were re-located in the mean-time. Additional protection is provided so that the unsuccessful search is not repeated if it is bound to fail (if no new objects were defined since the last failure). The same method is used to access elements of the object - including individual words. This technique provides easy access to data by name (making the programs much more readable too) and at the same time is extremely fast - only two levels of indirection and no searches are needed to access any object after the first call. Addressing exclusively by name is used by interactive programs where speed is not important - the search never takes enough time to be noticed by the user.
- DSPACK output files and tapes are 'self-defining'. The header of a dspack file or tape contains complete definitions of all objects that may be found in the file - a DSPACK program defines all needed objects after reading the header. This means that any DSPACK file or tape may be read by any DSPACK program. No prior knowledge of the tape contents is necessary. Nevertheless - the DSPACK library contains tools which can read a header of a DSPACK file or tape and produce f77 or c header files defining all the objects found.
- If used with ZEBRA as a memory manager DSPACK uses FZ package for I/O. This provides the flexibility of FZ and at the same time allows DSPACK files to be read directly by other packages - like PAW. This way DSPACK objects may be accessed and analysed by PAW or other programs using ZEBRA.
- DSPACK data sets are 'self-documenting'. Each data set has a corresponding definition record in the permanent division containing some amount of documentation. Some of that information is used by DSPACK tools, other is provided for documentation and help in interactive work.
- Access to data is either through routines which copy data (GET and PUT) or through pointers to objects or to individual words. The pointers are returned by DSPACK functions called with data set name and handle.
- DSPACK may be used in a local or server-client mode . In the server-client mode the space is shared between several clients which may access data as usual, however the DSPACK calls which store data are automatically passed to a DSPACK deamon which manages the memory. Also all DSPACK calls dealing with I/O are passed for execution to the deamon. The DSPACK deamon may control access to data although the system is in principle designed to have only one process modifying data at any given time. The selection of local or server-client mode is made at execution time when DSPACK is initialized - after this the user's code is completely independent of mode - the necessary communication with the server is done internally by DSPACK .
- DSPACK has been designed to provide complete isolation of production programs from the memory handling software. This is achieved by applying a very strict rule which does not allow any communication with DSPACK other than by calling DSPACK routines (there are no global variables or common blocks available to the calling program). Important advantage of that approach is that the production programs do not need to change at all whatever changes are made to the memory management system or I/O format. In the present form DSPACK may be replaced by any program as long as it preserves the DSPACK 's calling sequences.
- Concepts of Object Oriented Programming are implemented. Data set (or 'Object')
can be assigned to a CLASS. The mechanism of passing messages to objects
is available. The CLASS system is intended to enable the user to extend
DSPACK in order to handle special objects in special way. It may be used to
build interfaces to other packages or to provide functionality which does
not exist in DSPACK .(see )
Previous: Introduction
Up: DSPACK - Advanced Features
Next: Glossary
Previous Page: Introduction
Next Page: Glossary