diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Board.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Board.h index d35573036e05488934f72b03fd51e5436b8eb53d..1426611bfb004b08af1e43107f61ffa84a1dbb53 100644 --- a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Board.h +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Board.h @@ -45,7 +45,9 @@ namespace TrigConf { /** Accessor to the number of connectors */ std::size_t size() const; - BoardType type() const; + std::string type() const; + + BoardType boardType() const; /** Accessor to the connector type */ bool legacy() const; @@ -58,7 +60,7 @@ namespace TrigConf { /** Update the internal members */ virtual void update(); - BoardType m_type; + BoardType m_boardType; bool m_legacy; std::vector<std::string> m_connectorNames; }; diff --git a/Trigger/TrigConfiguration/TrigConfData/src/L1Board.cxx b/Trigger/TrigConfiguration/TrigConfData/src/L1Board.cxx index b8a97c0930c6dbb8cd0dfd5d151de5840be2029d..059497974f3a80a74e7837a2d06d99353b803f08 100644 --- a/Trigger/TrigConfiguration/TrigConfData/src/L1Board.cxx +++ b/Trigger/TrigConfiguration/TrigConfData/src/L1Board.cxx @@ -38,11 +38,11 @@ TrigConf::L1Board::update() std::string boardType(getAttribute("type")); if( boardType == "MUCTPI" ) { - m_type = BoardType::MUCTPI; + m_boardType = BoardType::MUCTPI; } else if( boardType == "CTPIN" ) { - m_type = BoardType::CTPIN; + m_boardType = BoardType::CTPIN; } else if( boardType == "TOPO" ) { - m_type = BoardType::TOPO; + m_boardType = BoardType::TOPO; } else { throw std::runtime_error("Unknown board type " + boardType); } @@ -60,6 +60,25 @@ TrigConf::L1Board::size() const return m_connectorNames.size(); } +TrigConf::L1Board::BoardType +TrigConf::L1Board::boardType() const +{ + return m_boardType; +} + +std::string +TrigConf::L1Board::type() const +{ + switch( boardType() ) { + case BoardType::CTPIN: + return "CTPIN"; + case BoardType::MUCTPI: + return "MUCTPI"; + case BoardType::TOPO: + return "TOPO"; + } + return ""; +} bool TrigConf::L1Board::legacy() const diff --git a/Trigger/TrigConfiguration/TrigConfIO/utils/TestTriggerMenuAccess.cxx b/Trigger/TrigConfiguration/TrigConfIO/utils/TestTriggerMenuAccess.cxx index 2bf7a03f116ce0f938c766af577f17261333de4b..547375efe06246e2bc312fd5f38a7f08c3ded9b9 100644 --- a/Trigger/TrigConfiguration/TrigConfIO/utils/TestTriggerMenuAccess.cxx +++ b/Trigger/TrigConfiguration/TrigConfIO/utils/TestTriggerMenuAccess.cxx @@ -95,7 +95,7 @@ testL1Menu_Boards(const TrigConf::L1Menu & l1menu) { cout << "L1 menu has " << l1menu.boardNames().size() << " boards configured" << endl; string boardName("Topo1"); auto & board = l1menu.board(boardName); - cout << "Board " << boardName << " has " << board.size() << " connectors configured: "; + cout << "Board " << boardName << " of type " << board.type() << " has " << board.size() << " connectors configured: "; for( auto & connName : board.connectorNames() ) { cout << connName << " "; } cout << endl; return true;