ATLAS Offline Software
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 
12 #include "MuonTGC_Cabling/TGCId.h"
14 
15 #include <string>
16 #include <vector>
17 
18 class StatusCode;
19 
20 namespace MuonTGC_Cabling {
21 
22 class TGCCableASDToPP : public TGCCable {
23  public:
24  TGCCableASDToPP(const std::string& filename);
25  virtual ~TGCCableASDToPP();
26 
28  bool orChannel=false) const;
29 
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 
48  const int region,
49  const int sector,
50  const int module) const;
51 
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
MuonTGC_Cabling::TGCCableASDToPP::m_commonDb
CommonDB m_commonDb
Definition: TGCCableASDToPP.h:84
grepfile.info
info
Definition: grepfile.py:38
MuonTGC_Cabling::TGCId::MaxModuleType
@ MaxModuleType
Definition: TGCId.h:48
MuonTGC_Cabling::TGCCableASDToPP::getChannelOut
virtual TGCChannelId * getChannelOut(const TGCChannelId *asdout, bool orChannel=false) const
Definition: TGCCableASDToPP.cxx:305
MuonTGC_Cabling::TGCCableASDToPP::TGCCableASDToPP
TGCCableASDToPP()
Definition: TGCCableASDToPP.h:33
MuonTGC_Cabling::TGCCableASDToPP::getUpdateInfo
StatusCode getUpdateInfo(const int side, const int sector, const std::string &blockname, std::vector< std::vector< int > > &info)
Definition: TGCCableASDToPP.cxx:127
MuonTGC_Cabling::TGCCableASDToPP::m_FSDdb
ForwardSectorDB m_FSDdb
Definition: TGCCableASDToPP.h:69
MuonTGC_Cabling::TGCCableASDToPP::m_FSTdb
ForwardSectorDB m_FSTdb
Definition: TGCCableASDToPP.h:71
MuonTGC_Cabling::TGCCableASDToPP::m_FWDdb
ForwardSectorDB m_FWDdb
Definition: TGCCableASDToPP.h:68
MuonTGC_Cabling::TGCCableASDToPP::m_ASD2PP_DIFF_12
std::vector< std::string > * m_ASD2PP_DIFF_12
Definition: TGCCableASDToPP.h:61
MuonTGC_Cabling::TGCCableASDToPP::m_ESDdb
EndcapSectorDB m_ESDdb
Definition: TGCCableASDToPP.h:76
MuonTGC_Cabling::TGCId::MaxSideType
@ MaxSideType
Definition: TGCId.h:46
MuonTGC_Cabling::TGCCableASDToPP::EndcapSectorDB
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_ENDCAP_SECTOR >, TGCId::MaxSideType > EndcapSectorDB
Definition: TGCCableASDToPP.h:66
MuonTGC_Cabling::TGCId::NUM_INNER_SECTOR
static constexpr int NUM_INNER_SECTOR
Definition: TGCId.h:42
MuonTGC_Cabling::TGCCableASDToPP::m_FSIdb
InnerSectorDB m_FSIdb
Definition: TGCCableASDToPP.h:73
MuonTGC_Cabling::TGCCableASDToPP::~TGCCableASDToPP
virtual ~TGCCableASDToPP()
Definition: TGCCableASDToPP.cxx:23
MuonTGC_Cabling::TGCCableASDToPP::updateIndividualDatabase
StatusCode updateIndividualDatabase(const int side, const int sector, const std::string &blockname, std::shared_ptr< TGCDatabaseASDToPP > &database)
Definition: TGCCableASDToPP.cxx:365
MuonTGC_Cabling::TGCDatabaseASDToPP
Definition: TGCDatabaseASDToPP.h:14
TGCId.h
TRT::Hit::side
@ side
Definition: HitInfo.h:83
MuonTGC_Cabling::TGCId::NUM_FORWARD_SECTOR
static constexpr int NUM_FORWARD_SECTOR
Definition: TGCId.h:41
python.PyAthena.module
module
Definition: PyAthena.py:131
MuonTGC_Cabling::TGCCableASDToPP::CommonDB
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::MaxModuleType >, TGCId::MaxRegionType > CommonDB
Pointers of common databases are recorded in this array.
Definition: TGCCableASDToPP.h:83
MuonTGC_Cabling::TGCCableASDToPP::ForwardSectorDB
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_FORWARD_SECTOR >, TGCId::MaxSideType > ForwardSectorDB
Definition: TGCCableASDToPP.h:64
python.subdetectors.mmg.database
database
Definition: mmg.py:6
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonTGC_Cabling
Definition: TGCCable.h:13
MuonTGC_Cabling::TGCCableASDToPP::m_EWTdb
EndcapSectorDB m_EWTdb
Definition: TGCCableASDToPP.h:77
MuonTGC_Cabling::TGCCableASDToPP::getChannelIn
virtual TGCChannelId * getChannelIn(const TGCChannelId *ppin, bool orChannel=false) const
Definition: TGCCableASDToPP.cxx:261
MuonTGC_Cabling::TGCCable
Definition: TGCCable.h:16
MuonTGC_Cabling::TGCCableASDToPP::m_FWIdb
InnerSectorDB m_FWIdb
Definition: TGCCableASDToPP.h:72
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
python.egammaTruthD3PDObject.blockname
blockname
Definition: egammaTruthD3PDObject.py:64
MuonTGC_Cabling::TGCCableASDToPP::updateDatabase
StatusCode updateDatabase()
Definition: TGCCableASDToPP.cxx:68
MuonTGC_Cabling::TGCCableASDToPP::m_EWDdb
EndcapSectorDB m_EWDdb
Definition: TGCCableASDToPP.h:75
MuonTGC_Cabling::TGCCableASDToPP::m_tgcCablingDbTool
ToolHandle< ITGCCablingDbTool > m_tgcCablingDbTool
Definition: TGCCableASDToPP.h:60
MuonTGC_Cabling::TGCId::MaxRegionType
@ MaxRegionType
Definition: TGCId.h:54
MuonTGC_Cabling::TGCCableASDToPP::m_FWTdb
ForwardSectorDB m_FWTdb
Definition: TGCCableASDToPP.h:70
ITGCCablingDbTool.h
MuonTGC_Cabling::TGCCableASDToPP
Definition: TGCCableASDToPP.h:22
MuonTGC_Cabling::TGCCableASDToPP::m_ESTdb
EndcapSectorDB m_ESTdb
Definition: TGCCableASDToPP.h:78
MuonTGC_Cabling::TGCChannelId
Definition: TGCChannelId.h:15
MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR
static constexpr int NUM_ENDCAP_SECTOR
Definition: TGCId.h:40
TGCCable.h
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
MuonTGC_Cabling::TGCCableASDToPP::m_ESIdb
InnerSectorDB m_ESIdb
Definition: TGCCableASDToPP.h:80
MuonTGC_Cabling::TGCCableASDToPP::InnerSectorDB
std::array< std::array< std::shared_ptr< TGCDatabaseASDToPP >, TGCId::NUM_INNER_SECTOR >, TGCId::MaxSideType > InnerSectorDB
Definition: TGCCableASDToPP.h:65
MuonTGC_Cabling::TGCCableASDToPP::getChannel
virtual TGCChannelId * getChannel(const TGCChannelId *channelId, bool orChannel=false) const
Definition: TGCCableASDToPP.cxx:250
MuonTGC_Cabling::TGCCableASDToPP::getDatabase
TGCDatabaseASDToPP * getDatabase(const int side, const int region, const int sector, const int module) const
Definition: TGCCableASDToPP.cxx:187
TGCDatabaseASDToPP.h
MuonTGC_Cabling::TGCCableASDToPP::s_stripForward
static const int s_stripForward[]
Definition: TGCCableASDToPP.h:58
MuonTGC_Cabling::TGCCableASDToPP::initialize
void initialize(const std::string &filename)
Definition: TGCCableASDToPP.cxx:29
MuonTGC_Cabling::TGCCableASDToPP::m_EWIdb
InnerSectorDB m_EWIdb
Definition: TGCCableASDToPP.h:79