Skip to content

Commit fb9931a

Browse files
committed
Fix asserts checking N layers in staggered R/O helpers
1 parent 1472563 commit fb9931a

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/DPLAlpideParam.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "CommonUtils/ConfigurableParam.h"
1717
#include "CommonUtils/ConfigurableParamHelper.h"
1818
#include "CommonConstants/LHCConstants.h"
19+
#include "DataFormatsITSMFT/ClusterID.h"
1920
#include <string_view>
2021

2122
namespace o2
@@ -76,6 +77,10 @@ struct DPLAlpideParam : public o2::conf::ConfigurableParamHelper<DPLAlpideParam<
7677
}
7778

7879
static_assert(N == o2::detectors::DetID::ITS || N == o2::detectors::DetID::MFT, "only DetID::ITS orDetID:: MFT are allowed");
80+
// the per-layer clusters are referred to by the composed ID of ClusterID.h, whose layer field must
81+
// match the number of layers of this detector, see composeClusID
82+
static_assert(getNLayers() == (N == o2::detectors::DetID::ITS ? MaxITSClusLayers : MaxMFTClusLayers),
83+
"layers count mismatch between DPLAlpideParam and the composed cluster ID encoding of ClusterID.h");
7984
static_assert(o2::constants::lhc::LHCMaxBunches % DEFROFLengthBC() == 0); // make sure ROF length is divisor of the orbit
8085
};
8186

‎Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ class MatchTPCITS
375375
static constexpr int MaxSeedsPerLayer = 50; // TODO
376376
static constexpr int NITSLayers = o2::its::RecoGeomHelper::getNLayers();
377377
static_assert(NITSLayers == AlpParamITS::getNLayers(), "ITS layers count mismatch between geometry helper and DPLAlpideParam");
378+
static_assert(NITSLayers == o2::itsmft::MaxITSClusLayers, "ITS layers count mismatch between geometry helper and the composed cluster ID encoding");
378379
///< perform matching for provided input
379380
#if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__ROOTCLING__) && !defined(__CLING__)
380381
void run(const o2::globaltracking::RecoContainer& inp,

0 commit comments

Comments
 (0)