JANA2
JEventBuilder< T > Class Template Reference

JEventBuilder pulls JMessages off of a user-specified JTransport, aggregates them into JEvents using the JWindow of their choice, and decides which to keep via a user-specified JTrigger. More...

#include <JEventBuilder.h>

Inheritance diagram for JEventBuilder< T >:
Collaboration diagram for JEventBuilder< T >:

Public Member Functions

 JEventBuilder (std::unique_ptr< JTransport > &&transport, std::unique_ptr< JTrigger > &&trigger=std::unique_ptr< JTrigger >(new JTrigger()), std::unique_ptr< JWindow< T >> &&window=std::unique_ptr< JSessionWindow< T >>(new JSessionWindow< T >()))
 
void addJoin (std::unique_ptr< JDiscreteJoin< T >> &&join)
 
void Open () override
 
void GetEvent (std::shared_ptr< JEvent > event) override
 
- Public Member Functions inherited from JEventSource
 JEventSource (std::string resource_name, JApplication *app=nullptr)
 
virtual bool GetObjects (const std::shared_ptr< const JEvent > &aEvent, JFactory *aFactory)
 
virtual void DoInitialize ()
 
ReturnStatus DoNext (std::shared_ptr< JEvent > event)
 
SourceStatus GetStatus () const
 
std::string GetPluginName () const
 
std::string GetTypeName () const
 
std::string GetResourceName () const
 
uint64_t GetEventCount () const
 
JApplicationGetApplication () const
 
virtual std::string GetType () const
 
std::string GetName () const
 
virtual std::string GetVDescription () const
 Optional for getting description via source rather than JEventSourceGenerator.
 
JFactoryGeneratorGetFactoryGenerator () const
 
void SetTypeName (std::string type_name)
 SetTypeName is intended as a replacement to GetType(), which should be less confusing for the user. More...
 
void SetFactoryGenerator (JFactoryGenerator *generator)
 
void SetApplication (JApplication *app)
 
void SetPluginName (std::string plugin_name)
 
void SetRange (uint64_t nskip, uint64_t nevents)
 

Static Public Member Functions

static std::string GetDescription ()
 

Additional Inherited Members

- Public Types inherited from JEventSource
enum  SourceStatus {
  Unopened,
  Opened,
  Finished
}
 SourceStatus describes the current state of the EventSource.
 
enum  ReturnStatus {
  Success,
  TryAgain,
  Finished
}
 ReturnStatus describes what happened the last time a GetEvent() was attempted. More...
 
enum  RETURN_STATUS {
  kSUCCESS,
  kNO_MORE_EVENTS,
  kBUSY,
  kTRY_AGAIN,
  kERROR,
  kUNKNOWN
}
 The user is supposed to throw RETURN_STATUS::kNO_MORE_EVENTS or kBUSY from GetEvent()
 

Detailed Description

template<typename T>
class JEventBuilder< T >

JEventBuilder pulls JMessages off of a user-specified JTransport, aggregates them into JEvents using the JWindow of their choice, and decides which to keep via a user-specified JTrigger.

Member Function Documentation

template<typename T >
void JEventBuilder< T >::GetEvent ( std::shared_ptr< JEvent event)
inlineoverridevirtual

This is really bad because we have to worry about downstream HitSource returning TryAgainLater and we really don't want to block here

Implements JEventSource.


The documentation for this class was generated from the following file: