Skip to content

Commit fe58ccb

Browse files
committed
Static_assert check for hit property space
Need to check if data-layout compatible with number of detectors. Important in view of ALICE3 extensions etc.
1 parent ef5202a commit fe58ccb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • DataFormats/simulation/include/SimulationDataFormat

DataFormats/simulation/include/SimulationDataFormat/MCTrack.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "TParticle.h"
2828
#include "TParticlePDG.h"
2929
#include "TVector3.h"
30+
#include <type_traits>
3031

3132
namespace o2
3233
{
@@ -261,6 +262,7 @@ class MCTrackT
261262
int storage : 1; // encoding whether to store this track to the output
262263
unsigned int process : 6; // encoding process that created this track (enough to store TMCProcess from ROOT)
263264
int hitmask : 22; // encoding hits per detector
265+
static_assert(o2::detectors::DetID::nDetectors <= 22); // ensure that all known detectors can be encoded here by a bit
264266
int reserved1 : 1; // bit reserved for possible future purposes
265267
int inhibited : 1; // whether tracking of this was inhibited
266268
int toBeDone : 1; // whether this (still) needs tracking --> we might more complete information to cover full ParticleStatus space

0 commit comments

Comments
 (0)