37 auto tdata =
reinterpret_cast<std::vector<T>*
>(
data);
38 LOGP(info,
"MCH {:d} {:s}", tdata->size(), what);
43 if (
name ==
"trackrofs") {
44 printBranch<ROFRecord>(
data,
"ROFS");
46 if (
name ==
"trackclusters") {
47 printBranch<Cluster>(
data,
"CLUSTERS");
49 if (
name ==
"tracks") {
50 printBranch<TrackMCH>(
data,
"TRACKS");
52 if (
name ==
"trackdigits") {
53 printBranch<Digit>(
data,
"DIGITS");
55 if (
name ==
"tracklabels") {
56 auto tdata =
reinterpret_cast<std::vector<o2::MCCompLabel>*
>(
data);
57 LOGP(info,
"MCH {:d} {:s}", tdata->size(),
"LABELS");
72 LOGP(warning,
"Not reading MCH Track Labels");
74 auto treeName =
"o2sim";
104 mTreeReader = std::make_unique<RootTreeReader>(
115 mTreeReader = std::make_unique<RootTreeReader>(
131 if (mTreeReader->next()) {
141 std::vector<OutputSpec> outputSpecs;
142 outputSpecs.emplace_back(
OutputSpec{{
"tracks"},
"MCH",
"TRACKS", subspec, Lifetime::Timeframe});
143 outputSpecs.emplace_back(
OutputSpec{{
"trackrofs"},
"MCH",
"TRACKROFS", subspec, Lifetime::Timeframe});
144 outputSpecs.emplace_back(
OutputSpec{{
"trackclusters"},
"MCH",
"TRACKCLUSTERS", subspec, Lifetime::Timeframe});
146 outputSpecs.emplace_back(
OutputSpec{{
"trackdigits"},
"MCH",
"TRACKDIGITS", subspec, Lifetime::Timeframe});
149 outputSpecs.emplace_back(
OutputSpec{{
"tracklabels"},
"MCH",
"TRACKLABELS", subspec, Lifetime::Timeframe});
153 {
"infile", VariantType::String,
"mchtracks.root", {
"name of the input track file"}},
154 {
"input-dir", VariantType::String,
"none", {
"Input directory"}}};
157 fmt::format(
"{}{}",
specName, subspec),
160 adaptFromTask<TrackReader>(useMC,
digits, subspec),
A generic reader for ROOT TTrees.
Definition of the MCH track.
T get(const char *key) const
@ Single
no more data after end of tree
ConfigParamRegistry const & options()
ServiceRegistryRef services()
The services registry associated with this processing context.
GLuint const GLchar * name
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
o2::framework::DataProcessorSpec getTrackReaderSpec(bool useMC, const char *specName="mch-tracks-reader", bool digits=false, uint32_t subspec=0)
void printBranch(char *data, const char *what)
RootTreeReader::SpecialPublishHook logging
header::DataHeader::SubSpecificationType mSubSpec
void run(ProcessingContext &pc)
void init(InitContext &ic)
TrackReader(bool useMC, bool digits, uint32_t subSpec=0)
std::unique_ptr< RootTreeReader > mTreeReader
static std::string rectifyDirectory(const std::string_view p)
static std::string concat_string(Ts const &... ts)
std::vector< Digit > digits