ATLAS Offline Software
Loading...
Searching...
No Matches
RpcCablingMap.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONCABLINGDATA_RPCCABLINGMAP_H
5#define MUONCABLINGDATA_RPCCABLINGMAP_H
6
7#include <set>
8#include <unordered_map>
9
13
14#include "Identifier/Identifier.h"
16
17/**********************************************
18 *
19 * @brief NRPC map data object
20 *
21 **********************************************/
22
23class RpcIdHelper;
24namespace Muon {
25 class IMuonIdHelperSvc;
26
28 public:
30 /* mapping from hashid to ROB identifier as Subdetector+Rodid */
31 using ChamberToROBMap = std::unordered_map<IdentifierHash, uint32_t>;
32 using ROBToChamberMap = std::unordered_map<uint32_t, std::vector<IdentifierHash>>;
33 using ListOfROB = std::vector<uint32_t>;
34
39 uint8_t firstStrip{0};
45 bool operator<(const GasGapToTdcAssociation &other) const {
46 return firstStrip < other.firstStrip;
47 }
48 };
49
58
65
67 RpcCablingMap(const IMuonIdHelperSvc* idHelperSvc);
69
71 bool getOfflineId(RpcCablingData &cabling_data, MsgStream& log) const;
72
74 bool getOnlineId(RpcCablingData &cabling_data, MsgStream& log) const;
75
76
83 bool convert(const RpcCablingData &translationCache, Identifier &id, bool checkValid = true) const;
87 bool convert(const Identifier &id, RpcCablingData &translationCache, bool setSideBit) const;
91 bool insertChannels(CoolDBEntry&& dbEntry, MsgStream& log);
93 std::set<FlatCablePtr> flatCables() const;
96 bool finalize(MsgStream& log);
97
99 uint32_t getROBId(const IdentifierHash& stationCode, MsgStream& log) const;
102 ListOfROB getROBId(const std::vector<IdentifierHash>& rpcHashVector, MsgStream& log) const;
104 const std::vector<IdentifierHash>& getChamberHashVec(const uint32_t ROBI, MsgStream& log) const;
105
106 std::vector<IdentifierHash> getChamberHashVec(const ListOfROB& ROBs, MsgStream& log) const;
107
109 const ListOfROB& getAllROBId() const;
110
111
112 private:
115 using AllTdcsPerGasGap = std::vector<GasGapToTdcAssociation>;
116 using AllGasGapsPerTdc = std::vector<TdcToGasGapAssociation>;
117 using OfflToOnlMap = std::map<RpcCablingOfflineID, AllTdcsPerGasGap>;
118 using OnlToOfflMap = std::map<RpcCablingOnlineID, AllGasGapsPerTdc>;
119
124
127
130 };
131}
132
137#endif
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
This is a "hash" representation of an Identifier.
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
OnlToOfflMap m_onToOffline
Map storing the connection from online -> offline channels.
OfflToOnlMap m_offToOnline
Map to cache the offline -> online conversions *‍/.
GeoModel::TransientConstSharedPtr< Muon::RpcFlatCableTranslator > FlatCablePtr
bool convert(const RpcCablingData &translationCache, Identifier &id, bool checkValid=true) const
Converts the translation cache back to an Identifier.
std::unordered_map< IdentifierHash, uint32_t > ChamberToROBMap
typedef to implement the csm mapping to ROB
bool insertChannels(CoolDBEntry &&dbEntry, MsgStream &log)
Inserts a new dbEntry into the map.
const ListOfROB & getAllROBId() const
return the full list of ROD id
std::unordered_map< uint32_t, std::vector< IdentifierHash > > ROBToChamberMap
const RpcIdHelper & m_rpcIdHelper
Pointer to the RpcIdHelper.
bool getOfflineId(RpcCablingData &cabling_data, MsgStream &log) const
return the offline id given the online id
RpcCablingMap(const IMuonIdHelperSvc *idHelperSvc)
Constructor taking the IdHelperSvc.
std::map< RpcCablingOfflineID, AllTdcsPerGasGap > OfflToOnlMap
const std::vector< IdentifierHash > & getChamberHashVec(const uint32_t ROBI, MsgStream &log) const
return a HashId list for a given ROD
std::vector< GasGapToTdcAssociation > AllTdcsPerGasGap
ROBToChamberMap m_ROBHashes
std::vector< TdcToGasGapAssociation > AllGasGapsPerTdc
std::vector< uint32_t > ListOfROB
bool finalize(MsgStream &log)
Performs consistency checks for the cabling data (I.e.
ListOfROB m_listOfROB
full list of ROBs
bool getOnlineId(RpcCablingData &cabling_data, MsgStream &log) const
return the online id given the offline id
ChamberToROBMap m_chambROBs
std::set< FlatCablePtr > flatCables() const
Returns the list of all Rpc flat cable cards.
std::map< RpcCablingOnlineID, AllGasGapsPerTdc > OnlToOfflMap
uint32_t getROBId(const IdentifierHash &stationCode, MsgStream &log) const
return the ROD id of a given chamber, given the hash id
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
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.
uint8_t firstStrip
Lowest strip number covered by the cable.
FlatCablePtr flatCable
Pointer to the flat cable card.
Helper struct to associate all strips in an eta/phi gasGap to the corresponding Tdc.
bool operator<(const GasGapToTdcAssociation &other) const
Ordering operator by strip.
FlatCablePtr flatCable
Pointer to the flat cable card.
RpcCablingOnlineID tdcID
Associated tdc chip.
uint8_t firstStrip
Lowest strip number covered by the cable.
Helper struct to associate all Tdcs to their corresponding strips in the gasGap.
FlatCablePtr flatCable
Pointer to the flat cable card.
RpcCablingOfflineID gasGapID
Associated tdc chip.
Struct to represent the offline identifier of the Rpc measurement decomposed into the particular fiel...
In an analogous way to the RpcCablingOfflineID, the RpcCablingOnlineID, holds all information needed ...