ATLAS Offline Software
MuonNRPC_CablingMap.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONNRPC_CABLING_MUONNRPC_CABLINGMAP_H
6 #define MUONNRPC_CABLING_MUONNRPC_CABLINGMAP_H
7 #include <set>
8 
10 #include "Identifier/Identifier.h"
12 /**********************************************
13  *
14  * @brief NRPC map data object
15  *
16  **********************************************/
17 
18 class RpcIdHelper;
19 class IdentifierHash;
20 
22  public:
24  /* mapping from hashid to ROB identifier as Subdetector+Rodid */
25  using ChamberToROBMap = std::map<IdentifierHash, uint32_t>;
26  using ROBToChamberMap = std::map<uint32_t, std::vector<IdentifierHash>>;
27  using ListOfROB = std::vector<uint32_t>;
30 
32  bool getOfflineId(NrpcCablingData& cabling_data, MsgStream& log) const;
33 
35  bool getOnlineId(NrpcCablingData& cabling_data, MsgStream& log) const;
40  bool check_valid = true) const;
43  bool convert(const Identifier& id,
45  bool setSideBit) const;
46 
48  bool insertChannels(const NrpcCablingCoolData& cabling_data, MsgStream& log);
51  bool finalize(MsgStream& log);
52 
54  uint32_t getROBId(const IdentifierHash& stationCode, MsgStream& log) const;
57  ListOfROB getROBId(const std::vector<IdentifierHash>& rpcHashVector,
58  MsgStream& log) const;
60  const std::vector<IdentifierHash>& getChamberHashVec(const uint32_t ROBI,
61  MsgStream& log) const;
63  const ListOfROB& getAllROBId() const;
64 
65  private:
66  using OnlToOfflMap = std::map<NrpcCablOnDataByTdc, NrpcCablingOfflineID, std::less<>>;
67  using OfflToOnlMap = std::map<NrpcCablingOfflineID, NrpcCablOnDataByStripSet, std::less<>>;
72 
75 
78 
81 
82 };
83 
84 CLASS_DEF(MuonNRPC_CablingMap, 94020450, 0)
85 #include "AthenaKernel/CondCont.h"
87 
88 #endif
MuonNRPC_CablingMap::getChamberHashVec
const std::vector< IdentifierHash > & getChamberHashVec(const uint32_t ROBI, MsgStream &log) const
return a HashId list for a given ROD
Definition: MuonNRPC_CablingMap.cxx:213
MuonNRPC_CablingMap::finalize
bool finalize(MsgStream &log)
Performs consistency checks for the cabling data (I.e.
Definition: MuonNRPC_CablingMap.cxx:162
MuonNRPC_CablingMap::OfflToOnlMap
std::map< NrpcCablingOfflineID, NrpcCablOnDataByStripSet, std::less<> > OfflToOnlMap
Definition: MuonNRPC_CablingMap.h:67
MuonNRPC_CablingMap::m_offToOnline
OfflToOnlMap m_offToOnline
Map to cache the offline -> online conversions.
Definition: MuonNRPC_CablingMap.h:71
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
NrpcCablingCoolData
Struct to represent all cabling information coming from the cabling database per channel.
Definition: NrpcCablingData.h:140
MuonNRPC_CablingMap::m_chambROBs
ChamberToROBMap m_chambROBs
Definition: MuonNRPC_CablingMap.h:73
MuonNRPC_CablingMap::m_listOfROB
ListOfROB m_listOfROB
full list of ROBs
Definition: MuonNRPC_CablingMap.h:80
MuonNRPC_CablingMap::OnlToOfflMap
std::map< NrpcCablOnDataByTdc, NrpcCablingOfflineID, std::less<> > OnlToOfflMap
Definition: MuonNRPC_CablingMap.h:66
createCablingJSON.cabling_data
dictionary cabling_data
Definition: createCablingJSON.py:18
MuonNRPC_CablingMap::ChamberToROBMap
std::map< IdentifierHash, uint32_t > ChamberToROBMap
typedef to implement the csm mapping to ROB
Definition: MuonNRPC_CablingMap.h:25
MuonNRPC_CablingMap
Definition: MuonNRPC_CablingMap.h:21
MuonNRPC_CablingMap::insertChannels
bool insertChannels(const NrpcCablingCoolData &cabling_data, MsgStream &log)
Inserts a cabling object into the map.
Definition: MuonNRPC_CablingMap.cxx:118
MuonNRPC_CablingMap::getOnlineId
bool getOnlineId(NrpcCablingData &cabling_data, MsgStream &log) const
return the online id given the offline id
Definition: MuonNRPC_CablingMap.cxx:85
RpcIdHelper
Definition: RpcIdHelper.h:51
MuonNRPC_CablingMap::MuonNRPC_CablingMap
MuonNRPC_CablingMap()
Definition: MuonNRPC_CablingMap.cxx:13
MuonNRPC_CablingMap::getAllROBId
const ListOfROB & getAllROBId() const
return the full list of ROD id
Definition: MuonNRPC_CablingMap.cxx:222
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
NrpcCablingData
Cabling information shipped around the Digi <-> Rdo conversions.
Definition: NrpcCablingData.h:121
MuonNRPC_CablingMap::getROBId
uint32_t getROBId(const IdentifierHash &stationCode, MsgStream &log) const
return the ROD id of a given chamber, given the hash id
Definition: MuonNRPC_CablingMap.cxx:194
MuonNRPC_CablingMap::~MuonNRPC_CablingMap
~MuonNRPC_CablingMap()
NrpcCablingData.h
MuonNRPC_CablingMap::m_onToOffline
OnlToOfflMap m_onToOffline
Map to cache the online -> offline conversions.
Definition: MuonNRPC_CablingMap.h:69
CondCont< MuonNRPC_CablingMap >
MuonNRPC_CablingMap::m_ROBHashes
ROBToChamberMap m_ROBHashes
Definition: MuonNRPC_CablingMap.h:74
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuonNRPC_CablingMap::getOfflineId
bool getOfflineId(NrpcCablingData &cabling_data, MsgStream &log) const
return the offline id given the online id
Definition: MuonNRPC_CablingMap.cxx:66
MuonNRPC_CablingMap::ListOfROB
std::vector< uint32_t > ListOfROB
Definition: MuonNRPC_CablingMap.h:27
MuonNRPC_CablingMap::m_rpcIdHelper
const RpcIdHelper * m_rpcIdHelper
Pointer to the RpcIdHelper.
Definition: MuonNRPC_CablingMap.h:77
IdentifierHash
Definition: IdentifierHash.h:38
CLASS_DEF.h
macros to associate a CLID to a type
MuonNRPC_CablingMap::convert
bool convert(const NrpcCablingData &cabling_data, Identifier &id, bool check_valid=true) const
converts the cabling data into an identifier.
Definition: MuonNRPC_CablingMap.cxx:31
MuonNRPC_CablingMap::ROBToChamberMap
std::map< uint32_t, std::vector< IdentifierHash > > ROBToChamberMap
Definition: MuonNRPC_CablingMap.h:26