Skip to content
Snippets Groups Projects
Commit b5a5eb8f authored by Administrator's avatar Administrator
Browse files

Fix operator++ for moduleId enum

The operator needs to exclude a gap in the sequence of numbers. Unfortunately
this was done wrongly such that adding new entries in the enum were also
excluded.
parent caa3df22
No related branches found
No related tags found
1 merge request!1098Fix operator++ for moduleId enum
Pipeline #21226 passed
......@@ -17,13 +17,13 @@
// the values 11-15 are reserved for future detectors.
// The ids of the passive modules are only relevant at run time so they can
// be shifted easily
// The opeartor takes care about the non continuous values for the enum
// The operator takes care about the non continuous values for the enum
// When it reaches the last detector it automatically continuous with the
// first passive module
ECbmModuleId& operator++(ECbmModuleId& e)
{
if (e == ECbmModuleId::kLastModule) { throw std::out_of_range("for ECbmModuleId& operator ++ (ECbmModuleId&)"); }
else if (e == ECbmModuleId::kT0) {
else if (e == ECbmModuleId::kNofSystems) { // jump over gap between end of detectors and begin of passives
e = ECbmModuleId::kMagnet;
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment