Next: Enhancing the Hoc Language
Up: YODAUser's Guide
Previous: YODA tcl Commands
Beyond the Hoc Language
As mentioned in the introduction, the abilities of the hoc language
are sufficient for many typical tasks in physical analysis. There are,
however, special cases for which the speed and/or the interpreter language
capabilities are not sufficient.
For these cases, there are two ways of enhancing YODA's abilities
while mainly retaining the comfortable features.
- One way is to add new functions to the set of built-in hoc
library routines. After adding own, customized routines, they are
indistinguishable from the ''native'' hoc functions. They can be used
to perform lengthy calculations at full, compiled speed or
memory-greedy algorithms with complex datastructures.. Since they are
written in C (C++), they may use the full spectrum of the language and
all libraries available. See section 7.1 on how to to
add new functions to the hoc language. The interface to and from these
functions is still restricted by the hoc language, however.
- Introduce own hard callbacks into YODA. This means to write one
or more complete C++ classes (derived from a basecall providing the
framework), which perform arbitrary operations on the incoming data.
There is no restriction on how to operate on the data, and the
selection criteria (when to process and when to ignore data) is
completely in the user's code. On the other hand, YODA' principle
framework is preserved. These callbacks have full access to YODA's
histograms and cuts, and their appearance to the user is like a user
task (which cannot be loaded and unloaded, however). See section
7.2 on how to implement such a class.
Next: Enhancing the Hoc Language
Up: YODAUser's Guide
Previous: YODA tcl Commands
Heiko Rohdjess
2001-07-19