Skip to content

Commit 4655f50

Browse files
committed
TPC cluster/digits helper can walk over sampled data
1 parent a4e0841 commit 4655f50

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

DataFormats/Detectors/TPC/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ o2_add_library(
3434
O2::ReconstructionDataFormats
3535
O2::CommonDataFormat
3636
O2::Headers
37+
O2::DataSampling
3738
O2::Algorithm)
3839

3940
o2_target_root_dictionary(

DataFormats/Detectors/TPC/include/DataFormatsTPC/WorkflowHelper.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "Framework/DataRefUtils.h"
2222
#include <Framework/InputRecord.h>
2323
#include "Framework/InputRecordWalker.h"
24+
#include "DataSampling/DataSamplingHeader.h"
2425
#include "DataFormatsTPC/TrackTPC.h"
2526
#include "SimulationDataFormat/MCCompLabel.h"
2627
#include "SimulationDataFormat/MCTruthContainer.h"
@@ -80,7 +81,7 @@ static auto getWorkflowTPCInput(o2::framework::ProcessingContext& pc, int verbos
8081
if (do_digits) {
8182
std::fill(inputDigitsMCIndex.begin(), inputDigitsMCIndex.end(), -1);
8283
}
83-
for (auto const& ref : o2::framework::InputRecordWalker(pc.inputs(), filter)) {
84+
for (auto const& ref : o2::framework::InputRecordWalker<o2::utilities::DataSamplingHeader>(pc.inputs(), filter)) {
8485
auto const* sectorHeader = o2::framework::DataRefUtils::getHeader<TPCSectorHeader*>(ref);
8586
if (sectorHeader == nullptr) {
8687
// FIXME: think about error policy
@@ -127,7 +128,7 @@ static auto getWorkflowTPCInput(o2::framework::ProcessingContext& pc, int verbos
127128
{"check", o2::framework::ConcreteDataTypeMatcher{o2::header::gDataOriginTPC, "CLUSTERNATIVE"}, o2::framework::Lifetime::Timeframe},
128129
};
129130
unsigned long recvMask = 0;
130-
for (auto const& ref : o2::framework::InputRecordWalker(pc.inputs(), filter)) {
131+
for (auto const& ref : o2::framework::InputRecordWalker<o2::utilities::DataSamplingHeader>(pc.inputs(), filter)) {
131132
auto const* sectorHeader = o2::framework::DataRefUtils::getHeader<TPCSectorHeader*>(ref);
132133
if (sectorHeader == nullptr) {
133134
throw std::runtime_error("sector header missing on header stack");

0 commit comments

Comments
 (0)