ATLAS Offline Software
|
#include <MuonMDT_CablingMap.h>
Classes | |
struct | MdtOffChModule |
Helper struct to group the Mezzanine cards mounted on each multilayer The object provides the following information 1) List of all mezzanine cards associated with the particular multilayer 2) The BME / BIS78 chambers are split into 2 CSM modules due to their. More... | |
struct | MdtTdcModule |
The online -> offline conversion needs to treat two cases tdcId && channelId == 0xFF: ** Decode the station name using the first module in the set with tdcZero() == 0 ** Ordinary channel decoding Helper struct below is collection of all the modules & the first module used to decode the stationName. More... | |
Public Types | |
enum | DataSource { DataSource::JSON, DataSource::LegacyCOOL } |
using | MezzanineTypes = std::map< uint8_t, std::unique_ptr< MdtMezzanineType > > |
typedef to implement the list of mezzanine types More... | |
using | TdcOffSet = std::set< MdtTdcOffSorter, std::less<> > |
using | TdcOnlSet = std::vector< MdtTdcOnlSorter > |
using | OffToOnlMap = std::map< MdtCablingOffData, MdtOffChModule > |
using | OnlToOffMap = std::map< MdtCablingOnData, MdtTdcModule > |
using | ChamberToROBMap = std::map< IdentifierHash, uint32_t > |
typedef to implement the csm mapping to ROB More... | |
using | ROBToChamberMap = std::map< uint32_t, std::vector< IdentifierHash > > |
using | ListOfROB = std::vector< uint32_t > |
using | CablingData = MdtCablingData |
using | MezzCardPtr = MdtMezzanineCard::MezzCardPtr |
Public Member Functions | |
MuonMDT_CablingMap () | |
~MuonMDT_CablingMap () | |
bool | addMezzanineLine (const int type, const int layer, const int sequence, MsgStream &log) |
Add a new line describing a mezzanine type. More... | |
bool | addMezanineLayout (std::unique_ptr< MdtMezzanineCard > card, MsgStream &log) |
Adds a new mezzanine card mapping. More... | |
bool | addMezzanine (CablingData cabling_data, DataSource source, MsgStream &log) |
Add a new fully configured mezzanine card. More... | |
bool | getOfflineId (CablingData &cabling_data, MsgStream &log) const |
return the offline id given the online id More... | |
bool | getOnlineId (CablingData &cabling_data, MsgStream &log) const |
return the online id given the offline id More... | |
bool | convert (const CablingData &cabling_data, Identifier &id, bool check_valid=true) const |
converts the cabling data into an identifier. More... | |
bool | convert (const Identifier &id, CablingData &cabling_data) const |
converts the identifier into a cabling data object. More... | |
uint32_t | getROBId (const IdentifierHash &stationCode, MsgStream &log) const |
return the ROD id of a given chamber, given the hash id More... | |
ListOfROB | getROBId (const std::vector< IdentifierHash > &mdtHashVector, MsgStream &log) const |
get the robs corresponding to a vector of hashIds, copied from Svc before the readCdo migration More... | |
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 More... | |
const std::vector< IdentifierHash > & | getMultiLayerHashVec (const uint32_t ROBI, MsgStream &log) const |
return a HashId list for a given ROD More... | |
const ListOfROB & | getAllROBId () const |
return the ROD id of a given chamber More... | |
const OnlToOffMap & | getOnlineConvMap () const |
Returns the map to convert the online -> offline identifiers. More... | |
const OffToOnlMap & | getOfflineConvMap () const |
Returns hte map to convert the offline -> online identifiers. More... | |
bool | finalize_init (MsgStream &log) |
bool | getStationCode (const CablingData &map_data, IdentifierHash &mdtHashId, MsgStream &log) const |
Transforms the identifier to an IdentifierHash corresponding to the module. More... | |
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, the multi layer represents the CSM chip. More... | |
unsigned int | csmNumOnChamber (const CablingData &map_data, MsgStream &log) const |
Returns whether the channel belongs to the first or second mounted CSM card. More... | |
bool | has2CsmML () const |
Returns if the cabling map has found multilayers connected to 2 CSM cards. More... | |
MezzCardPtr | getHedgeHogMapping (uint8_t mezzCardId) const |
Private Types | |
using | MezzCardList = std::vector< MezzCardPtr > |
List of mezzanine cards. More... | |
Private Member Functions | |
bool | addChamberToROBMap (const CablingData &cabling_data, MsgStream &log) |
private function to add a chamber to the ROD map More... | |
MuonMDT_CablingMap & | operator= (const MuonMDT_CablingMap &right)=delete |
assignment and copy constructor operator (hidden) More... | |
MuonMDT_CablingMap (const MuonMDT_CablingMap &)=delete | |
MezzCardPtr | legacyHedgehogCard (CablingData &cabling, MsgStream &msg) const |
In the legacy data format several transformations on the hedgehog layout were applied during the final TdcMap build. More... | |
Private Attributes | |
const MdtIdHelper * | m_mdtIdHelper {nullptr} |
Pointer to the MdtIdHelper. More... | |
OffToOnlMap | m_toOnlineConv {} |
OnlToOffMap | m_toOfflineConv {} |
std::vector< std::unique_ptr< MdtTdcMap > > | m_tdcs {} |
ROBToChamberMap | m_ROBToMultiLayer {} |
map returning a detector element hashes associated with a given ROD More... | |
ListOfROB | m_listOfROB {} |
full list of ROBs More... | |
ChamberToROBMap | m_chamberToROB {} |
map returning the RODid for a given chamber ID More... | |
ChamberToROBMap | m_multilayerToROB {} |
map raturning the RODid for a given multi layer ID More... | |
bool | m_2CSM_cham {false} |
Switch to check whether the layout has chambers with 2 CSM chips. More... | |
MezzCardList | m_mezzCards {} |
Definition at line 28 of file MuonMDT_CablingMap.h.
Definition at line 79 of file MuonMDT_CablingMap.h.
using MuonMDT_CablingMap::ChamberToROBMap = std::map<IdentifierHash, uint32_t> |
typedef to implement the csm mapping to ROB
Definition at line 76 of file MuonMDT_CablingMap.h.
using MuonMDT_CablingMap::ListOfROB = std::vector<uint32_t> |
Definition at line 78 of file MuonMDT_CablingMap.h.
using MuonMDT_CablingMap::MezzanineTypes = std::map<uint8_t, std::unique_ptr<MdtMezzanineType> > |
typedef to implement the list of mezzanine types
Definition at line 31 of file MuonMDT_CablingMap.h.
|
private |
List of mezzanine cards.
Definition at line 186 of file MuonMDT_CablingMap.h.
Definition at line 154 of file MuonMDT_CablingMap.h.
using MuonMDT_CablingMap::OffToOnlMap = std::map<MdtCablingOffData, MdtOffChModule> |
Definition at line 54 of file MuonMDT_CablingMap.h.
using MuonMDT_CablingMap::OnlToOffMap = std::map<MdtCablingOnData, MdtTdcModule> |
Definition at line 72 of file MuonMDT_CablingMap.h.
using MuonMDT_CablingMap::ROBToChamberMap = std::map<uint32_t, std::vector<IdentifierHash> > |
Definition at line 77 of file MuonMDT_CablingMap.h.
using MuonMDT_CablingMap::TdcOffSet = std::set<MdtTdcOffSorter, std::less<> > |
Definition at line 32 of file MuonMDT_CablingMap.h.
using MuonMDT_CablingMap::TdcOnlSet = std::vector<MdtTdcOnlSorter> |
Definition at line 33 of file MuonMDT_CablingMap.h.
|
strong |
MuonMDT_CablingMap::MuonMDT_CablingMap | ( | ) |
Definition at line 24 of file MuonMDT_CablingMap.cxx.
|
default |
|
privatedelete |
|
private |
private function to add a chamber to the ROD map
Definition at line 355 of file MuonMDT_CablingMap.cxx.
bool MuonMDT_CablingMap::addMezanineLayout | ( | std::unique_ptr< MdtMezzanineCard > | card, |
MsgStream & | log | ||
) |
bool MuonMDT_CablingMap::addMezzanine | ( | CablingData | cabling_data, |
DataSource | source, | ||
MsgStream & | log | ||
) |
Add a new fully configured mezzanine card.
Add a new mezzanine to the map.
the indexes multilayer, layer, tube refer to the tube connected to the channelZero
If the card is mounted on ML1 check that the first CSM on the second ML is the same
Definition at line 184 of file MuonMDT_CablingMap.cxx.
bool MuonMDT_CablingMap::addMezzanineLine | ( | const int | type, |
const int | layer, | ||
const int | sequence, | ||
MsgStream & | log | ||
) |
Add a new line describing a mezzanine type.
add a new line from the database, describing a mezzanine type
Overwrite the old mezzanine card pointer
Definition at line 69 of file MuonMDT_CablingMap.cxx.
bool MuonMDT_CablingMap::convert | ( | const CablingData & | cabling_data, |
Identifier & | id, | ||
bool | check_valid = true |
||
) | const |
converts the cabling data into an identifier.
The check valid argument optionally enables the check that the returned identifier is actually well defined within the ranges but is also slow
Definition at line 42 of file MuonMDT_CablingMap.cxx.
bool MuonMDT_CablingMap::convert | ( | const Identifier & | id, |
CablingData & | cabling_data | ||
) | const |
converts the identifier into a cabling data object.
Returns false if the Identifier is not Mdt
Definition at line 55 of file MuonMDT_CablingMap.cxx.
unsigned int MuonMDT_CablingMap::csmNumOnChamber | ( | const CablingData & | map_data, |
MsgStream & | log | ||
) | const |
Returns whether the channel belongs to the first or second mounted CSM card.
Look up whether the station corresponds to the first or the second CSM
Definition at line 400 of file MuonMDT_CablingMap.cxx.
bool MuonMDT_CablingMap::finalize_init | ( | MsgStream & | log | ) |
Definition at line 533 of file MuonMDT_CablingMap.cxx.
const MuonMDT_CablingMap::ListOfROB & MuonMDT_CablingMap::getAllROBId | ( | ) | const |
return the ROD id of a given chamber
Definition at line 529 of file MuonMDT_CablingMap.cxx.
MezzCardPtr MuonMDT_CablingMap::getHedgeHogMapping | ( | uint8_t | mezzCardId | ) | const |
Definition at line 176 of file MuonMDT_CablingMap.cxx.
bool MuonMDT_CablingMap::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, the multi layer represents the CSM chip.
create the station identifier
Layouts with BMEs use the detector element hashes to cover the chambers with 2 mounted CSMs
In Run1, all chambers had only one CSM. To maintain backward compbability use the module hash
Definition at line 429 of file MuonMDT_CablingMap.cxx.
std::vector< IdentifierHash > MuonMDT_CablingMap::getMultiLayerHashVec | ( | const std::vector< uint32_t > & | ROBId_list, |
MsgStream & | log | ||
) | const |
return a vector of HashId lists for a given list of ROD's
Definition at line 511 of file MuonMDT_CablingMap.cxx.
const std::vector< IdentifierHash > & MuonMDT_CablingMap::getMultiLayerHashVec | ( | const uint32_t | ROBI, |
MsgStream & | log | ||
) | const |
const MuonMDT_CablingMap::OffToOnlMap & MuonMDT_CablingMap::getOfflineConvMap | ( | ) | const |
Returns hte map to convert the offline -> online identifiers.
Definition at line 350 of file MuonMDT_CablingMap.cxx.
bool MuonMDT_CablingMap::getOfflineId | ( | CablingData & | cabling_data, |
MsgStream & | log | ||
) | const |
return the offline id given the online id
if it's the dummy TDC (i.e. the 0xff used to convert the full station)
Definition at line 250 of file MuonMDT_CablingMap.cxx.
const MuonMDT_CablingMap::OnlToOffMap & MuonMDT_CablingMap::getOnlineConvMap | ( | ) | const |
Returns the map to convert the online -> offline identifiers.
Definition at line 346 of file MuonMDT_CablingMap.cxx.
bool MuonMDT_CablingMap::getOnlineId | ( | CablingData & | cabling_data, |
MsgStream & | log | ||
) | const |
return the online id given the offline id
get the online id from the offline id
May be we missed it?
Definition at line 315 of file MuonMDT_CablingMap.cxx.
uint32_t MuonMDT_CablingMap::getROBId | ( | const IdentifierHash & | stationCode, |
MsgStream & | log | ||
) | const |
return the ROD id of a given chamber, given the hash id
Definition at line 465 of file MuonMDT_CablingMap.cxx.
std::vector< uint32_t > MuonMDT_CablingMap::getROBId | ( | const std::vector< IdentifierHash > & | mdtHashVector, |
MsgStream & | log | ||
) | const |
get the robs corresponding to a vector of hashIds, copied from Svc before the readCdo migration
Definition at line 476 of file MuonMDT_CablingMap.cxx.
bool MuonMDT_CablingMap::getStationCode | ( | const CablingData & | map_data, |
IdentifierHash & | mdtHashId, | ||
MsgStream & | log | ||
) | const |
Transforms the identifier to an IdentifierHash corresponding to the module.
Definition at line 412 of file MuonMDT_CablingMap.cxx.
bool MuonMDT_CablingMap::has2CsmML | ( | ) | const |
Returns if the cabling map has found multilayers connected to 2 CSM cards.
Definition at line 426 of file MuonMDT_CablingMap.cxx.
|
private |
In the legacy data format several transformations on the hedgehog layout were applied during the final TdcMap build.
Octoberfest chambers need a mirror in the tube channel numbering https://its.cern.ch/jira/browse/ATLASRECTS-7411
Tube numbering is from bottom to top
Legacy tube mapping
Definition at line 605 of file MuonMDT_CablingMap.cxx.
|
privatedelete |
assignment and copy constructor operator (hidden)
|
private |
Switch to check whether the layout has chambers with 2 CSM chips.
Definition at line 183 of file MuonMDT_CablingMap.h.
|
private |
map returning the RODid for a given chamber ID
Definition at line 179 of file MuonMDT_CablingMap.h.
|
private |
full list of ROBs
Definition at line 176 of file MuonMDT_CablingMap.h.
|
private |
Pointer to the MdtIdHelper.
Definition at line 162 of file MuonMDT_CablingMap.h.
|
private |
Definition at line 187 of file MuonMDT_CablingMap.h.
|
private |
map raturning the RODid for a given multi layer ID
Definition at line 181 of file MuonMDT_CablingMap.h.
|
private |
map returning a detector element hashes associated with a given ROD
Definition at line 173 of file MuonMDT_CablingMap.h.
|
private |
Definition at line 170 of file MuonMDT_CablingMap.h.
|
private |
Definition at line 169 of file MuonMDT_CablingMap.h.
|
private |
Definition at line 168 of file MuonMDT_CablingMap.h.