ATLAS Offline Software
Loading...
Searching...
No Matches
TGCCableASDToPP.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONTGC_CABLING_TGCCABLEASDTOPP_H
6#define MUONTGC_CABLING_TGCCABLEASDTOPP_H
7
8#include <array>
9#include <string>
10#include <vector>
11
15
16namespace MuonTGC_Cabling {
17
18class TGCCableASDToPP : public TGCCable {
19 public:
20 TGCCableASDToPP(const std::string& fileName, const std::string& diffFile);
22
23 std::unique_ptr<TGCChannelId> getChannel(const TGCChannelId& channelId,
24 bool orChannel = false) const;
25
26 private:
27 void initialize(const std::string& filename, const std::string& diffFile);
28
29 void updateDatabase(const std::string& diffFile);
30
31 std::unique_ptr<TGCChannelId> getChannelIn(const TGCChannelId& ppin,
32 bool orChannel = false) const;
33 std::unique_ptr<TGCChannelId> getChannelOut(const TGCChannelId& asdout,
34 bool orChannel = false) const;
35
36 std::vector<std::vector<int> > getUpdateInfo(
37 const int side, const int sector,
38 const std::vector<std::string>& diffFile, const std::string& blockname);
39
40 TGCDatabaseASDToPP* getDatabase(const int side, const int region,
41 const int sector, const int module) const;
42
44 const int side, const int sector,
45 const std::vector<std::string>& diffFile, const std::string& blockname,
46 std::shared_ptr<TGCDatabaseASDToPP>& database);
47
48 private:
49 // reverse layers in Forward sector
50
51 static constexpr std::array<int, 9> s_stripForward{2, 1, 0, 4, 3,
52 6, 5, 8, 7};
53
54 private:
56 std::array<std::array<std::shared_ptr<TGCDatabaseASDToPP>,
60 std::array<std::array<std::shared_ptr<TGCDatabaseASDToPP>,
64 std::array<std::array<std::shared_ptr<TGCDatabaseASDToPP>,
67
74
81
83 using CommonDB = std::array<
84 std::array<std::shared_ptr<TGCDatabaseASDToPP>, TGCId::MaxModuleType>,
86 CommonDB m_commonDb{{{nullptr}}};
87};
88
89} // namespace MuonTGC_Cabling
90
91#endif
static constexpr std::array< int, 9 > s_stripForward
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_ENDCAP_SECTOR >, TGCId::MaxSideType > EndcapSectorDB
std::vector< std::vector< int > > getUpdateInfo(const int side, const int sector, const std::vector< std::string > &diffFile, const std::string &blockname)
void updateDatabase(const std::string &diffFile)
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_INNER_SECTOR >, TGCId::MaxSideType > InnerSectorDB
std::unique_ptr< TGCChannelId > getChannel(const TGCChannelId &channelId, bool orChannel=false) const
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
void updateIndividualDatabase(const int side, const int sector, const std::vector< std::string > &diffFile, const std::string &blockname, std::shared_ptr< TGCDatabaseASDToPP > &database)
std::unique_ptr< TGCChannelId > getChannelOut(const TGCChannelId &asdout, bool orChannel=false) const
std::unique_ptr< TGCChannelId > getChannelIn(const TGCChannelId &ppin, bool orChannel=false) const
TGCDatabaseASDToPP * getDatabase(const int side, const int region, const int sector, const int module) const
TGCCableASDToPP(const std::string &fileName, const std::string &diffFile)
TGCCable(CableType type=NoCableType)
Definition TGCCable.h:31
static constexpr int NUM_INNER_SECTOR
Definition TGCId.h:43
static constexpr int NUM_ENDCAP_SECTOR
Definition TGCId.h:41
static constexpr int NUM_FORWARD_SECTOR
Definition TGCId.h:42
void initialize()