JANA2
C++ framework for multi-threaded data processing
JTopologyBuilder Class Reference
Inheritance diagram for JTopologyBuilder:
[legend]
Collaboration diagram for JTopologyBuilder:
[legend]

Public Member Functions

void acquire_services (JServiceLocator *sl) override
 
void set_configure_fn (std::function< void(JTopologyBuilder &)> configure_fn)
 set_cofigure_fn lets the user provide a lambda that sets up a topology after all components have been loaded. More...
 
void create_topology ()
 
void attach_level (JEventLevel current_level, JUnfoldArrow *parent_unfolder, JFoldArrow *parent_folder)
 
void connect_to_first_available (JArrow *upstream, std::vector< JArrow * > downstreams)
 
void connect (JArrow *upstream, size_t upstream_index, JArrow *downstream, size_t downstream_index)
 
std::string print_topology ()
 
- Public Member Functions inherited from JService
virtual ~JService ()=default
 acquire_services is a callback which allows the user to configure a JService which relies on other JServices. More...
 
void DoInit (JServiceLocator *)
 
virtual void Init ()
 
- Public Member Functions inherited from jana::components::JComponent
void SetLevel (JEventLevel level)
 
void SetCallbackStyle (CallbackStyle style)
 
void SetPrefix (std::string prefix)
 
void SetTypeName (std::string type_name)
 For convenience, we provide a NAME_OF_THIS macro so that the user doesn't have to store the type name as a string, because that could get out of sync if automatic refactoring tools are used.
 
JApplicationGetApplication () const
 
JLoggerGetLogger ()
 
std::string GetPrefix () const
 
JEventLevel GetLevel () const
 
std::string GetLoggerName () const
 
std::string GetPluginName () const
 
void SetLoggerName (std::string logger_name)
 
void SetPluginName (std::string plugin_name)
 
std::string GetTypeName () const
 
virtual void Summarize (JComponentSummary &) const
 
CallbackStyle GetCallbackStyle () const
 
Status GetStatus () const
 
void SetApplication (JApplication *app)
 
void SetLogger (JLogger logger)
 
template<typename F >
void CallWithJExceptionWrapper (std::string func_name, F func)
 
void RegisterParameter (ParameterBase *parameter)
 
void RegisterService (ServiceBase *service)
 
void ConfigureAllParameters (std::map< std::string, std::string > fields)
 

Public Attributes

Service< JParameterManagerm_params {this}
 
std::shared_ptr< JComponentManagerm_components
 
std::vector< JArrow * > arrows
 
std::vector< JQueue * > queues
 
std::vector< JEventPool * > pools
 
size_t m_pool_capacity = 4
 
size_t m_queue_capacity = 4
 
size_t m_location_count = 1
 
bool m_enable_stealing = false
 
bool m_limit_total_events_in_flight = true
 
int m_affinity = 0
 
int m_locality = 0
 
std::function< void(JTopologyBuilder &)> m_configure_topology
 
JEventPoolevent_pool = nullptr
 
JPerfMetrics metrics
 
JProcessorMapping mapping
 

Additional Inherited Members

- Public Types inherited from jana::components::JComponent
enum class  Status {
  Uninitialized ,
  Initialized ,
  Opened ,
  Closed ,
  Finalized
}
 
enum class  CallbackStyle {
  LegacyMode ,
  ExpertMode ,
  DeclarativeMode
}
 
- Protected Attributes inherited from jana::components::JComponent
std::vector< ParameterBase * > m_parameters
 
std::vector< ServiceBase * > m_services
 
JEventLevel m_level = JEventLevel::PhysicsEvent
 
CallbackStyle m_callback_style = CallbackStyle::LegacyMode
 
std::string m_prefix
 
std::string m_plugin_name
 
std::string m_logger_name
 
std::string m_type_name
 
Status m_status = Status::Uninitialized
 
std::mutex m_mutex
 
JApplicationm_app = nullptr
 
JLogger m_logger
 

Member Function Documentation

◆ set_configure_fn()

void JTopologyBuilder::set_configure_fn ( std::function< void(JTopologyBuilder &)>  configure_fn)

set_cofigure_fn lets the user provide a lambda that sets up a topology after all components have been loaded.

It provides an 'empty' JArrowTopology which has been furnished with a pointer to the JComponentManager, the JEventPool, and the JProcessorMapping (in case you care about NUMA details). However, it does not contain any queues or arrows. You have to furnish those yourself.


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