Skip to content

Commit b19b082

Browse files
committed
RecoContainer should create sharedClusterMap only if both clusters and tracks are requested
1 parent d3439fd commit b19b082

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

DataFormats/Detectors/GlobalTracking/include/DataFormatsGlobalTracking/RecoContainer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ struct RecoContainer {
122122
void addTOFMatches(o2::framework::ProcessingContext& pc, bool mc);
123123

124124
void addITSClusters(o2::framework::ProcessingContext& pc, bool mc);
125-
void addTPCClusters(o2::framework::ProcessingContext& pc, bool mc);
125+
void addTPCClusters(o2::framework::ProcessingContext& pc, bool mc, bool shmap);
126126
void addTOFClusters(o2::framework::ProcessingContext& pc, bool mc);
127127
void addTRDTracklets(o2::framework::ProcessingContext& pc);
128128

DataFormats/Detectors/GlobalTracking/src/RecoContainer.cxx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ void DataRequest::requestTPCTracks(bool mc)
4848
{
4949
addInput({"trackTPC", "TPC", "TRACKS", 0, Lifetime::Timeframe});
5050
addInput({"trackTPCClRefs", "TPC", "CLUSREFS", 0, Lifetime::Timeframe});
51+
if (requestMap.find("clusTPC") != requestMap.end()) {
52+
addInput({"clusTPCshmap", "TPC", "CLSHAREDMAP", 0, Lifetime::Timeframe});
53+
}
5154
if (mc) {
5255
addInput({"trackTPCMCTR", "TPC", "TRACKSMCLBL", 0, Lifetime::Timeframe});
5356
}
@@ -114,7 +117,9 @@ void DataRequest::requestITSClusters(bool mc)
114117
void DataRequest::requestTPCClusters(bool mc)
115118
{
116119
addInput({"clusTPC", ConcreteDataTypeMatcher{"TPC", "CLUSTERNATIVE"}, Lifetime::Timeframe});
117-
addInput({"clusTPCshmap", "TPC", "CLSHAREDMAP", 0, Lifetime::Timeframe});
120+
if (requestMap.find("trackTPC") != requestMap.end()) {
121+
addInput({"clusTPCshmap", "TPC", "CLSHAREDMAP", 0, Lifetime::Timeframe});
122+
}
118123
if (mc) {
119124
addInput({"clusITSMC", "ITS", "CLUSTERSMCTR", 0, Lifetime::Timeframe});
120125
}
@@ -246,7 +251,7 @@ void RecoContainer::collectData(ProcessingContext& pc, const DataRequest& reques
246251

247252
req = reqMap.find("clusTPC");
248253
if (req != reqMap.end()) {
249-
addTPCClusters(pc, req->second);
254+
addTPCClusters(pc, req->second, reqMap.find("trackTPC") != reqMap.end());
250255
}
251256

252257
req = reqMap.find("clusTOF");
@@ -336,10 +341,12 @@ void RecoContainer::addITSClusters(ProcessingContext& pc, bool mc)
336341
}
337342

338343
//__________________________________________________________
339-
void RecoContainer::addTPCClusters(ProcessingContext& pc, bool mc)
344+
void RecoContainer::addTPCClusters(ProcessingContext& pc, bool mc, bool shmap)
340345
{
341346
inputsTPCclusters = o2::tpc::getWorkflowTPCInput(pc, 0, mc);
342-
clusterShMapTPC = pc.inputs().get<gsl::span<unsigned char>>("clusTPCshmap");
347+
if (shmap) {
348+
clusterShMapTPC = pc.inputs().get<gsl::span<unsigned char>>("clusTPCshmap");
349+
}
343350
}
344351

345352
void RecoContainer::addTRDTracklets(ProcessingContext& pc)

0 commit comments

Comments
 (0)