22#include <boost/property_tree/ptree.hpp>
42 void configure(
const boost::property_tree::ptree& config)
override
44 mLowerLimit = config.get<
size_t>(
"lowerLimit");
45 mUpperLimit = config.get<
size_t>(
"upperLimit");
46 if (mLowerLimit > mUpperLimit) {
47 LOG(warn) <<
"Lower limit is higher than upper limit.";
55 return payloadSize >= mLowerLimit && payloadSize <= mUpperLimit;
65 return std::make_unique<DataSamplingConditionPayloadSize>();
A definition of DataSamplingConditionFactory.
A standarised data sampling condition, to decide if given data sample should be passed forward.
static std::unique_ptr< DataSamplingCondition > createDataSamplingConditionPayloadSize()
Getter for DataSamplingConditionPayloadSize.
A DataSamplingCondition which makes decisions based on payload size.
~DataSamplingConditionPayloadSize() override=default
Default destructor.
DataSamplingConditionPayloadSize()
Constructor.
bool decide(const o2::framework::DataRef &dataRef) override
Makes a positive decision if the payload size is within given limits.
void configure(const boost::property_tree::ptree &config) override
Reads 'lowerLimit' and 'UpperLimit' of allowed payload size.
A standardised data sampling condition, to decide if given data sample should be passed forward.
Defining PrimaryVertex explicitly as messageable.
A header which contains some meta-data generated by Data Sampling.
static o2::header::DataHeader::PayloadSizeType getPayloadSize(const DataRef &ref)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"