30 mNThreads = std::max(1, ic.
options().
get<
int>(
"nthreads"));
35 LOG(info) <<
"Start running with " << mNThreads <<
" threads";
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;
70 LOG(info) <<
"Clusterization produced " << patterns.size() <<
" patterns for layer " << iLayer;
71 LOG(info) <<
"Clusterization produced " << clusterROFs.size() <<
" ROFs for layer " << iLayer;
80 LOGP(info,
"Pushed {} clusters, {} patterns, in {} ROFs for layer {}",
clusters.size(), patterns.size(), clusterROFs.size(), iLayer);
81 LOGP(info,
"Pushed {} MC labels for layer {}", mUseMC ? clusterLabels->getNElements() : 0, iLayer);
86 static constexpr int nLayers = 2;
87 std::vector<o2::framework::InputSpec> inputs;
90 inputs.emplace_back(std::format(
"digits_{}", iLayer),
"TF3",
"DIGITS", iLayer, o2::framework::Lifetime::Timeframe);
91 inputs.emplace_back(std::format(
"ROframes_{}", iLayer),
"TF3",
"DIGITSROF", iLayer, o2::framework::Lifetime::Timeframe);
93 inputs.emplace_back(std::format(
"labels_{}", iLayer),
"TF3",
"DIGITSMCTR", iLayer, o2::framework::Lifetime::Timeframe);
96 std::vector<o2::framework::OutputSpec> outputs;
97 outputs.emplace_back(
"TF3",
"CLUSTERS", iLayer, o2::framework::Lifetime::Timeframe);
98 outputs.emplace_back(
"TF3",
"PATTERNS", iLayer, o2::framework::Lifetime::Timeframe);
99 outputs.emplace_back(
"TF3",
"CLUSTERSROF", iLayer, o2::framework::Lifetime::Timeframe);
101 outputs.emplace_back(
"TF3",
"CLUSTERSMCTR", iLayer, o2::framework::Lifetime::Timeframe);
A const (ready only) version of MCTruthContainer.
Definition of the GeometryManager class.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
std::vector< o2::MCCompLabel > labels
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)
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.
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