Commit 79e2dfdc authored by Nils Erik Krumnack's avatar Nils Erik Krumnack
Browse files

Merge branch '21.2.104.0-ATR-22015' into '21.2'

Fix crash when loading L1TopoMenu twice (ATR-22015)

See merge request atlas/athena!36550
parents 0de77c49 ff12f383
......@@ -39,8 +39,10 @@ bool TrigConf::L1TopoMenuLoader::load( TXC::L1TopoMenu& tcaTarget ) {
tcaTarget.print();
} catch( const std::exception& e ) {
TRG_MSG_ERROR("L1TopoMenuLoader::load >> Standard C++ exception: " << e.what());
throw;
} catch( ... ) {
TRG_MSG_ERROR("L1TopoMenuLoader::load >> ... caught ");
throw;
}
TRG_MSG_INFO( "Loaded L1 TopoMenu with " << tcaTarget.getL1TopoConfigAlgs().size() << " algorithms and "
<< tcaTarget.getL1TopoConfigOutputList().getTriggerLines().size() << " trigger lines");
......
......@@ -7,6 +7,7 @@
#include <vector>
#include <string>
#include <set>
namespace TXC {
......@@ -116,6 +117,10 @@ namespace TXC {
std::vector<TriggerLine> m_triggerlines;
TXC::TriggerLine m_undef{"UNDEF","",0,0,0,0,0};
std::set<std::string> m_triggernames;
std::set<unsigned int> m_triggercounters;
};
......
......@@ -8,15 +8,10 @@
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <set>
using namespace std;
using namespace TXC;
set<string> triggernames;
set<unsigned int> triggercounters;
void
TriggerLine::calcCounter() {
//m_counter = 64 * m_module + 16 * m_fpga + 32 * m_clock + m_bit;
......@@ -36,11 +31,11 @@ L1TopoConfigOutputList::addOutputListElement(const OutputListElement & output) {
void
L1TopoConfigOutputList::addTriggerLine(const TriggerLine & trigger) {
auto insname = triggernames.insert(trigger.name());
auto insname = m_triggernames.insert(trigger.name());
if(!insname.second)
TCS_EXCEPTION("Trigger line '" << trigger.name() << "' has been defined more than once");
auto inscount = triggercounters.insert(trigger.counter());
auto inscount = m_triggercounters.insert(trigger.counter());
if(!inscount.second) {
string triggerWithSameCounter("");
for(auto & tl : m_triggerlines)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment