5#ifndef MUONMDT_CABLING_MUONMDT_CABLINGMAP_H
6#define MUONMDT_CABLING_MUONMDT_CABLINGMAP_H
23class MdtMezzanineType;
32 using TdcOffSet = std::set<MdtTdcOffSorter, std::less<>>;
43 TdcOffSet::const_iterator
begin()
const {
return cards.begin(); }
44 TdcOffSet::const_iterator
end()
const {
return cards.end(); }
45 TdcOffSet::const_iterator
begin() {
return cards.begin(); }
46 TdcOffSet::const_iterator
end() {
return cards.end(); }
51 std::array<MdtCablingOnData, 2>
csm{};
54 using OffToOnlMap = std::map<MdtCablingOffData, MdtOffChModule>;
107 bool check_valid =
true)
const;
117 MsgStream& log)
const;
121 const std::vector<uint32_t>& ROBId_list, MsgStream& log)
const;
125 const uint32_t ROBI, MsgStream& log)
const;
140 MsgStream& log)
const;
149 MsgStream& log)
const;
170 std::vector<std::unique_ptr<MdtTdcMap>>
m_tdcs{};
194#include "AthenaKernel/CondCont.h"
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
MuonMDT_CablingMap::DataSource DataSource
MuonMDT_CablingMap::MezzCardPtr MezzCardPtr
Hold mapping of ranges to condition objects.
This is a "hash" representation of an Identifier.
std::shared_ptr< const MdtMezzanineCard > MezzCardPtr
std::vector< MezzCardPtr > MezzCardList
List of mezzanine cards.
unsigned int csmNumOnChamber(const CablingData &map_data, MsgStream &log) const
Returns whether the channel belongs to the first or second mounted CSM card.
ROBToChamberMap m_ROBToMultiLayer
map returning a detector element hashes associated with a given ROD
const ListOfROB & getAllROBId() const
return the ROD id of a given chamber
MezzCardPtr getHedgeHogMapping(uint8_t mezzCardId) const
MuonMDT_CablingMap(const MuonMDT_CablingMap &)=delete
std::vector< MdtTdcOnlSorter > TdcOnlSet
OnlToOffMap m_toOfflineConv
ChamberToROBMap m_chamberToROB
map returning the RODid for a given chamber ID
const OnlToOffMap & getOnlineConvMap() const
Returns the map to convert the online -> offline identifiers.
const OffToOnlMap & getOfflineConvMap() const
Returns hte map to convert the offline -> online identifiers.
std::map< MdtCablingOffData, MdtOffChModule > OffToOnlMap
OffToOnlMap m_toOnlineConv
std::map< uint8_t, std::unique_ptr< MdtMezzanineType > > MezzanineTypes
typedef to implement the list of mezzanine types
MdtCablingData CablingData
bool getOnlineId(CablingData &cabling_data, MsgStream &log) const
return the online id given the offline id
bool addMezanineLayout(std::unique_ptr< MdtMezzanineCard > card, MsgStream &log)
Adds a new mezzanine card mapping.
bool m_2CSM_cham
Switch to check whether the layout has chambers with 2 CSM chips.
const MdtIdHelper * m_mdtIdHelper
Pointer to the MdtIdHelper.
bool getOfflineId(CablingData &cabling_data, MsgStream &log) const
return the offline id given the online id
ChamberToROBMap m_multilayerToROB
map raturning the RODid for a given multi layer ID
std::vector< uint32_t > ListOfROB
bool addChamberToROBMap(const CablingData &cabling_data, MsgStream &log)
private function to add a chamber to the ROD map
std::map< uint32_t, std::vector< IdentifierHash > > ROBToChamberMap
uint32_t getROBId(const IdentifierHash &stationCode, MsgStream &log) const
return the ROD id of a given chamber, given the hash id
std::vector< IdentifierHash > getMultiLayerHashVec(const std::vector< uint32_t > &ROBId_list, MsgStream &log) const
return a vector of HashId lists for a given list of ROD's
std::set< MdtTdcOffSorter, std::less<> > TdcOffSet
bool convert(const CablingData &cabling_data, Identifier &id, bool check_valid=true) const
converts the cabling data into an identifier.
bool addMezzanine(CablingData cabling_data, DataSource source, MsgStream &log)
Add a new fully configured mezzanine card.
bool getStationCode(const CablingData &map_data, IdentifierHash &mdtHashId, MsgStream &log) const
Transforms the identifier to an IdentifierHash corresponding to the module.
MuonMDT_CablingMap & operator=(const MuonMDT_CablingMap &right)=delete
assignment and copy constructor operator (hidden)
std::map< IdentifierHash, uint32_t > ChamberToROBMap
typedef to implement the csm mapping to ROB
MezzCardPtr legacyHedgehogCard(CablingData &cabling, MsgStream &msg) const
In the legacy data format several transformations on the hedgehog layout were applied during the fina...
MdtMezzanineCard::MezzCardPtr MezzCardPtr
bool addMezzanineLine(const int type, const int layer, const int sequence, MsgStream &log)
Add a new line describing a mezzanine type.
bool finalize_init(MsgStream &log)
std::vector< std::unique_ptr< MdtTdcMap > > m_tdcs
std::map< MdtCablingOnData, MdtTdcModule > OnlToOffMap
ListOfROB m_listOfROB
full list of ROBs
bool has2CsmML() const
Returns if the cabling map has found multilayers connected to 2 CSM cards.
bool getMultiLayerCode(const CablingData &map_data, Identifier &multiLayer, IdentifierHash &mdtHashId, MsgStream &log) const
Transforms the identifier to an IdentifierHash corresponding to the multilayer In this case,...
Helper struct to search through the std::set if a conversion from online -> offline is needed.
Helper struct to group the Mezzanine cards mounted on each multilayer The object provides the followi...
TdcOffSet cards
Mezzanine cards mounted on the chamber.
TdcOffSet::const_iterator begin()
TdcOffSet::const_iterator begin() const
TdcOffSet::const_iterator end()
TdcOffSet::const_iterator end() const
std::array< MdtCablingOnData, 2 > csm
The up to 2 CSMs to which the cards are connected.
The online -> offline conversion needs to treat two cases tdcId && channelId == 0xFF: ** Decode the s...
TdcOnlSet::const_iterator begin() const
MdtTdcOnlSorter zero_module
TdcOnlSet::const_iterator end() const
TdcOnlSet::const_iterator begin()
TdcOnlSet::const_iterator end()