ATLAS Offline Software
Loading...
Searching...
No Matches
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
21namespace LVL1TGC {
24class TGCGoodMF;
27}
28
29namespace LVL1TGCTrigger {
30
31class TGCArguments;
34class TGCPatchPanel;
37
39{
40 typedef std::vector<int> PatchPanelIDs;
41 typedef std::vector<const TGCPatchPanel*> PatchPanelPointers;
42
43 public:
47 const SG::ReadCondHandleKey<TGCTriggerLUTs>& readLUTsCondKey);
48 virtual ~TGCDatabaseManager();
49
52
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
90inline std::shared_ptr<LVL1TGC::BigWheelCoincidenceLUT> TGCDatabaseManager::getBigWheelCoincidenceLUT() const
91{
92 return m_bigWheelLUT;
93}
94
96{
97 return m_mapEIFI[sideId];
98}
99
100inline std::shared_ptr<LVL1TGC::TGCTileMuCoincidenceLUT> TGCDatabaseManager::getTileMuCoincidenceLUT() const
101{
102 return m_tileMuLUT;
103}
104
105inline std::shared_ptr<TGCNSWCoincidenceMap> TGCDatabaseManager::getNSWCoincidenceMap(int sideId, int octantId, int moduleId) const
106{
107 return m_mapNSW[sideId][octantId][moduleId];
108}
109
110inline std::shared_ptr<LVL1TGC::TGCBIS78CoincidenceMap> TGCDatabaseManager::getBIS78CoincidenceMap() const
111{
112 return m_mapBIS78;
113}
114
115inline 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
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
TGCConnectionInPP * getConnectionInPP(TGCPatchPanel *patchPanel) const
std::vector< const TGCPatchPanel * > PatchPanelPointers
std::shared_ptr< LVL1TGC::TGCBIS78CoincidenceMap > getBIS78CoincidenceMap() const
TGCDatabaseManager & operator=(const TGCDatabaseManager &right)
static std::string getFilename(int type)
const TGCConnectionASDToPP * getConnectionASDToPP(TGCRegionType region, int type, TGCForwardBackwardType forwardBackward) const
const TGCArguments * tgcArgs() const
std::shared_ptr< LVL1TGC::TGCGoodMF > m_mapGoodMF
void addConnectionInPP(const TGCPatchPanel *patchPanel, const TGCConnectionInPP *connectionInPP)
std::shared_ptr< LVL1TGC::BigWheelCoincidenceLUT > m_bigWheelLUT
std::shared_ptr< LVL1TGC::TGCTileMuCoincidenceLUT > m_tileMuLUT
std::map< PatchPanelIDs, std::pair< const TGCConnectionInPP, PatchPanelPointers > > m_patchPanelToConnectionInPP
const LVL1TGC::TGCEIFICoincidenceMap * getEIFICoincidenceMap(int sideId) const
std::shared_ptr< LVL1TGC::TGCGoodMF > getGoodMFMap() const
std::shared_ptr< LVL1TGC::TGCBIS78CoincidenceMap > m_mapBIS78
static const std::vector< std::string > splitCW(const std::string &input, char delimiter)
LVL1TGC::TGCEIFICoincidenceMap * m_mapEIFI[LVL1TGC::kNSide]
const TGCConnectionPPToSL * getConnectionPPToSL(TGCRegionType type) const
TGCConnectionPPToSL * m_PPToSL[NumberOfRegionType]
std::shared_ptr< LVL1TGC::BigWheelCoincidenceLUT > getBigWheelCoincidenceLUT() const
TGCConnectionASDToPP * m_ASDToPP[NumberOfRegionType][TGCSector::NumberOfPatchPanelType][TotalNumForwardBackwardType]
std::array< std::array< std::array< std::shared_ptr< TGCNSWCoincidenceMap >, NumberOfModuleInBW >, NumberOfOctant >, LVL1TGC::kNSide > m_mapNSW
std::shared_ptr< LVL1TGC::TGCTileMuCoincidenceLUT > getTileMuCoincidenceLUT() const
std::shared_ptr< TGCNSWCoincidenceMap > getNSWCoincidenceMap(int sideId, int octantId, int moduleId) const
This class stores the LUT for Tile-Muon coincidence of the Run-3 L1Muon Endcap trigger.
@ TotalNumForwardBackwardType
const int NumberOfRegionType