30 mNThreads = std::max(1, ic.
options().
get<
int>(
"nthreads"));
35 LOG(info) <<
"Start running with " << mNThreads <<
" threads";
38 uint64_t totalClusters = 0;
42 auto digits = pc.
inputs().
get<gsl::span<o2::iotof::Digit>>(std::format(
"digits_{}", iLayer));
43 auto rofs = pc.
inputs().
get<gsl::span<o2::itsmft::ROFRecord>>(std::format(
"ROframes_{}", iLayer));
45 LOG(
debug) <<
"Got " <<
digits.size() <<
" digits and " << rofs.size() <<
" ROFs for layer " << iLayer;
46 gsl::span<const char> labelbuffer;
48 labelbuffer = pc.
inputs().
get<gsl::span<char>>(std::format(
"labels_{}", iLayer));
49 LOG(
debug) <<
"Got " << labelbuffer.size() <<
" bytes of MC labels for layer " << iLayer;
53 std::vector<o2::iotof::Cluster>
clusters;
54 std::vector<unsigned char> patterns;
55 std::vector<o2::itsmft::ROFRecord> clusterROFs;
56 std::unique_ptr<o2::dataformats::MCTruthContainer<o2::MCCompLabel>> clusterLabels;
58 clusterLabels = std::make_unique<o2::dataformats::MCTruthContainer<o2::MCCompLabel>>();
61 LOG(info) <<
"Running IOTOF Clusterer for layer " << iLayer;
67 mUseMC ? &
labels :
nullptr,
69 LOG(info) <<
"Clusterization produced " <<
clusters.size() <<
" clusters for layer " << iLayer;
78 LOGP(info,
"Pushed {} clusters in {} ROFs for layer {}",
clusters.size(), clusterROFs.size(), iLayer);
79 LOGP(info,
"Pushed {} MC labels for layer {}", mUseMC ? clusterLabels->getNElements() : 0, iLayer);
84 static constexpr int nLayers = 2;
85 std::vector<o2::framework::InputSpec> inputs;
88 inputs.emplace_back(std::format(
"digits_{}", iLayer),
"TF3",
"DIGITS", iLayer, o2::framework::Lifetime::Timeframe);
89 inputs.emplace_back(std::format(
"ROframes_{}", iLayer),
"TF3",
"DIGITSROF", iLayer, o2::framework::Lifetime::Timeframe);
91 inputs.emplace_back(std::format(
"labels_{}", iLayer),
"TF3",
"DIGITSMCTR", iLayer, o2::framework::Lifetime::Timeframe);
94 std::vector<o2::framework::OutputSpec> outputs;
95 outputs.emplace_back(
"TF3",
"COMPCLUSTERS", iLayer, o2::framework::Lifetime::Timeframe);
96 outputs.emplace_back(
"TF3",
"PATTERNS", iLayer, o2::framework::Lifetime::Timeframe);
97 outputs.emplace_back(
"TF3",
"CLUSTERSROF", iLayer, o2::framework::Lifetime::Timeframe);
99 outputs.emplace_back(
"TF3",
"CLUSTERSMCTR", iLayer, o2::framework::Lifetime::Timeframe);
std::vector< std::string > labels
A const (ready only) version of MCTruthContainer.
Definition of the GeometryManager class.
static void loadGeometry(std::string_view geomFilePath="", bool applyMisalignment=false, bool preferAlignedFile=true)
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
o2::header::DataHeader::SubSpecificationType SubSpecificationType
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
void run(o2::framework::ProcessingContext &pc) final
void init(o2::framework::InitContext &ic) final
virtual void process(gsl::span< const Digit > digits, gsl::span< const DigROFRecord > digitROFs, std::vector< o2::iotof::Cluster > &clusters, std::vector< unsigned char > &patterns, std::vector< o2::itsmft::ROFRecord > &clusterROFs, const ConstDigitTruth *digitLabels=nullptr, ClusterTruth *clusterLabels=nullptr, gsl::span< const DigMC2ROFRecord > digMC2ROFs={}, std::vector< o2::itsmft::MC2ROFRecord > *clusterMC2ROFs=nullptr)
Defining ITS Vertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
o2::framework::DataProcessorSpec getClustererSpec(bool useMC)
o2::framework::DataProcessorSpec getIOTOFClustererSpec(bool useMC)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< Cluster > clusters
std::vector< Digit > digits