ATLAS Offline Software
Loading...
Searching...
No Matches
TGCCableASDToPP.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 MUONTGC_CABLING_TGCCABLEASDTOPP_H
6#define MUONTGC_CABLING_TGCCABLEASDTOPP_H
7
9#include "GaudiKernel/ToolHandle.h"
10
14
15#include <string>
16#include <vector>
17
18class StatusCode;
19
20namespace MuonTGC_Cabling {
21
22class TGCCableASDToPP : public TGCCable {
23 public:
24 TGCCableASDToPP(const std::string& filename);
25 virtual ~TGCCableASDToPP();
26
27 virtual TGCChannelId* getChannel(const TGCChannelId* channelId,
28 bool orChannel=false) const;
29
30 StatusCode updateDatabase();
31
32 private:
34
35 void initialize(const std::string& filename);
36
37 virtual TGCChannelId* getChannelIn (const TGCChannelId* ppin,
38 bool orChannel=false) const;
39 virtual TGCChannelId* getChannelOut (const TGCChannelId* asdout,
40 bool orChannel=false) const;
41
42 StatusCode getUpdateInfo(const int side,
43 const int sector,
44 const std::string& blockname,
45 std::vector<std::vector<int> >& info);
46
47 TGCDatabaseASDToPP* getDatabase(const int side,
48 const int region,
49 const int sector,
50 const int module) const;
51
52 StatusCode updateIndividualDatabase(const int side,
53 const int sector,
54 const std::string& blockname,
55 std::shared_ptr<TGCDatabaseASDToPP>& database);
56
57 private:
58 static const int s_stripForward[];
59
60 ToolHandle<ITGCCablingDbTool> m_tgcCablingDbTool; // cannot declare inline, since TGCCableASDToPP is no athena component
61 std::vector<std::string>* m_ASD2PP_DIFF_12{nullptr};
62
63 private:
64 using ForwardSectorDB = std::array<std::array<std::shared_ptr<TGCDatabaseASDToPP>, TGCId::NUM_FORWARD_SECTOR>, TGCId::MaxSideType>;
65 using InnerSectorDB = std::array<std::array<std::shared_ptr<TGCDatabaseASDToPP>, TGCId::NUM_INNER_SECTOR>, TGCId::MaxSideType>;
66 using EndcapSectorDB = std::array<std::array<std::shared_ptr<TGCDatabaseASDToPP>, TGCId::NUM_ENDCAP_SECTOR>, TGCId::MaxSideType>;
67
74
81
83 using CommonDB = std::array<std::array<std::shared_ptr<TGCDatabaseASDToPP>, TGCId::MaxModuleType>, TGCId::MaxRegionType>;
84 CommonDB m_commonDb{{{nullptr}}};
85};
86
87} // end of namespace
88
89#endif
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_INNER_SECTOR >, TGCId::MaxSideType > InnerSectorDB
TGCCableASDToPP(const std::string &filename)
ToolHandle< ITGCCablingDbTool > m_tgcCablingDbTool
StatusCode updateIndividualDatabase(const int side, const int sector, const std::string &blockname, std::shared_ptr< TGCDatabaseASDToPP > &database)
StatusCode getUpdateInfo(const int side, const int sector, const std::string &blockname, std::vector< std::vector< int > > &info)
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::MaxModuleType >, TGCId::MaxRegionType > CommonDB
Pointers of common databases are recorded in this array.
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_FORWARD_SECTOR >, TGCId::MaxSideType > ForwardSectorDB
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_ENDCAP_SECTOR >, TGCId::MaxSideType > EndcapSectorDB
std::vector< std::string > * m_ASD2PP_DIFF_12
virtual TGCChannelId * getChannelOut(const TGCChannelId *asdout, bool orChannel=false) const
TGCDatabaseASDToPP * getDatabase(const int side, const int region, const int sector, const int module) const
virtual TGCChannelId * getChannelIn(const TGCChannelId *ppin, bool orChannel=false) const
virtual TGCChannelId * getChannel(const TGCChannelId *channelId, bool orChannel=false) const
TGCCable(CableType type=NoCableType)
Definition TGCCable.h:24
static constexpr int NUM_INNER_SECTOR
Definition TGCId.h:42
static constexpr int NUM_ENDCAP_SECTOR
Definition TGCId.h:40
static constexpr int NUM_FORWARD_SECTOR
Definition TGCId.h:41
void initialize()