21#include <fmt/format.h>
46 FilteringBCDeviceDPL(std::shared_ptr<o2::base::GRPGeomRequest> gr,
bool useMC, std::vector<of::OutputSpec> outputSpecs) : mGGCCDBRequest(gr), mUseMC(useMC)
62 LOG(info) <<
"Update Bunch Filling for MID";
69 updateTimeDependentParams(pc);
74 auto inMCContainer = mUseMC ?
specs::getLabels(pc,
"mid_filter_BC_in") :
nullptr;
76 auto filteredROFs = mFiltererBC.
process(inROFRecords);
77 mDigitsMerger.
process(
data, filteredROFs, inMCContainer.get());
93 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
95 FiltererBC mFiltererBC;
96 DigitsMerger mDigitsMerger;
97 std::vector<of::Output> mOutputs;
104 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
119 of::AlgorithmSpec{of::adaptFromTask<o2::mid::FilteringBCDeviceDPL>(ggRequest, useMC, outputSpecs)}};
Utilities for MID Column Data Specs.
Strip pattern (aka digits)
Helper for geometry and GRP related CCDB requests.
Definition of a container to keep Monte Carlo truth external to simulation objects.
void checkUpdates(o2::framework::ProcessingContext &pc)
static GRPGeomHelper & instance()
void setRequest(std::shared_ptr< GRPGeomRequest > req)
static const FiltererBCParam & Instance()
void snapshot(const Output &spec, T const &object)
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
const std::vector< ColumnData > & getColumnData() const
Gets the merged column data.
void process(const std::vector< ColumnData > &inDigitStore, const o2::dataformats::MCTruthContainer< MCLabel > &inMCContainer, const std::vector< ROFRecord > &inROFRecords, bool mergeInBunchPileup=true)
Merges the MC digits that are provided per hit into the format that we expect from data.
const o2::dataformats::MCTruthContainer< MCLabel > & getMCContainer() const
Gets the merged MC labels.
const std::vector< ROFRecord > & getROFRecords() const
Gets the merged RO frame records.
void setBCDiffLow(int bcDiffLow)
Set the maximum BC diff in the lower side.
void setBunchFilling(const BunchFilling &bunchFilling)
Sets the bunch filling scheme.
std::vector< ROFRecord > process(gsl::span< const ROFRecord > rofRecords)
Filters the data BC.
void setSelectOnly(bool selectOnly)
Only selects BCs but do not merge them.
void setBCDiffHigh(int bcDiffHigh)
Set the maximum BC diff in the upper side.
void finaliseCCDB(of::ConcreteDataMatcher matcher, void *obj)
void run(of::ProcessingContext &pc)
void init(of::InitContext &ic)
FilteringBCDeviceDPL(std::shared_ptr< o2::base::GRPGeomRequest > gr, bool useMC, std::vector< of::OutputSpec > outputSpecs)
Defining PrimaryVertex explicitly as messageable.
std::vector< framework::InputSpec > buildInputSpecs(std::string_view dataBind, std::string_view dataDesc, bool useMC)
std::vector< framework::OutputSpec > buildStandardOutputSpecs(std::string_view dataBind, std::string_view dataDesc, bool useMC)
std::vector< framework::Output > buildOutputs(std::vector< framework::OutputSpec > outputSpecs)
std::array< gsl::span< const ColumnData >, NEvTypes > getData(framework::ProcessingContext &pc, std::string_view dataBind)
std::unique_ptr< const o2::dataformats::MCTruthContainer< MCLabel > > getLabels(framework::ProcessingContext &pc, std::string_view dataBind)
std::array< gsl::span< const ROFRecord >, NEvTypes > getRofs(framework::ProcessingContext &pc, std::string_view dataBind)
framework::DataProcessorSpec getFilteringBCSpec(bool useMC=true, std::string_view inDesc="FDATA")
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"