artdaq::RandomDelayFilter Class Reference

A filter which delays for a random amount of time, then drops a random fraction of events. Used to simulate the delays and efficiency of real filters. More...

List of all members.

Public Member Functions

 RandomDelayFilter (fhicl::ParameterSet const &p)
 RandomDelayFilter Constructor.
 RandomDelayFilter (RandomDelayFilter const &)
 Copy Constructor is deleted.
 RandomDelayFilter (RandomDelayFilter &&)
 Move Constructor is deleted.
RandomDelayFilteroperator= (RandomDelayFilter const &)
 Copy Assignment operator is deleted.
RandomDelayFilteroperator= (RandomDelayFilter &&)
 Move Assignment operator is deleted.
bool filter (art::Event &e) override
 Filter is a required override of art::EDFilter, and is called for each event.

Detailed Description

A filter which delays for a random amount of time, then drops a random fraction of events. Used to simulate the delays and efficiency of real filters.

Multiple RandomDelayFilters in series can simulate the effect of multiple layers of filtering

Definition at line 37 of file RandomDelayFilter_module.cc.


Constructor & Destructor Documentation

artdaq::RandomDelayFilter::RandomDelayFilter ( fhicl::ParameterSet const &  p  )  [explicit]

RandomDelayFilter Constructor.

Parameters:
p ParameterSet used to confgure RandomDelayFilter

RandomDelayFilter accepts the following Parametrs: "minimum_delay_ms" (Default: 0): The minimum amount of time to delay, in ms "maximum_delay_ms" (Default: 1000): The maximum amount of time to delay, in ms "mean_delay_ms" (Default: 500): If using a normal distribution for delay times, the mean of the distribution, in ms "sigma_delay_ms" (Default: 100): If using a normal distribution for delay times, the sigma of the distribution, in ms "pass_filter_percentage" (Default: 100): The fraction of events which will pass the filter "cpu_load_ratio" (Default: 1.0): The fraction of the delay time which should be active (spinning) versis passive (sleeping) "use_normal_distribution" (Default: false): Use a normal distribution for delay times, versus a uniform one "random_seed" (Default: 271828): The seed for the ditribution

Definition at line 108 of file RandomDelayFilter_module.cc.


Member Function Documentation

bool artdaq::RandomDelayFilter::filter ( art::Event &  e  )  [override]

Filter is a required override of art::EDFilter, and is called for each event.

Parameters:
e The art::Event to filter
Returns:
Whether the event passes the filter

This function is where RandomDelayFilter performs its work, using the delay distribution to pick a delay time, spinning and/or sleeping for that amount of time, then picking an integer from the pass distribution to determine if the event should pass or not.

Definition at line 134 of file RandomDelayFilter_module.cc.

RandomDelayFilter& artdaq::RandomDelayFilter::operator= ( RandomDelayFilter &&   ) 

Move Assignment operator is deleted.

Returns:
RandomDelayFilter instance
RandomDelayFilter& artdaq::RandomDelayFilter::operator= ( RandomDelayFilter const &   ) 

Copy Assignment operator is deleted.

Returns:
RandomDelayFilter copy

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

Generated on 19 Feb 2018 for artdaq by  doxygen 1.6.1