![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "GaudiKernel/ISvcLocator.h"
17 ISvcLocator* svcLocator = Gaudi::svcLocator();
20 if (
sc != StatusCode::SUCCESS) {
21 throw std::runtime_error(
"Could not find the detctor store");
24 if (
sc != StatusCode::SUCCESS) {
25 throw std::runtime_error(
"Could not retrieve the RpcIdHelper");
33 bool valid{!check_valid};
51 bool setSideBit)
const {
67 MsgStream&
log)
const {
69 OnlToOfflMap::const_iterator itr =
m_onToOffline.find(cabling_map);
71 log << MSG::ERROR <<
"getOfflineId() -- The detector "
76 cabling_map.NrpcCablingOfflineID::operator=(itr->second);
77 cabling_map.
strip = itr->first.firstStrip + cabling_map.
channelId - itr->first.firstChannel;
86 MsgStream&
log)
const {
93 log << MSG::ERROR <<__FILE__<<
":"<<__LINE__<<
" getOnlineId() -- The offline identifier "
94 << offId <<
" is unknown " <<
endmsg;
97 const NrpcCablOnDataByStripSet::const_iterator onlineCardItr = itr->second.find(cabling_map);
98 if (onlineCardItr != itr->second.end()) {
105 <<
" getOnlineId() -- Card "<<onlineCard<<
" matches... Deduced channel "
111 log << MSG::ERROR <<__FILE__<<
":"<<__LINE__
112 <<
" getOnlineId() -- No tdc channel could be found for the object "
114 <<
" strip: " <<
static_cast<int>(cabling_map.
strip) <<
endmsg;
127 <<
"insertChannels() -- Failed to fill the offline -> online map "
132 log << MSG::ERROR <<
" --- New: "
140 <<
"insertChannels() -- The online to offline map is already "
141 "booked for identifier "
145 log << MSG::ERROR <<
" -- New: "
156 if (!robInitialized) {
164 log << MSG::ERROR <<
"finalize() -- No data has been loaded " <<
endmsg;
173 if (!
convert(RobOffId, chId,
true)) {
175 <<
"Could not construct an offline identifier from " <<
chamber
181 log << MSG::ERROR <<
" Failed to generate a hash for " <<
chamber
185 uint32_t hardId = (card.subDetector << 16) | card.tdcSector;
187 std::vector<IdentifierHash>& robHashes =
m_ROBHashes[hardId];
190 robHashes.push_back(
hash);
195 MsgStream&
log)
const {
196 ChamberToROBMap::const_iterator
it =
m_chambROBs.find(stationCode);
200 log << MSG::WARNING <<
"Station code " << stationCode <<
" not found !"
206 const std::vector<IdentifierHash>& rpcHashVector, MsgStream&
log)
const {
208 to_ret.reserve(rpcHashVector.size());
215 ROBToChamberMap::const_iterator itr =
m_ROBHashes.find(ROBI);
218 log << MSG::WARNING <<
"ROB ID " << ROBI <<
" not found ! " <<
endmsg;
219 static const std::vector<IdentifierHash>
dummy;
uint8_t firstStrip
First strip covered by the Tdc chip.
const std::vector< IdentifierHash > & getChamberHashVec(const uint32_t ROBI, MsgStream &log) const
return a HashId list for a given ROD
bool finalize(MsgStream &log)
Performs consistency checks for the cabling data (I.e.
Representation of the offline Identifier in a more tangible format.
bool is_rpc(const Identifier &id) const
std::string find(const std::string &s)
return a remapped string
OfflToOnlMap m_offToOnline
Map to cache the offline -> online conversions.
int doubletZ(const Identifier &id) const
Struct to represent all cabling information coming from the cabling database per channel.
ChamberToROBMap m_chambROBs
bool measuresPhi(const Identifier &id) const override
ListOfROB m_listOfROB
full list of ROBs
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
bool insertChannels(const NrpcCablingCoolData &cabling_data, MsgStream &log)
Inserts a cabling object into the map.
bool getOnlineId(NrpcCablingData &cabling_data, MsgStream &log) const
return the online id given the offline id
int gasGap(const Identifier &id) const override
get the hashes
The Athena Transient Store API.
const ListOfROB & getAllROBId() const
return the full list of ROD id
int doubletR(const Identifier &id) const
::StatusCode StatusCode
StatusCode definition for legacy code.
Cabling information shipped around the Digi <-> Rdo conversions.
uint32_t getROBId(const IdentifierHash &stationCode, MsgStream &log) const
return the ROD id of a given chamber, given the hash id
int strip(const Identifier &id) const
int stationPhi(const Identifier &id) const
uint8_t firstChannel
First tdc channel.
int stationEta(const Identifier &id) const
OnlToOfflMap m_onToOffline
Map to cache the online -> offline conversions.
ROBToChamberMap m_ROBHashes
bool getOfflineId(NrpcCablingData &cabling_data, MsgStream &log) const
return the offline id given the online id
Struct to build the offline -> online map.
std::vector< uint32_t > ListOfROB
const RpcIdHelper * m_rpcIdHelper
Pointer to the RpcIdHelper.
Struct summarizing all the Identifier fields to uniquely Identify a Nrpc TDC chip.
bool convert(const NrpcCablingData &cabling_data, Identifier &id, bool check_valid=true) const
converts the cabling data into an identifier.
int doubletPhi(const Identifier &id) const
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override