48 const auto detName = Origin.as<std::string>();
50 auto compClusterSizes = std::make_shared<std::array<size_t, NLayers>>();
52 auto const* dh = DataRefUtils::getHeader<o2::header::DataHeader*>(
ref);
53 (*compClusterSizes)[dh->subSpecification] = compClusters.size();
55 auto logger = [detName, compClusterSizes](std::vector<o2::itsmft::ROFRecord>
const& rofs,
DataRef const&
ref) {
56 auto const* dh = DataRefUtils::getHeader<o2::header::DataHeader*>(
ref);
57 const auto i = dh->subSpecification;
58 LOG(info) << detName <<
"ClusterWriter:" <<
i <<
" pulled " << (*compClusterSizes)[
i] <<
" clusters, in " << rofs.size() <<
" RO frames";
60 auto getIndex = [](
DataRef const&
ref) ->
size_t {
61 auto const* dh = DataRefUtils::getHeader<o2::header::DataHeader*>(
ref);
62 return static_cast<size_t>(dh->subSpecification);
64 auto getName = [](std::string base,
size_t index) -> std::string {
70 auto detNameLC = detName;
71 std::transform(detNameLC.begin(), detNameLC.end(), detNameLC.begin(), [](
unsigned char c) { return std::tolower(c); });
76 (detName +
"ClusterComp").c_str(),
"compact-cluster-branch",
78 compClustersSizeGetter,
82 (detName +
"ClusterPatt").c_str(),
"cluster-pattern-branch",
87 (detName +
"ClustersROF").c_str(),
"cluster-rof-branch",
93 (detName +
"ClusterMCTruth").c_str(),
"cluster-label-branch",
94 (useMC ? NLayers : 0),
98 (detName +
"ClustersMC2ROF").c_str(),
"cluster-mc2rof-branch",
99 (useMC ? NLayers : 0),
Definition of the ITSMFT compact cluster.
std::string getName(const TDataMember *dm, int index, int size)
Definition of a container to keep Monte Carlo truth external to simulation objects.
Configurable generator for RootTreeWriter processor spec.
Generate a processor spec for the RootTreeWriter utility.
constexpr o2::header::DataOrigin gDataOriginMFT
constexpr o2::header::DataOrigin gDataOriginITS
Defining PrimaryVertex explicitly as messageable.
std::vector< o2::itsmft::ROFRecord > ROFrameRType
std::vector< o2::itsmft::MC2ROFRecord > ROFRecLblT
framework::DataProcessorSpec getClusterWriterSpec(bool useMC)
framework::DataProcessorSpec getMFTClusterWriterSpec(bool useMC)
std::vector< unsigned char > PatternsType
framework::DataProcessorSpec getITSClusterWriterSpec(bool useMC)
std::vector< o2::itsmft::CompClusterExt > CompClusType
std::string to_string(gsl::span< T, Size > span)
static constexpr bool supportsStaggering() noexcept
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"