JANA2
C++ framework for multi-threaded data processing
|
A JEventMessage is an interface used by JTransport for streaming individual events. More...
#include <JMessage.h>
Public Member Functions | |
virtual size_t | get_event_number () const =0 |
Determine what the event number should be for the JEvent that gets emitted for this message. More... | |
virtual size_t | get_run_number () const =0 |
Determine what the run number should be for the JEvent that gets emitted for this message. More... | |
Public Member Functions inherited from JObject | |
virtual const std::string | className () const |
void | AddAssociatedObject (const JObject *obj) |
void | AddAssociatedObjectAutoDelete (JObject *obj, bool auto_delete=true) |
void | RemoveAssociatedObject (const JObject *obj) |
void | ClearAssociatedObjects (void) |
bool | IsAssociated (const JObject *locObject) const |
template<class T > | |
const T * | GetSingle () const |
template<class T > | |
std::vector< const T * > | Get () const |
template<typename T > | |
void | GetSingle (const T *&ptrs, std::string classname="") const |
The following have been added purely for compatibility with JANA1, in order to make porting halld_recon more tractable. More... | |
template<typename T > | |
void | GetT (std::vector< const T * > &ptrs) const |
template<typename T > | |
void | Get (std::vector< const T * > &ptrs, std::string classname="", int max_depth=1000000) const |
template<typename T > | |
void | GetAssociatedAncestors (std::set< const JObject * > &already_checked, int &max_depth, std::set< const T * > &objs_found, std::string classname="") const |
virtual void | Summarize (JObjectSummary &summary) const |
Additional Inherited Members | |
Protected Attributes inherited from JObject | |
std::set< const JObject * > | associated |
std::set< JObject * > | auto_delete |
A JEventMessage is an interface used by JTransport for streaming individual events.
In other words, this assumes that event building is done upstream. Each JEventMessage will be inserted into its own brand new JEvent just like any other JObject. The implementor is responsible for figuring out the event and run numbers. The code for parsing the message payload could either be expressed as getter methods on the JEventMessage implementation, or in its own JFactory. If the message format is the same as the in-memory representation (non-portable but fast), the JEventMessage can be defined as a plain-old-data struct and the char*
buffer obtained via reinterpret_cast
.
|
pure virtual |
Determine what the event number should be for the JEvent that gets emitted for this message.
This information should be available from the message payload. If not, return zero, in which case the JStreamingEventSource will issue an event number automatically.
|
pure virtual |
Determine what the run number should be for the JEvent that gets emitted for this message.
This information should be available from the message payload. If not, return zero, in which case the JStreamingEventSource will use the last known run number.