TRF reporting mechanism
D. Adams
28jun00 1305
TRF++ provides a mechanism for sending and receiving messages
containing data of any type. It is designed so that high level
reporters can monitor algorithm classes.
Messages
Messages are described by three message classes defined in
Message.h:
-
AbsMessage is an abstract base message from which all
messages inherit. This is the usual form in which messages
are carried.
-
DataMessage<Data> inherits from AbsMessage and holds the
message data (type Data) and a string indicating the location
from which the message was broadcast. This is the sort of
message a free function would issue.
-
Message<Data,Sender> inherits from DataMessage<Data>
and adds a reference to the sending class (type Sender). This
type of message is issued by a member function.
Reporters
The abstract base class Reporter is defined in
Reporter.h. It provides an interface
to report a message of type AbsMessage. Concrete reporters
attempt to cast AbsMessage's to known types and, if successful,
report accordingly.
Algorithm classes hold lists of reporters and provide the
method Algorithm::report(const AbsMessage&) to broadcast
a message to each of the reporters.
dladams@fnal.gov