Project
Loading...
Searching...
No Matches
o2::utilities::DataSampling Class Reference

#include <DataSampling.h>

Public Member Functions

 DataSampling ()=delete
 Deleted default constructor. This class is stateless.
 

Static Public Member Functions

static void GenerateInfrastructure (framework::WorkflowSpec &workflow, const std::string &policiesSource, size_t threads=1, const std::string &host="")
 Generates data sampling infrastructure.
 
static void GenerateInfrastructure (framework::WorkflowSpec &workflow, boost::property_tree::ptree const &policies, size_t threads=1, const std::string &host="")
 Generates data sampling infrastructure.
 
static void CustomizeInfrastructure (std::vector< framework::CompletionPolicy > &)
 Configures dispatcher to consume any data immediately.
 
static void CustomizeInfrastructure (std::vector< framework::ChannelConfigurationPolicy > &)
 Applies blocking/nonblocking data sampling configuration to the workflow.
 
static std::vector< framework::InputSpecInputSpecsForPolicy (const boost::property_tree::ptree &policiesTree, const std::string &policyName)
 Provides InputSpecs to receive data for given DataSamplingPolicy. Expects the "dataSamplingPolicies" tree.
 
static std::vector< framework::OutputSpecOutputSpecsForPolicy (const boost::property_tree::ptree &policiesTree, const std::string &policyName)
 Provides OutputSpecs of given DataSamplingPolicy. Expects the "dataSamplingPolicies" tree.
 
static std::optional< uint16_t > PortForPolicy (const boost::property_tree::ptree &policiesTree, const std::string &policyName)
 Provides the port to be used for a proxy of given DataSamplingPolicy. Expects the "dataSamplingPolicies" tree.
 
static std::vector< std::string > MachinesForPolicy (const boost::property_tree::ptree &policiesTree, const std::string &policyName)
 Provides the machines where given DataSamplingPolicy is enabled. Expects the "dataSamplingPolicies" tree.
 
static std::string BindLocationForPolicy (const boost::property_tree::ptree &policiesTree, const std::string &policyName)
 Says if remote part (e.g. QC server) should bind the inter-machine channel, according to the configuration. Expects the "dataSamplingPolicies" tree.
 

Detailed Description

A class responsible for providing data from main processing flow to QC tasks.

This class generates message-passing infrastructure to provide desired amount of data to Quality Control tasks or any other clients. Data to be sampled is declared in DataSamplingPolicy'ies configuration file - an example can be found in O2/Framework/TestWorkflows/exampleDataSamplingConfig.json).

In-code usage:

void customize(std::vector<CompletionPolicy>& policies)
{
}
void customize(std::vector<ChannelConfigurationPolicy>& policies)
{
}
std::vector<DataProcessorSpec> defineDataProcessing(ConfigContext &ctx)
{
WorkflowSpec workflow;
// <declaration of other DPL processors>
const std::string configurationFilePath = <absolute file path>;
DataSampling::GenerateInfrastructure(workflow, configurationFilePath);
return workflow;
}
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
static void CustomizeInfrastructure(std::vector< framework::CompletionPolicy > &)
Configures dispatcher to consume any data immediately.
static void GenerateInfrastructure(framework::WorkflowSpec &workflow, const std::string &policiesSource, size_t threads=1, const std::string &host="")
Generates data sampling infrastructure.
GLsizei const GLchar *const * path
Definition glcorearb.h:3591
std::vector< DataProcessorSpec > WorkflowSpec

Definition at line 74 of file DataSampling.h.

Constructor & Destructor Documentation

◆ DataSampling()

o2::utilities::DataSampling::DataSampling ( )
delete

Deleted default constructor. This class is stateless.

Member Function Documentation

◆ BindLocationForPolicy()

std::string o2::utilities::DataSampling::BindLocationForPolicy ( const boost::property_tree::ptree &  policiesTree,
const std::string &  policyName 
)
static

Says if remote part (e.g. QC server) should bind the inter-machine channel, according to the configuration. Expects the "dataSamplingPolicies" tree.

Definition at line 182 of file DataSampling.cxx.

◆ CustomizeInfrastructure() [1/2]

void o2::utilities::DataSampling::CustomizeInfrastructure ( std::vector< framework::ChannelConfigurationPolicy > &  policies)
static

Applies blocking/nonblocking data sampling configuration to the workflow.

Definition at line 118 of file DataSampling.cxx.

◆ CustomizeInfrastructure() [2/2]

void o2::utilities::DataSampling::CustomizeInfrastructure ( std::vector< framework::CompletionPolicy > &  policies)
static

Configures dispatcher to consume any data immediately.

Definition at line 112 of file DataSampling.cxx.

◆ GenerateInfrastructure() [1/2]

void o2::utilities::DataSampling::GenerateInfrastructure ( framework::WorkflowSpec workflow,
boost::property_tree::ptree const &  policies,
size_t  threads = 1,
const std::string &  host = "" 
)
static

Generates data sampling infrastructure.

Parameters
workflowDPL workflow with already declared data processors which provide data desired by QC tasks.
policiesSourceboost::property_tree::ptree with the configuration
threadsNumber of dispatcher threads, that will handle the data
hostHost name. If the host or a policy machine list are empty, the policy will always be created.

Definition at line 52 of file DataSampling.cxx.

◆ GenerateInfrastructure() [2/2]

void o2::utilities::DataSampling::GenerateInfrastructure ( framework::WorkflowSpec workflow,
const std::string &  policiesSource,
size_t  threads = 1,
const std::string &  host = "" 
)
static

Generates data sampling infrastructure.

Parameters
workflowDPL workflow with already declared data processors which provide data desired by QC tasks.
policiesSourcePath to configuration file.
threadsNumber of dispatcher threads, that will handle the data
hostHost name. If the host or a policy machine list are empty, the policy will always be created.

Definition at line 40 of file DataSampling.cxx.

◆ InputSpecsForPolicy()

std::vector< framework::InputSpec > o2::utilities::DataSampling::InputSpecsForPolicy ( const boost::property_tree::ptree &  policiesTree,
const std::string &  policyName 
)
static

Provides InputSpecs to receive data for given DataSamplingPolicy. Expects the "dataSamplingPolicies" tree.

Definition at line 124 of file DataSampling.cxx.

◆ MachinesForPolicy()

std::vector< std::string > o2::utilities::DataSampling::MachinesForPolicy ( const boost::property_tree::ptree &  policiesTree,
const std::string &  policyName 
)
static

Provides the machines where given DataSamplingPolicy is enabled. Expects the "dataSamplingPolicies" tree.

Definition at line 166 of file DataSampling.cxx.

◆ OutputSpecsForPolicy()

std::vector< framework::OutputSpec > o2::utilities::DataSampling::OutputSpecsForPolicy ( const boost::property_tree::ptree &  policiesTree,
const std::string &  policyName 
)
static

Provides OutputSpecs of given DataSamplingPolicy. Expects the "dataSamplingPolicies" tree.

Definition at line 140 of file DataSampling.cxx.

◆ PortForPolicy()

std::optional< uint16_t > o2::utilities::DataSampling::PortForPolicy ( const boost::property_tree::ptree &  policiesTree,
const std::string &  policyName 
)
static

Provides the port to be used for a proxy of given DataSamplingPolicy. Expects the "dataSamplingPolicies" tree.

Definition at line 155 of file DataSampling.cxx.


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