Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Classes | Public Member Functions | Protected Member Functions | List of all members
ska::cheetah::exporters::DataExportConfig Class Reference

Configuration Object for DataExport module. More...

#include <cheetah/exporters/DataExportConfig.h>

Inheritance diagram for ska::cheetah::exporters::DataExportConfig:
Inheritance graph
Collaboration diagram for ska::cheetah::exporters::DataExportConfig:
Collaboration graph

Public Member Functions

 DataExportConfig (std::string const &tag=std::string("sinks"))
 
panda::DataSwitchConfig & switch_config () const
 return the configuration suitable for sending to a panda::DataSwitch
 
void activate_streams (std::vector< std::string > const &streams)
 mark the provided streams as active
 
void activate (panda::ChannelId const &channel)
 
void number_of_threads (unsigned const &number_of_threads)
 set the number of dedicated threads to service exporters export (default 0) More...
 
void add_exporter (DataExportStreamConfig)
 set an export streamer configurations
 
std::vector< DataExportStreamConfig > const & exporters () const
 return a list of configured export streamer configurations
 
void channel (panda::ChannelInfo const &)
 explicity add a channel configuration
 
panda::ProcessingEngineConfig const & engine_config (panda::ChannelId const &channel_id) const
 return the processing engine configuration associated with the specified channel
 
void set_engine_config (panda::ChannelId const &channel_id, panda::ProcessingEngineConfig const &config)
 set the engine confugration for a specified channel
 
void set_engine_config (panda::ProcessingEngineConfig const &config)
 set the engine configuration for the default engine More...
 
void parse_property_tree (boost::property_tree::ptree const &pt, boost::program_options::variables_map &vm) override
 
void add_sink (std::string const &tag, std::function< panda::ConfigModule *()> const &cm)
 
void add_sink (panda::ConfigModule &cm)
 
panda::Engine & engine (panda::ChannelId const &)
 return the engine allocated to the specified channel
 
- Public Member Functions inherited from ska::cheetah::utils::Config
 Config (std::string module_name)
 
void terminate () const
 call for notifiers to indicate a termination condition More...
 

Protected Member Functions

void add_options (OptionsDescriptionEasyInit &add_options) override
 

Additional Inherited Members

- Public Types inherited from ska::cheetah::utils::Config
typedef System SystemType
 
typedef panda::PoolManager< SystemTypePoolManagerType
 
typedef PoolManagerType::PoolType PoolType
 

Detailed Description

Configuration Object for DataExport module.

<sinks>
<threads/>
<channels>
<channel_1>
<active>trus</active>
<sink>sink_id_1</sink>
<sink>sink_id_2</sink>
</channel_1>
</channels>
<my_sink>
<id>sink_id_1</id>
<other_my_sink_config/>
</my_sink>
<other_sink>
<id>sink_id_2</id>
</other_sink>
</sinks>

Each sink is assigned to a channel using its id. The name of the sink should mathc the ExporterType key in the DataExport factory (see set_factory() methdo)

Definition at line 66 of file DataExportConfig.h.

Member Function Documentation

◆ number_of_threads()

void ska::cheetah::exporters::DataExportConfig::number_of_threads ( unsigned const &  number_of_threads)

set the number of dedicated threads to service exporters export (default 0)

for finer control use the set_engine_config() methods

Definition at line 76 of file DataExportConfig.cpp.

77 {
78  panda::ProcessingEngineConfig config(number_of_threads);
79  config.number_of_threads(number_of_threads);
80  _switch_config.set_engine_config(config);
81 }
void number_of_threads(unsigned const &number_of_threads)
set the number of dedicated threads to service exporters export (default 0)

◆ set_engine_config()

void ska::cheetah::exporters::DataExportConfig::set_engine_config ( panda::ProcessingEngineConfig const &  config)

set the engine configuration for the default engine

the default engine is used when there has been no specific engine_config set for a particular channel

Definition at line 168 of file DataExportConfig.cpp.

169 {
170  _switch_config.set_engine_config(config);
171 }

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