ATLAS Offline Software
Nsw_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 #ifndef MUONMDT_CABLING_NSW_CABLINGMAP_H
5 #define MUONMDT_CABLING_NSW_CABLINGMAP_H
6 
9 
10 #include <optional>
11 
12 /**********************************************
13  *
14  * @brief MM cabling map data object
15  *
16  **********************************************/
17 
19  public:
21 
22  // The following function corrects the MM cabling. It takes an identifier as
23  // input (nominal identifer from the decoder) and returns
24  // The same identifier if there is no shift needed for this channel
25  // The new identifier containing the strip shift if a shift is needed
26  // A nullopt if the correction would move a channel outside the defined
27  // range of channel to be shifted (e.g. the first channel of a zebra
28  // connector which would be shifted into the channel range of the
29  // previous connector wich is physically impossible.)
30  std::optional<Identifier> correctChannel(const Identifier& id,
31  MsgStream& msg) const;
32 
33  // Function to add a range of channels to be shifted to the MM cabling map.
34  bool addConnector(const Identifier& gapID,
35  const NswZebraData& connector, MsgStream& msg);
36 
37  private:
38  const Muon::IMuonIdHelperSvc* m_idHelperSvc{nullptr};
39 
40  // Map holding the MM cabling correction map. The key is the identifier of
41  // the gas gap and the value is a NswZebraSet object containing the
42  // information on which channel range needs to be moved
43  using LookUpMap = std::map<Identifier, NswZebraSet>;
45 };
46 std::ostream& operator<<(std::ostream& ostr,
47  const NswZebraData& connector);
48 CLASS_DEF(Nsw_CablingMap , 219609437 , 1 );
49 #include "AthenaKernel/CondCont.h"
51 
52 #endif
Nsw_CablingMap
Definition: Nsw_CablingMap.h:18
operator<<
std::ostream & operator<<(std::ostream &ostr, const NswZebraData &connector)
Definition: Nsw_CablingMap.cxx:7
CondCont.h
Hold mappings of ranges to condition objects.
Nsw_CablingMap::m_cablingMap
LookUpMap m_cablingMap
Definition: Nsw_CablingMap.h:48
CONDCONT_DEF
CONDCONT_DEF(Nsw_CablingMap, 110668435)
Nsw_CablingMap::Nsw_CablingMap
Nsw_CablingMap(const Muon::IMuonIdHelperSvc *svc)
Definition: Nsw_CablingMap.cxx:16
Nsw_CablingMap::addConnector
bool addConnector(const Identifier &gapID, const NswZebraData &connector, MsgStream &msg)
Definition: Nsw_CablingMap.cxx:76
Nsw_CablingMap::LookUpMap
std::map< Identifier, NswZebraSet > LookUpMap
Definition: Nsw_CablingMap.h:47
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
NswZebraData.h
CLASS_DEF
CLASS_DEF(Nsw_CablingMap, 219609437, 1)
NswZebraData
Definition: NswZebraData.h:18
Nsw_CablingMap::m_idHelperSvc
const Muon::IMuonIdHelperSvc * m_idHelperSvc
Definition: Nsw_CablingMap.h:42
Nsw_CablingMap::correctChannel
std::optional< Identifier > correctChannel(const Identifier &id, MsgStream &msg) const
Definition: Nsw_CablingMap.cxx:19
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:27
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
IMuonIdHelperSvc.h
Identifier
Definition: IdentifierFieldParser.cxx:14