21 inline int countBits(uint64_t n)
23 return static_cast<int>(std::bitset<64>(n).count());
29 template <
typename AXIS_NAME_T,
typename CONTAINER_T>
30 uint64_t to_bit_mask(
const CONTAINER_T& container)
33 return std::accumulate(container.begin(), container.end(), uint64_t(0),
34 [](
const auto & lhs,
const auto & rhs) {
35 const auto bitshift = uint64_t(AXIS_NAME_T::get(rhs));
37 throw std::runtime_error(
"from:\nuint64_t to_bit_mask(const CONTAINER_T& container)\ninput number to large.\n\n");
39 return lhs | (uint64_t(1) << bitshift);
Abstract base class for different kinds of events.