|
ATLAS Offline Software
|
Go to the documentation of this file.
20 bool valid{!check_valid};
52 log<<
MSG::DEBUG<<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__<<
": test "<<translatorCache<<
endmsg;
57 log << MSG::ERROR<<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__<<
": The offline identifier "
58 << offId <<
" is unknown " <<
endmsg;
64 log<<
MSG::DEBUG<<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__<<
": Chamber "<<offId<<
" has "
65 <<tdcs.size()<<
" cards "<<
endmsg;
68 const AllTdcsPerGasGap::const_iterator onlineCardItr =
73 if (onlineCardItr != itr->second.end()) {
79 translatorCache.
channelId = (*tdcChannel);
81 log <<
MSG::DEBUG<<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__<<
": Mapped to card "
89 log << MSG::ERROR<<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__<<
": No tdc channel could be found for the object "
94 OnlToOfflMap::const_iterator itr =
m_onToOffline.find(translatorCache);
96 log << MSG::ERROR <<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__<<
": The tdc chip "
110 log <<
MSG::DEBUG<<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__<<
": -- Card "
115 log << MSG::ERROR<<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__<<
": No tdc channel could be found for the object "
126 offToOnl.
tdcID = onlCh;
127 offToOnl.flatCable =
entry.flatCable;
128 offToOnl.firstStrip =
entry.firstStrip;
133 return a.firstStrip <
b.firstStrip;
139 onlToOff.flatCable =
entry.flatCable;
143 return a.firstStrip <
b.firstStrip;
147 log<<
MSG::DEBUG<<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__<<
": Add new cabling channel "
155 log << MSG::ERROR <<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__
156 <<
": finalize() -- No data has been loaded " <<
endmsg;
166 if (!
convert(RobOffId, chId,
true)) {
167 log << MSG::ERROR<<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__
168 <<
": Could not construct an offline identifier from " <<
chamber.gasGapID <<
endmsg;
173 log << MSG::ERROR <<
"RpcCablingMap::"<<__func__<<
"() - "<<__LINE__
174 <<
": Failed to generate a hash for " <<
chamber.gasGapID <<
endmsg;
179 std::vector<IdentifierHash>& robHashes =
m_ROBHashes[hardId];
181 robHashes.push_back(
hash);
188 ChamberToROBMap::const_iterator
it = m_chambROBs.find(stationCode);
189 if (
it != m_chambROBs.end()) {
192 if (
log.level() <= MSG::WARNING) {
193 log << MSG::WARNING <<
"Station code " << stationCode <<
" not found !! "<<
endmsg;
200 toRet.reserve(rpcHashVector.size());
202 toRet.push_back(getROBId(
hash,
log));
206 const std::vector<IdentifierHash>& RpcCablingMap::getChamberHashVec(
const uint32_t ROBI, MsgStream&
log)
const {
207 ROBToChamberMap::const_iterator itr = m_ROBHashes.find(ROBI);
208 if (itr != m_ROBHashes.end()){
211 if (
log.level() <= MSG::WARNING) {
212 log << MSG::WARNING <<
"ROB ID " << ROBI <<
" not found ! " <<
endmsg;
214 static const std::vector<IdentifierHash>
dummy;
217 std::vector<IdentifierHash> RpcCablingMap::getChamberHashVec(
const ListOfROB&
ROBs, MsgStream&
log)
const {
218 std::unordered_set<IdentifierHash> hashSet{};
220 const std::vector<IdentifierHash>& hashFromROB = getChamberHashVec(rob,
log);
221 hashSet.insert(hashFromROB.begin(), hashFromROB.end());
223 std::vector<IdentifierHash> hashVec{};
224 hashVec.insert(hashVec.end(), hashSet.begin(), hashSet.end());
231 std::set<RpcCablingMap::FlatCablePtr> RpcCablingMap::flatCables()
const {
232 std::set<FlatCablePtr> cables{};
233 for (
const auto &[offId, gapToTdcs] : m_offToOnline) {
235 cables.insert(assoc.flatCable);
static constexpr uint8_t readStrips
Number of channels covered by one chip.
int8_t & doubletZ
doublet Phi -> 1,2
bool is_rpc(const Identifier &id) const
RpcCablingMap(const IMuonIdHelperSvc *idHelperSvc)
Constructor taking the IdHelperSvc.
std::string find(const std::string &s)
return a remapped string
int doubletZ(const Identifier &id) const
OnlToOfflMap m_onToOffline
Map storing the connection from online -> offline channels.
uint8_t channelId
Online tdc channel number.
std::vector< GasGapToTdcAssociation > AllTdcsPerGasGap
bool measuresPhi() const
: Does the channel measure phi
bool measuresPhi(const Identifier &id) const override
void setMeasPhiAndSide(bool measPhi, bool stripSide)
Sets the measuresPhi & stripSide fields of the cabling data object.
Struct to represent the offline identifier of the Rpc measurement decomposed into the particular fiel...
int stationName(const Identifier &id) const
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
Helper struct to associate all Tdcs to their corresponding strips in the gasGap.
FlatCablePtr flatCable
Pointer to the flat cable card.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
bool getOnlineId(RpcCablingData &cabling_data, MsgStream &log) const
return the online id given the offline id
bool finalize(MsgStream &log)
Performs consistency checks for the cabling data (I.e.
OfflToOnlMap m_offToOnline
Map to cache the offline -> online conversions */.
int gasGap(const Identifier &id) const override
get the hashes
bool insertChannels(CoolDBEntry &&dbEntry, MsgStream &log)
Inserts a new dbEntry into the map.
int8_t & eta
Station of the chamber (i.e, BIL,BIS,etc.)
int doubletR(const Identifier &id) const
Helper struct to associate all strips in an eta/phi gasGap to the corresponding Tdc.
std::optional< uint8_t > tdcChannel(uint8_t strip, MsgStream &log) const
Returns the connected tdc channel connected to a strip.
RpcCablingOfflineID gasGapID
Associated tdc chip.
int8_t & gasGap
doublet Z -> 1,2
int strip(const Identifier &id) const
bool convert(const RpcCablingData &translationCache, Identifier &id, bool checkValid=true) const
Converts the translation cache back to an Identifier.
const RpcIdHelper & m_rpcIdHelper
Pointer to the RpcIdHelper.
ChamberToROBMap m_chambROBs
ROBToChamberMap m_ROBHashes
int stationPhi(const Identifier &id) const
int8_t & doubletR
Station phi of the RPC station.
uint8_t strip
Offline strip number.
Helper struct that is parsed to the cabling map to translate between the offline & online Identifiers...
Helper struct to ship all information from the Database
In an analogous way to the RpcCablingOfflineID, the RpcCablingOnlineID, holds all information needed ...
int8_t & doubletPhi
doublet R -> 1,2
int stationEta(const Identifier &id) const
uint8_t firstStrip
first strip
bool getOfflineId(RpcCablingData &cabling_data, MsgStream &log) const
return the offline id given the online id
static constexpr uint8_t firstStrip
Convention of the lowest strip number.
RpcCablingOnlineID tdcID
Associated tdc chip.
FlatCablePtr flatCable
Pointer to the flat cable card.
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
std::vector< uint32_t > ListOfROB
std::optional< uint8_t > stripChannel(uint8_t tdcChannel, MsgStream &log) const
Returns the strip channel connected to a strip.
uint8_t firstStrip
Lowest strip number covered by the cable.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
int8_t & phi
Eta index of the RPC station.
virtual const RpcIdHelper & rpcIdHelper() const =0
access to RpcIdHelper
int doubletPhi(const Identifier &id) const
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override