ATLAS Offline Software
TGCDatabaseManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TGCDatabaseManager_hh
6 #define TGCDatabaseManager_hh
7 
11 
16 
17 #include <vector>
18 #include <map>
19 #include <string>
20 
21 namespace LVL1TGC {
22 class BigWheelCoincidenceLUT;
23 class TGCTileMuCoincidenceLUT;
24 class TGCGoodMF;
25 class TGCBIS78CoincidenceMap;
26 class TGCEIFICoincidenceMap;
27 }
28 
29 namespace LVL1TGCTrigger {
30 
31 class TGCArguments;
32 class TGCConnectionASDToPP;
33 class TGCConnectionInPP;
34 class TGCPatchPanel;
35 class TGCConnectionPPToSL;
36 class TGCNSWCoincidenceMap;
37 
39 {
40  typedef std::vector<int> PatchPanelIDs;
41  typedef std::vector<const TGCPatchPanel*> PatchPanelPointers;
42 
43  public:
46  const SG::ReadCondHandleKey<TGCTriggerData>& readCondKey,
47  const SG::ReadCondHandleKey<TGCTriggerLUTs>& readLUTsCondKey);
48  virtual ~TGCDatabaseManager();
49 
52 
54  const TGCConnectionASDToPP* getConnectionASDToPP(TGCRegionType region, int type, TGCForwardBackwardType forwardBackward) const;
55  std::shared_ptr<LVL1TGC::BigWheelCoincidenceLUT> getBigWheelCoincidenceLUT() const;
57  std::shared_ptr<LVL1TGC::TGCTileMuCoincidenceLUT> getTileMuCoincidenceLUT() const;
58  std::shared_ptr<TGCNSWCoincidenceMap> getNSWCoincidenceMap(int sideId, int octantId, int moduleId) const;
59  std::shared_ptr<LVL1TGC::TGCBIS78CoincidenceMap> getBIS78CoincidenceMap() const;
60  std::shared_ptr<LVL1TGC::TGCGoodMF> getGoodMFMap() const;
61 
63  void addConnectionInPP(const TGCPatchPanel* patchPanel, const TGCConnectionInPP* connectionInPP);
64 
66 
67  static std::string getFilename(int type);
68  static const std::vector<std::string > splitCW(const std::string& input, char delimiter);
69 
71  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
72 
73  private:
75 
76  std::shared_ptr<LVL1TGC::BigWheelCoincidenceLUT> m_bigWheelLUT;
78  std::shared_ptr<LVL1TGC::TGCTileMuCoincidenceLUT> m_tileMuLUT;
79  std::array<std::array<std::array<std::shared_ptr<TGCNSWCoincidenceMap>, NumberOfModuleInBW>, NumberOfOctant>, LVL1TGC::kNSide> m_mapNSW;
80  std::shared_ptr<LVL1TGC::TGCBIS78CoincidenceMap> m_mapBIS78; // temporal
83  std::shared_ptr<LVL1TGC::TGCGoodMF> m_mapGoodMF;
84 
85  std::map<PatchPanelIDs, std::pair<const TGCConnectionInPP, PatchPanelPointers> > m_patchPanelToConnectionInPP;
86 
88 };
89 
90 inline std::shared_ptr<LVL1TGC::BigWheelCoincidenceLUT> TGCDatabaseManager::getBigWheelCoincidenceLUT() const
91 {
92  return m_bigWheelLUT;
93 }
94 
96 {
97  return m_mapEIFI[sideId];
98 }
99 
100 inline std::shared_ptr<LVL1TGC::TGCTileMuCoincidenceLUT> TGCDatabaseManager::getTileMuCoincidenceLUT() const
101 {
102  return m_tileMuLUT;
103 }
104 
105 inline std::shared_ptr<TGCNSWCoincidenceMap> TGCDatabaseManager::getNSWCoincidenceMap(int sideId, int octantId, int moduleId) const
106 {
107  return m_mapNSW[sideId][octantId][moduleId];
108 }
109 
110 inline std::shared_ptr<LVL1TGC::TGCBIS78CoincidenceMap> TGCDatabaseManager::getBIS78CoincidenceMap() const
111 {
112  return m_mapBIS78;
113 }
114 
115 inline std::shared_ptr<LVL1TGC::TGCGoodMF> TGCDatabaseManager::getGoodMFMap() const {
116  return m_mapGoodMF;
117 }
118 
120  int region = (type == TGCRegionType::FORWARD) ? 0 : 1;
121  return m_PPToSL[region];
122 }
123 
125  int reg = (region == TGCRegionType::FORWARD) ? 0 : 1;
126  return m_ASDToPP[reg][type][forwardBackward];
127 }
128 
129 } // end of LVL1TGCTrigger namespace
130 
131 #endif // TGCDatabaseManager_hh
LVL1TGCTrigger::TGCDatabaseManager::NumberOfModuleInBW
@ NumberOfModuleInBW
Definition: TGCDatabaseManager.h:74
LVL1TGCTrigger::TGCDatabaseManager::operator=
TGCDatabaseManager & operator=(const TGCDatabaseManager &right)
Definition: TGCDatabaseManager.cxx:211
LVL1TGCTrigger::TGCDatabaseManager::m_tileMuLUT
std::shared_ptr< LVL1TGC::TGCTileMuCoincidenceLUT > m_tileMuLUT
Definition: TGCDatabaseManager.h:78
LVL1TGCTrigger::NumberOfRegionType
const int NumberOfRegionType
Definition: TGCNumbering.h:55
LVL1TGCTrigger::TGCDatabaseManager::getConnectionASDToPP
const TGCConnectionASDToPP * getConnectionASDToPP(TGCRegionType region, int type, TGCForwardBackwardType forwardBackward) const
Definition: TGCDatabaseManager.h:124
TGCConnectionPPToSB.h
LVL1TGCTrigger::TGCDatabaseManager::splitCW
static const std::vector< std::string > splitCW(const std::string &input, char delimiter)
Definition: TGCDatabaseManager.cxx:252
LVL1TGCTrigger::TGCDatabaseManager::getNSWCoincidenceMap
std::shared_ptr< TGCNSWCoincidenceMap > getNSWCoincidenceMap(int sideId, int octantId, int moduleId) const
Definition: TGCDatabaseManager.h:105
TGCTriggerLUTs.h
LVL1TGCTrigger::TGCDatabaseManager::m_bigWheelLUT
std::shared_ptr< LVL1TGC::BigWheelCoincidenceLUT > m_bigWheelLUT
Definition: TGCDatabaseManager.h:76
LVL1TGCTrigger::TGCDatabaseManager::PatchPanelIDs
std::vector< int > PatchPanelIDs
Definition: TGCDatabaseManager.h:40
LVL1TGCTrigger::TGCRegionType::FORWARD
@ FORWARD
LVL1TGCTrigger::TGCDatabaseManager::getConnectionPPToSL
const TGCConnectionPPToSL * getConnectionPPToSL(TGCRegionType type) const
Definition: TGCDatabaseManager.h:119
LVL1TGCTrigger::TGCConnectionInPP
Definition: TGCConnectionInPP.h:15
LVL1TGCTrigger::TGCDatabaseManager::m_mapNSW
std::array< std::array< std::array< std::shared_ptr< TGCNSWCoincidenceMap >, NumberOfModuleInBW >, NumberOfOctant >, LVL1TGC::kNSide > m_mapNSW
Definition: TGCDatabaseManager.h:79
LVL1TGCTrigger::TGCDatabaseManager::m_tgcArgs
TGCArguments * m_tgcArgs
Definition: TGCDatabaseManager.h:87
LVL1TGC::TGCEIFICoincidenceMap
Definition: TGCEIFICoincidenceMap.h:23
LVL1TGCTrigger::TGCForwardBackwardType
TGCForwardBackwardType
Definition: TGCNumbering.h:59
TGCElectronicsSystem.h
LVL1TGCTrigger::TotalNumForwardBackwardType
@ TotalNumForwardBackwardType
Definition: TGCNumbering.h:59
LVL1TGCTrigger::TGCConnectionPPToSL
Definition: TGCConnectionPPToSL.h:16
LVL1TGCTrigger::TGCDatabaseManager::~TGCDatabaseManager
virtual ~TGCDatabaseManager()
Definition: TGCDatabaseManager.cxx:173
LVL1TGCTrigger::TGCDatabaseManager::getBigWheelCoincidenceLUT
std::shared_ptr< LVL1TGC::BigWheelCoincidenceLUT > getBigWheelCoincidenceLUT() const
Definition: TGCDatabaseManager.h:90
LVL1TGCTrigger::TGCDatabaseManager::m_patchPanelToConnectionInPP
std::map< PatchPanelIDs, std::pair< const TGCConnectionInPP, PatchPanelPointers > > m_patchPanelToConnectionInPP
Definition: TGCDatabaseManager.h:85
LVL1TGCTrigger::NumberOfOctant
const int NumberOfOctant
Definition: TGCElectronicsSystem.h:19
LVL1TGCTrigger::TGCDatabaseManager::getFilename
static std::string getFilename(int type)
Definition: TGCDatabaseManager.cxx:239
python.AthDsoLogger.delimiter
delimiter
Definition: AthDsoLogger.py:71
LVL1TGCTrigger::TGCDatabaseManager::getBIS78CoincidenceMap
std::shared_ptr< LVL1TGC::TGCBIS78CoincidenceMap > getBIS78CoincidenceMap() const
Definition: TGCDatabaseManager.h:110
LVL1TGCTrigger::TGCDatabaseManager::getEIFICoincidenceMap
const LVL1TGC::TGCEIFICoincidenceMap * getEIFICoincidenceMap(int sideId) const
Definition: TGCDatabaseManager.h:95
LVL1TGCTrigger::TGCDatabaseManager::m_PPToSL
TGCConnectionPPToSL * m_PPToSL[NumberOfRegionType]
Definition: TGCDatabaseManager.h:81
LVL1TGCTrigger::TGCDatabaseManager::tgcArgs
const TGCArguments * tgcArgs() const
Definition: TGCDatabaseManager.h:71
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
LVL1TGC
Definition: BigWheelCoincidenceLUT.cxx:20
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
LVL1TGCTrigger::TGCDatabaseManager::getConnectionInPP
TGCConnectionInPP * getConnectionInPP(TGCPatchPanel *patchPanel) const
Definition: TGCDatabaseManager.cxx:22
LVL1TGCTrigger::TGCDatabaseManager::tgcArgs
TGCArguments * tgcArgs()
Definition: TGCDatabaseManager.h:70
LVL1TGCTrigger
Definition: LVL1TGCTrigger.cxx:47
ReadCondHandleKey.h
LVL1TGCTrigger::TGCDatabaseManager::m_mapBIS78
std::shared_ptr< LVL1TGC::TGCBIS78CoincidenceMap > m_mapBIS78
Definition: TGCDatabaseManager.h:80
LVL1TGCTrigger::TGCDatabaseManager
Definition: TGCDatabaseManager.h:39
LVL1TGCTrigger::TGCDatabaseManager::deleteConnectionPPToSL
void deleteConnectionPPToSL()
Definition: TGCDatabaseManager.cxx:165
LVL1TGCTrigger::TGCDatabaseManager::TGCDatabaseManager
TGCDatabaseManager()
Definition: TGCDatabaseManager.cxx:75
TGCNumbering.h
LVL1TGCTrigger::TGCPatchPanel
Definition: TGCPatchPanel.h:38
LVL1TGCTrigger::TGCArguments
Definition: TGCArguments.h:12
SG::ReadCondHandleKey< TGCTriggerData >
LVL1TGCTrigger::TGCDatabaseManager::m_mapGoodMF
std::shared_ptr< LVL1TGC::TGCGoodMF > m_mapGoodMF
Definition: TGCDatabaseManager.h:83
LVL1TGCTrigger::TGCRegionType
TGCRegionType
Definition: TGCNumbering.h:49
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthMessaging.h
LVL1TGCTrigger::TGCDatabaseManager::m_ASDToPP
TGCConnectionASDToPP * m_ASDToPP[NumberOfRegionType][TGCSector::NumberOfPatchPanelType][TotalNumForwardBackwardType]
Definition: TGCDatabaseManager.h:82
LVL1TGC::kNSide
@ kNSide
Definition: TGCNumbering.h:16
LVL1TGCTrigger::TGCDatabaseManager::PatchPanelPointers
std::vector< const TGCPatchPanel * > PatchPanelPointers
Definition: TGCDatabaseManager.h:41
LVL1TGCTrigger::TGCDatabaseManager::getGoodMFMap
std::shared_ptr< LVL1TGC::TGCGoodMF > getGoodMFMap() const
Definition: TGCDatabaseManager.h:115
LVL1TGCTrigger::TGCDatabaseManager::getTileMuCoincidenceLUT
std::shared_ptr< LVL1TGC::TGCTileMuCoincidenceLUT > getTileMuCoincidenceLUT() const
Definition: TGCDatabaseManager.h:100
LVL1TGCTrigger::TGCDatabaseManager::m_mapEIFI
LVL1TGC::TGCEIFICoincidenceMap * m_mapEIFI[LVL1TGC::kNSide]
Definition: TGCDatabaseManager.h:77
LVL1TGCTrigger::TGCConnectionASDToPP
Definition: TGCConnectionASDToPP.h:13
LVL1TGCTrigger::TGCDatabaseManager::addConnectionInPP
void addConnectionInPP(const TGCPatchPanel *patchPanel, const TGCConnectionInPP *connectionInPP)
Definition: TGCDatabaseManager.cxx:51
LVL1TGCTrigger::TGCSector::NumberOfPatchPanelType
@ NumberOfPatchPanelType
Definition: TGCSector.h:37
TGCTriggerData.h