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
9
13#include <array>
14#include <string>
15#include <vector>
16#include <string_view>
17
18namespace MuonTGC_Cabling {
19
20class TGCCableASDToPP : public TGCCable {
21 public:
22 TGCCableASDToPP(const std::string& fileName, const std::string& diffFile);
24
25 std::unique_ptr<TGCChannelId> getChannel(const TGCChannelId& channelId,
26 bool orChannel = false) const;
27
28 private:
29 void initialize(const std::string& filename, const std::string& diffFile);
30
31 void updateDatabase(const std::string& diffFile);
32
33 std::unique_ptr<TGCChannelId> getChannelIn(const TGCChannelId& ppin,
34 bool orChannel = false) const;
35 std::unique_ptr<TGCChannelId> getChannelOut(const TGCChannelId& asdout,
36 bool orChannel = false) const;
37
38 std::vector<std::vector<int> > getUpdateInfo(
39 const int side, const int sector,
40 const std::vector<std::string>& diffFile, std::string_view blockname);
41
43 const int sector, const TGCId::ModuleType module) const;
44
46 const int side, const int sector,
47 const std::vector<std::string>& diffFile, std::string_view blockname,
48 std::shared_ptr<TGCDatabaseASDToPP>& database);
49
50 private:
51 // reverse layers in Forward sector
52
53 static constexpr std::array<int, 10> s_stripForward{2, 1, 0, 4, 3,
54 6, 5, 8, 7, 9};
55
56 private:
58 std::array<std::array<std::shared_ptr<TGCDatabaseASDToPP>,
62 std::array<std::array<std::shared_ptr<TGCDatabaseASDToPP>,
66 std::array<std::array<std::shared_ptr<TGCDatabaseASDToPP>,
69
76
83
85 using CommonDB = std::array<
86 std::array<std::shared_ptr<TGCDatabaseASDToPP>, +TGCId::ModuleType::MaxModuleType>,
88 CommonDB m_commonDb{{{nullptr}}};
89};
90
91} // namespace MuonTGC_Cabling
92
93#endif
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_INNER_SECTOR >,+TGCId::SideType::MaxSideType > InnerSectorDB
TGCDatabaseASDToPP * getDatabase(const TGCId::SideType side, const TGCId::RegionType region, const int sector, const TGCId::ModuleType module) const
void updateDatabase(const std::string &diffFile)
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >,+TGCId::ModuleType::MaxModuleType >,+TGCId::RegionType::MaxRegionType > CommonDB
Pointers of common databases are recorded in this array.
std::unique_ptr< TGCChannelId > getChannel(const TGCChannelId &channelId, bool orChannel=false) const
std::unique_ptr< TGCChannelId > getChannelOut(const TGCChannelId &asdout, bool orChannel=false) const
void updateIndividualDatabase(const int side, const int sector, const std::vector< std::string > &diffFile, std::string_view blockname, std::shared_ptr< TGCDatabaseASDToPP > &database)
std::vector< std::vector< int > > getUpdateInfo(const int side, const int sector, const std::vector< std::string > &diffFile, std::string_view blockname)
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_FORWARD_SECTOR >,+TGCId::SideType::MaxSideType > ForwardSectorDB
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_ENDCAP_SECTOR >,+TGCId::SideType::MaxSideType > EndcapSectorDB
std::unique_ptr< TGCChannelId > getChannelIn(const TGCChannelId &ppin, bool orChannel=false) const
TGCCableASDToPP(const std::string &fileName, const std::string &diffFile)
static constexpr std::array< int, 10 > s_stripForward
TGCCable(CableType type=NoCableType)
Definition TGCCable.h:31
static constexpr int NUM_INNER_SECTOR
Definition TGCId.h:45
static constexpr int NUM_ENDCAP_SECTOR
Definition TGCId.h:43
static constexpr int NUM_FORWARD_SECTOR
Definition TGCId.h:44
void initialize()