3 #ifndef CUSTOMCOLORGL_INCLUDED
4 #define CUSTOMCOLORGL_INCLUDED
8 #ifndef ROOT_TError //'ROOT-style' inclusion guards.
16 namespace GLTutorials {
26 ::Error(
"FindFreeCustomColorIndex",
"gROOT is null");
33 if (!
gROOT->GetColor(i))
36 ::Error(
"FindFreeCustomColorIndex",
"no index found");
43 template <
typename T,
unsigned N>
48 tmp[0] = FindFreeCustomColorIndex<T>();
53 for (; nFound <
N; ++nFound) {
55 if (tmp[nFound] == -1)
60 std::copy(tmp, tmp + N, indices);
unsigned FindFreeCustomColorIndices(T(&indices)[N])
T FindFreeCustomColorIndex(T start=1000)
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
void Error(ErrorHandler_t func, int code, const char *va_(fmt),...)
Write error message and call a handler, if required.