Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RLinearizedIndex.hxx
Go to the documentation of this file.
1/// \file
2/// \warning This is part of the %ROOT 7 prototype! It will change without notice. It might trigger earthquakes.
3/// Feedback is welcome!
4
5#ifndef ROOT_RLinearizedIndex
6#define ROOT_RLinearizedIndex
7
8#include <cstddef>
9#include <cstdint>
10
11namespace ROOT {
12namespace Experimental {
13
14/**
15A linearized index that can be invalid.
16
17For example, when an argument is outside the axis and underflow / overflow bins are disabled.
18
19\warning This is part of the %ROOT 7 prototype! It will change without notice. It might trigger earthquakes.
20Feedback is welcome!
21*/
23 // We use std::uint64_t instead of std::size_t for the index because for sparse histograms, not all bins have to be
24 // allocated in memory. However, we require that the index has at least that size.
25 static_assert(sizeof(std::uint64_t) >= sizeof(std::size_t), "index type not large enough to address all bins");
26
27 std::uint64_t fIndex = 0;
28 bool fValid = false;
29};
30
31} // namespace Experimental
32} // namespace ROOT
33
34#endif
A linearized index that can be invalid.