diff --git a/Framework/TestWorkflows/src/o2TestHistograms.cxx b/Framework/TestWorkflows/src/o2TestHistograms.cxx index 2ec268130267b..326170dc56eff 100644 --- a/Framework/TestWorkflows/src/o2TestHistograms.cxx +++ b/Framework/TestWorkflows/src/o2TestHistograms.cxx @@ -39,8 +39,17 @@ DECLARE_SOA_TABLE(SkimmedExampleTrack, "AOD", "SKIMEXTRK", //! struct EtaAndClsHistogramsSimple { OutputObj etaClsH{TH2F("eta_vs_pt", "#eta vs pT", 102, -2.01, 2.01, 100, 0, 10)}; Produces skimEx; + Configurable trackFilterString{"track-filter", "o2::aod::track::pt < 10.f", "Track filter string"}; + Filter trackFilter = o2::aod::track::pt < 10.f; - void process(aod::Tracks const& tracks, aod::FT0s const&) + void init(InitContext&) + { + if (!trackFilterString->empty()) { + trackFilter = trackFilterString; + } + } + + void process(soa::Filtered const& tracks, aod::FT0s const&) { LOGP(info, "Invoking the simple one"); for (auto& track : tracks) { @@ -53,10 +62,19 @@ struct EtaAndClsHistogramsSimple { struct EtaAndClsHistogramsIUSimple { OutputObj etaClsH{TH2F("eta_vs_pt", "#eta vs pT", 102, -2.01, 2.01, 100, 0, 10)}; Produces skimEx; + Configurable trackFilterString{"track-filter", "o2::aod::track::pt < 10.f", "Track filter string"}; + Filter trackFilter = o2::aod::track::pt < 10.f; - void process(aod::TracksIU const& tracks, aod::FT0s const&) + void init(InitContext&) { - LOGP(info, "Invoking the simple one"); + if (!trackFilterString->empty()) { + trackFilter = trackFilterString; + } + } + + void process(soa::Filtered const& tracks, aod::FT0s const&) + { + LOGP(info, "Invoking the simple one IU"); for (auto& track : tracks) { etaClsH->Fill(track.eta(), track.pt()); skimEx(track.pt(), track.eta()); @@ -66,8 +84,17 @@ struct EtaAndClsHistogramsIUSimple { struct EtaAndClsHistogramsFull { OutputObj etaClsH{TH3F("eta_vs_cls_vs_sigmapT", "#eta vs N_{cls} vs sigma_{1/pT}", 102, -2.01, 2.01, 160, -0.5, 159.5, 100, 0, 10)}; + Configurable trackFilterString{"track-filter", "o2::aod::track::pt < 10.f", "Track filter string"}; + Filter trackFilter = o2::aod::track::pt < 10.f; + + void init(InitContext&) + { + if (!trackFilterString->empty()) { + trackFilter = trackFilterString; + } + } - void process(soa::Join const& tracks) + void process(soa::Filtered> const& tracks) { LOGP(info, "Invoking the run 3 one"); for (auto& track : tracks) {