Skip to content

Commit d3b4538

Browse files
committed
MacOS build failure: defininig constexpr arrays
1 parent a5d68b0 commit d3b4538

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Modules/ITS/include/ITS/ITSClusterTask.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ class ITSClusterTask : public TaskInterface
140140
int minColSpanLongCluster = 128; // driven by o2::itsmft::ClusterPattern::MaxColSpan = 128
141141
int maxRowSpanLongCluster = 29;
142142

143-
const int mNStaves[NLayer] = { 12, 16, 20, 24, 30, 42, 48 };
144-
const int mNHicPerStave[NLayer] = { 1, 1, 1, 8, 8, 14, 14 };
145-
const int mNChipsPerHic[NLayer] = { 9, 9, 9, 14, 14, 14, 14 };
146-
const int mNLanePerHic[NLayer] = { 3, 3, 3, 2, 2, 2, 2 };
147-
const int ChipBoundary[NLayer + 1] = { 0, 108, 252, 432, 3120, 6480, 14712, 24120 };
148-
const int StaveBoundary[NLayer + 1] = { 0, 12, 28, 48, 72, 102, 144, 192 };
149-
const float mLength[NLayer] = { 14., 14., 14., 43., 43., 74., 74. };
143+
static constexpr int mNStaves[NLayer] = { 12, 16, 20, 24, 30, 42, 48 };
144+
static constexpr int mNHicPerStave[NLayer] = { 1, 1, 1, 8, 8, 14, 14 };
145+
static constexpr int mNChipsPerHic[NLayer] = { 9, 9, 9, 14, 14, 14, 14 };
146+
static constexpr int mNLanePerHic[NLayer] = { 3, 3, 3, 2, 2, 2, 2 };
147+
static constexpr int ChipBoundary[NLayer + 1] = { 0, 108, 252, 432, 3120, 6480, 14712, 24120 };
148+
static constexpr int StaveBoundary[NLayer + 1] = { 0, 12, 28, 48, 72, 102, 144, 192 };
149+
static constexpr float mLength[NLayer] = { 14., 14., 14., 43., 43., 74., 74. };
150150
const std::string mYlabels[NLayer * 2] = { "L6B(S24#rightarrow47)", "L5B(S21#rightarrow41)", "L4B(S15#rightarrow29)", "L3B(S12#rightarrow23)", "L2B(S10#rightarrow19)", "L1B(S08#rightarrow15)", "L0B(S06#rightarrow11)", "L0T(S00#rightarrow05)", "L1T(S00#rightarrow07)", "L2T(S00#rightarrow09)", "L3T(S00#rightarrow11)", "L4T(S00#rightarrow14)", "L5T(S00#rightarrow20)", "L6T(S00#rightarrow23)" };
151151

152152
int mEnableLayers[NLayer] = { 0 };

Modules/ITS/src/ITSClusterTask.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
155155
const auto& ROF = clusRofArr[iROF];
156156
const auto bcdata = ROF.getBCData();
157157
int nClustersForBunchCrossing = 0;
158-
int nLongClusters[ChipBoundary[3]] = {};
159-
int nHitsFromClusters[ChipBoundary[3]] = {}; // only IB is implemented at the moment
158+
int nLongClusters[ChipBoundary[NLayerIB]] = {};
159+
int nHitsFromClusters[ChipBoundary[NLayerIB]] = {}; // only IB is implemented at the moment
160160

161161
for (int icl = ROF.getFirstEntry(); icl < ROF.getFirstEntry() + ROF.getNEntries(); icl++) {
162162

@@ -181,9 +181,11 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
181181
if (ClusterID != o2::itsmft::CompCluster::InvalidPatternID) { // Normal (frequent) cluster shapes
182182
if (!mDict->isGroup(ClusterID)) {
183183
npix = mDict->getNpixels(ClusterID);
184+
184185
// TODO: is there way other than calling the pattern?
185186
colspan = mDict->getPattern(ClusterID).getColumnSpan();
186187
rowspan = mDict->getPattern(ClusterID).getRowSpan();
188+
187189
if (mDoPublishDetailedSummary == 1) {
188190
locC = mDict->getClusterCoordinates(cluster);
189191
}
@@ -277,11 +279,9 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
277279
for (int ichip = 0; ichip < ChipBoundary[NLayerIB]; ichip++) {
278280

279281
int nLong = TMath::Min(nLongClusters[ichip], 21);
280-
281282
if (nLong < 1) {
282283
continue;
283284
}
284-
285285
int ilayer = -1;
286286
while (ichip >= ChipBoundary[ilayer + 1]) {
287287
ilayer++;

0 commit comments

Comments
 (0)