3 #ifndef CUSTOMCOLOR_INCLUDED
4 #define CUSTOMCOLOR_INCLUDED
13 namespace CocoaTutorials {
16 inline Color_t FindFreeCustomColorIndex(Color_t start = 1000)
20 ::Error(
"FindFreeCustomColorIndex",
"gROOT is null");
25 for (Color_t i = std::max(start, Color_t(1000)), e = 10000; i < e; ++i)
26 if (!gROOT->GetColor(i))
29 ::Error(
"FindFreeCustomColorIndex",
"no index found");
38 inline unsigned FindFreeCustomColorIndices(Color_t (&indices)[N])
42 tmp[0] = FindFreeCustomColorIndex();
47 for (; nFound < N; ++nFound) {
48 tmp[nFound] = FindFreeCustomColorIndex(tmp[nFound - 1] + 1);
49 if (tmp[nFound] == -1)
54 std::copy(tmp, tmp + N, indices);