File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ class Counter
4242 void Count (UInt_t v)
4343 {
4444 if (v > Tc::size) {
45- ILOG (Error) << " Incrementing counter too far! " << v << " /" << Tc::size << ENDM ;
45+ ILOG (Error) << " Incrementing counter too far! " << v << " /" << Size () << ENDM ;
4646 }
4747#ifdef ENABLE_COUNTER_DEBUG_MODE
48- ILOG (Info) << " Incrementing " << v << " /" << Tc::size << " to " << counter[v] << ENDM ;
48+ ILOG (Info) << " Incrementing " << v << " /" << Size () << " to " << counter[v] << ENDM ;
4949#endif
5050 counter[v]++;
5151 }
@@ -105,9 +105,11 @@ class Counter
105105#endif
106106 }
107107 // / Getter for the Tc::size
108- Tc Size () const { return Tc::size; }
108+ UInt_t Size () const { return Tc::size; }
109109
110110 private:
111+ static_assert (std::is_same<decltype (Tc::size), const UInt_t>::value, " size must be const UInt_t" );
112+ static_assert (std::is_same<decltype (Tc::names), const TString[Tc::size]>::value, " names must be const TString arrays" );
111113 // / Containers to fill
112114 uint32_t counter[Tc::size] = { 0 };
113115};
You can’t perform that action at this time.
0 commit comments