@@ -25,6 +25,8 @@ class MCCompLabel
2525
2626 ULong64_t mLabel = NotSet; // /< MC label encoding MCtrack ID and MCevent origin
2727
28+ void checkFieldConsistensy ();
29+
2830 public:
2931 // number of bits reserved for MC track ID, DON'T modify this, since the
3032 // track ID might be negative
@@ -33,11 +35,6 @@ class MCCompLabel
3335 static constexpr int nbitsSrcID = 8 ; // number of bits reserved for MC source ID
3436 // the rest of the bits is reserved at the moment
3537
36- // check if the fields are defined consistently
37- static_assert (nbitsTrackID == sizeof (int ) * 8 , " TrackID must have int size" );
38- static_assert (nbitsTrackID + nbitsEvID + nbitsSrcID <= sizeof (ULong64_t) * 8 ,
39- " Fields cannot be stored in 64 bits" );
40-
4138 // mask to extract MC track ID
4239 static constexpr ULong64_t maskTrackID = (ul0x1 << nbitsTrackID) - 1 ;
4340 // mask to extract MC track ID
@@ -105,17 +102,4 @@ class MCCompLabel
105102
106103std::ostream& operator <<(std::ostream& os, const o2::MCCompLabel& c);
107104
108- namespace std
109- {
110- // defining std::hash for MCCompLabel in order to be used with unordered_maps
111- template <>
112- struct hash <o2::MCCompLabel> {
113- public:
114- size_t operator ()(o2::MCCompLabel const & label) const
115- {
116- return static_cast <uint64_t >(label);
117- }
118- };
119- } // namespace std
120-
121105#endif
0 commit comments