JANA2
C++ framework for multi-threaded data processing
|
#include <JEventGroupTracker.h>
Public Member Functions | |
int | GetGroupId () const |
Report back what group this actual is. This is mostly for debugging purposes. | |
void | StartEvent () const |
Record that another event belonging to this group has been emitted. | |
bool | FinishEvent () const |
Report an event as finished. | |
void | CloseGroup () const |
Indicate that no more events in the group are on their way. | |
bool | IsGroupFinished () const |
Test whether all events in the group have finished. | |
void | WaitUntilGroupFinished () |
Block until every event in this group has finished, and the eventsource has declared the group closed. | |
![]() | |
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. | |
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 |
Friends | |
class | JEventGroupManager |
Additional Inherited Members | |
![]() | |
std::set< const JObject * > | associated |
std::set< JObject * > | auto_delete |
A persistent JObject.
|
inline |
Indicate that no more events in the group are on their way.
Note that groups can be re-opened by simply emitting another event tagged according to that group. This is meant to be called from JEventSource::GetEvent.
|
inline |
Report an event as finished.
If this was the last event in the group, IsGroupFinished will now return true. Please only call once per event, so that we don't have to maintain a set of outstanding event ids. This takes advantage of C++ atomics to detect if we were the one who finished the whole group without needing a lock. This is meant to be called from JEventProcessor::Process.
|
inline |
Test whether all events in the group have finished.
Two conditions have to hold:
|
inline |
Record that another event belonging to this group has been emitted.
This is meant to be called from JEventSource::GetEvent.
|
inline |
Block until every event in this group has finished, and the eventsource has declared the group closed.
This is meant to be callable from any JANA component.