Skip to content

Commit

Permalink
Added multiple ModuleType warning and ignore.
Browse files Browse the repository at this point in the history
Any modules types listed same as a previous one will be ignored.
  • Loading branch information
Karl Smith authored and spaulaus committed Dec 8, 2016
1 parent 6bb56dc commit 76b4a97
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Interface/source/PixieInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ bool PixieInterface::ReadConfigurationFile(const char *fn)
if (tag == "ModuleType") {
moduleType = ParseModuleTypeTag(value);
std::cout << "Module Type: " << InfoStr(moduleType) << "\n";

//If we have two multiple entires for one type we use only the first.
if (configStrings.find(moduleType) != configStrings.end()) {
std::cout << WarningStr() << " Duplicate module type information will be ignored. (" << moduleType << ")\n";
moduleType = "ignored_" + moduleType;
}
}

//Store configuration
Expand Down

0 comments on commit 76b4a97

Please sign in to comment.