Implementing hard callbacks is a bit harder than enhancing the hoc language, but offers utmost flexibility in handling the data. You should know something about the C++ programming language, see [str93]. Hard callbacks behave much like the callback mechanism from the X-window system. The idea is not to actively process all data, but to ''get called'' by the main program as a sort of interrupt routine.
Every hard callback is a implemented as a C++ class, derived from a
baseclass HardCallback
. This baseclass provides the framework,
in which callback's functions must be written.
Study HardCallback.h
and HardCallback.cc
for details. Each
callback ''lives'' in association with YODA's Eventstream
class. This class is the central device for reading, writing and
dispatching containerevents and subevents. See Eventstream.h
and Eventstream.cc
for details.
Hard callbacks can access data of and add subevents to the incoming eventstream. The user must specify the following:
init()
which is called at any time a
variable managed by the broker
utility has changed.
analyze()
, called for every accepted
event and does the actual data analysis.
finish()
. This function is called
whenever YODA is going offline.
hoc
language.