ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_DataBase.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "SCT_DataBase.h"
6
10
13
15
16#include <iostream>
17
20{
21 const IGeoDbTagSvc * geoDbTag = m_athenaComps->geoDbTagSvc();
22
23 // Get version tag and node for SCT
24 DecodeVersionKey versionKey(geoDbTag,"SCT");
25 const std::string& versionTag = versionKey.tag();
26 const std::string& versionNode = versionKey.node();
27
28 // Get version tag and node for InnerDetector.
29 DecodeVersionKey indetVersionKey(geoDbTag,"InnerDetector");
30
31 // Access the RDB
32 IRDBAccessSvc* rdbSvc = m_athenaComps->rdbAccessSvc();
33
34 // SCT version tag
35 if(geoDbTag->getParamSvcName().starts_with("RDB"))
36 m_sctVersionTag = rdbSvc->getChildTag("SCT", versionKey.tag(), versionKey.node());
37
38
40 //
41 // Gets the structures
42 //
44
45 msg(MSG::INFO) << "Retrieving Record Sets from database ..." << endmsg;
46 msg(MSG::DEBUG) << " Using version tag: " << versionTag << endmsg;
47 msg(MSG::DEBUG) << " at node: " << versionNode << endmsg;
48 msg(MSG::DEBUG) << " SCT Version: " << m_sctVersionTag << endmsg;
49
50 // SCT TopLevel
51 m_topLevel = rdbSvc->getRecordsetPtr("SctTopLevel", versionTag, versionNode);
52 msg(MSG::DEBUG) << "Table SctTopLevel Fetched" << endmsg;
53
54 // Weight Table
55 m_weightTable = rdbSvc->getRecordsetPtr("SctWeights", versionTag, versionNode);
56 msg(MSG::DEBUG) << "Table SctWeights Fetched" << endmsg;
57
58 // Extra Scaling Table. This is used for extra material studies. For nominal material the table should be empty.
59 // NB this is at InnerDetector level node.
60 m_scalingTable = rdbSvc->getRecordsetPtr("SctMatScaling", indetVersionKey.tag(), indetVersionKey.node());
61 msg(MSG::DEBUG) << "Table SctMatScaling Fetched" << endmsg;
62
63 // Default conditions
64 m_conditions = rdbSvc->getRecordsetPtr("SctConditions", versionTag, versionNode);
65 msg(MSG::DEBUG) << "Table SctConditions Fetched" << endmsg;
66
67 //
68 // SCT Barrel
69 //
70 m_brlSensor = rdbSvc->getRecordsetPtr("SctBrlSensor", versionTag, versionNode);
71 msg(MSG::DEBUG) << "Table SctBrlSensor Fetched" << endmsg;
72
73 m_brlModule = rdbSvc->getRecordsetPtr("SctBrlModule", versionTag, versionNode);
74 msg(MSG::DEBUG) << "Table SctBrlModule Fetched" << endmsg;
75
76 m_brlSki = rdbSvc->getRecordsetPtr("SctBrlSki", versionTag, versionNode);
77 msg(MSG::DEBUG) << "Table SctBrlSki Fetched" << endmsg;
78
79 m_brlSkiZ = rdbSvc->getRecordsetPtr("SctBrlSkiZ", versionTag, versionNode);
80 msg(MSG::DEBUG) << "Table SctBrlSkiZ Fetched" << endmsg;
81
82 m_brlLayer = rdbSvc->getRecordsetPtr("SctBrlLayer", versionTag, versionNode);
83 msg(MSG::DEBUG) << "Table SctBrlLayer Fetched" << endmsg;
84
85 m_brlServices = rdbSvc->getRecordsetPtr("SctBrlServices", versionTag, versionNode);
86 msg(MSG::DEBUG) << "Table SctBrlServices Fetched" << endmsg;
87
88 m_brlServPerLayer = rdbSvc->getRecordsetPtr("SctBrlServPerLayer", versionTag, versionNode);
89 msg(MSG::DEBUG) << "Table SctBrlServPerLayer Fetched" << endmsg;
90
91 m_brlThermalShield = rdbSvc->getRecordsetPtr("SctBrlThermalShield", versionTag, versionNode);
92 msg(MSG::DEBUG) << "Table SctBrlThermalShield Fetched" << endmsg;
93
94 m_brlGeneral = rdbSvc->getRecordsetPtr("SctBrlGeneral", versionTag, versionNode);
95 msg(MSG::DEBUG) << "Table SctBrlGeneral Fetched" << endmsg;
96
97 m_brlFSI = rdbSvc->getRecordsetPtr("SctBrlFSI", versionTag, versionNode);
98 msg(MSG::DEBUG) << "Table SctBrlFSI Fetched" << endmsg;
99
100 m_brlFSILocation = rdbSvc->getRecordsetPtr("SctBrlFSILocation", versionTag, versionNode);
101 msg(MSG::DEBUG) << "Table SctBrlFSILocation Fetched" << endmsg;
102
103 m_fwdSensor = rdbSvc->getRecordsetPtr("SctFwdSensor", versionTag, versionNode);
104 msg(MSG::DEBUG) << "Table SctFwdSensor Fetched" << endmsg;
105
106 m_fwdHybrid = rdbSvc->getRecordsetPtr("SctFwdHybrid", versionTag, versionNode);
107 msg(MSG::DEBUG) << "Table SctFwdHybrid Fetched" << endmsg;
108
109 m_fwdSpine = rdbSvc->getRecordsetPtr("SctFwdSpine", versionTag, versionNode);
110 msg(MSG::DEBUG) << "Table SctFwdSpine Fetched" << endmsg;
111
112 m_fwdModule = rdbSvc->getRecordsetPtr("SctFwdModule", versionTag, versionNode);
113 msg(MSG::DEBUG) << "Table SctFwdModule Fetched" << endmsg;
114
115 m_fwdModuleConnector = rdbSvc->getRecordsetPtr("SctFwdModuleConnector", versionTag, versionNode);
116 msg(MSG::DEBUG) << "Table SctFwdModuleConnector Fetched" << endmsg;
117
118 //
119 // SCT Forward
120 //
121 m_fwdRing = rdbSvc->getRecordsetPtr("SctFwdRing", versionTag, versionNode);
122 msg(MSG::DEBUG) << "Table SctFwdRing Fetched" << endmsg;
123
124 m_fwdWheel = rdbSvc->getRecordsetPtr("SctFwdWheel", versionTag, versionNode);
125 msg(MSG::DEBUG) << "Table SctFwdWheel Fetched" << endmsg;
126
127 m_fwdWheelRingMap = rdbSvc->getRecordsetPtr("SctFwdWheelRingMap", versionTag, versionNode);
128 msg(MSG::DEBUG) << "Table SctFwdWheelRingMap Fetched" << endmsg;
129
130 m_fwdDiscSupport = rdbSvc->getRecordsetPtr("SctFwdDiscSupport", versionTag, versionNode);
131 msg(MSG::DEBUG) << "Table SctFwdDiscSupport Fetched" << endmsg;
132
133 m_fwdPatchPanelLoc = rdbSvc->getRecordsetPtr("SctFwdPatchPanelLoc", versionTag, versionNode);
134 msg(MSG::DEBUG) << "Table SctFwdPatchPanelLoc Fetched" << endmsg;
135
136 m_fwdPatchPanel = rdbSvc->getRecordsetPtr("SctFwdPatchPanel", versionTag, versionNode);
137 msg(MSG::DEBUG) << "Table SctFwdPatchPanel Fetched" << endmsg;
138
139 m_fwdPPConnector = rdbSvc->getRecordsetPtr("SctFwdPPConnector", versionTag, versionNode);
140 msg(MSG::DEBUG) << "Table SctFwdPPConnector Fetched" << endmsg;
141
142 m_fwdPPCooling = rdbSvc->getRecordsetPtr("SctFwdPPCooling", versionTag, versionNode);
143 msg(MSG::DEBUG) << "Table SctFwdPPCooling Fetched" << endmsg;
144
145 m_fwdCoolingBlock = rdbSvc->getRecordsetPtr("SctFwdCoolingBlock", versionTag, versionNode);
146 msg(MSG::DEBUG) << "Table SctFwdCoolingBlock Fetched" << endmsg;
147
148 m_fwdRingServices = rdbSvc->getRecordsetPtr("SctFwdRingServices", versionTag, versionNode);
149 msg(MSG::DEBUG) << "Table SctFwdRingServices Fetched" << endmsg;
150
151 m_fwdServices = rdbSvc->getRecordsetPtr("SctFwdServices", versionTag, versionNode);
152 msg(MSG::DEBUG) << "Table SctFwdServices Fetched" << endmsg;
153
154 m_fwdFSILocation = rdbSvc->getRecordsetPtr("SctFwdFSILocation", versionTag, versionNode);
155 msg(MSG::DEBUG) << "Table SctFwdFSILocation Fetched" << endmsg;
156
157 m_fwdFSIType = rdbSvc->getRecordsetPtr("SctFwdFSIType", versionTag, versionNode);
158 msg(MSG::DEBUG) << "Table SctFwdFSIType Fetched" << endmsg;
159
160 m_fwdFSI = rdbSvc->getRecordsetPtr("SctFwdFSI", versionTag, versionNode);
161 msg(MSG::DEBUG) << "Table SctFwdFSI Fetched" << endmsg;
162
163 m_fwdThermalShield = rdbSvc->getRecordsetPtr("SctFwdThermalShield", versionTag, versionNode);
164 msg(MSG::DEBUG) << "Table SctFwdThermalShield Fetched" << endmsg;
165
166 m_fwdGeneral = rdbSvc->getRecordsetPtr("SctFwdGeneral", versionTag, versionNode);
167 msg(MSG::DEBUG) << "Table SctFwdGeneral Fetched" << endmsg;
168
169 m_fwdOptoHarness = rdbSvc->getRecordsetPtr("SctFwdOptoHarness", versionTag, versionNode);
170 msg(MSG::DEBUG) << "Table SctFwdOptoHarness Fetched" << endmsg;
171
172 m_fwdDiscFixation = rdbSvc->getRecordsetPtr("SctFwdDiscFixation", versionTag, versionNode);
173 msg(MSG::DEBUG) << "Table SctFwdDiscFixation Fetched" << endmsg;
174
175 m_fwdCylServ = rdbSvc->getRecordsetPtr("SctFwdCylServ", versionTag, versionNode);
176 msg(MSG::DEBUG) << "Table SctFwdCyServ Fetched" << endmsg;
177
178 m_fwdCylServLoc = rdbSvc->getRecordsetPtr("SctFwdCylServLoc", versionTag, versionNode);
179 msg(MSG::DEBUG) << "Table SctFwdCylServLoc Fetched" << endmsg;
180
181
182}
183
185
187
189
190//const IRDBRecord* SCT_DataBase::atls() const {return *m_atls)[0];}
192
195
196const IRDBRecord* SCT_DataBase::brlSensor() const {return (*m_brlSensor)[0];}
197const IRDBRecord* SCT_DataBase::brlModule() const {return (*m_brlModule)[0];}
198
199const IRDBRecord* SCT_DataBase::brlSki() const {return (*m_brlSki)[0];}
200const IRDBRecord* SCT_DataBase::brlSkiZ(int i) const {return (*m_brlSkiZ)[i];}
201int SCT_DataBase::brlSkiZSize() const {return m_brlSkiZ->size();}
202const IRDBRecord* SCT_DataBase::brlLayer(int i) const {return (*m_brlLayer)[i];}
207const IRDBRecord* SCT_DataBase::brlFSI() const {return (*m_brlFSI)[0];}
208int SCT_DataBase::brlFSISize() const {return m_brlFSI->size();}
210
211const IRDBRecord* SCT_DataBase::fwdSensor(int i) const {return (*m_fwdSensor)[i];}
212const IRDBRecord* SCT_DataBase::fwdHybrid() const {return (*m_fwdHybrid)[0];}
213const IRDBRecord* SCT_DataBase::fwdSpine(int i) const {return (*m_fwdSpine)[i];}
214const IRDBRecord* SCT_DataBase::fwdModule(int i) const {return (*m_fwdModule)[i];}
215int SCT_DataBase::fwdModuleSize() const {return m_fwdModule->size();}
218
219const IRDBRecord* SCT_DataBase::fwdRing(int i) const {return (*m_fwdRing)[i];}
220int SCT_DataBase::fwdRingSize() const {return m_fwdRing->size();}
221const IRDBRecord* SCT_DataBase::fwdWheel(int i) const {return (*m_fwdWheel)[i];}
227const IRDBRecord* SCT_DataBase::fwdPatchPanel(int i) const {return (*m_fwdPatchPanel)[i];}
238const IRDBRecord* SCT_DataBase::fwdFSIType(int i) const {return (*m_fwdFSIType)[i];}
239int SCT_DataBase::fwdFSITypeSize() const {return m_fwdFSIType->size();}
240const IRDBRecord* SCT_DataBase::fwdFSI(int i) const {return (*m_fwdFSI)[i];}
241int SCT_DataBase::fwdFSISize() const {return m_fwdFSI->size();}
249const IRDBRecord* SCT_DataBase::fwdCylServ(int i) const {return (*m_fwdCylServ)[i];}
250int SCT_DataBase::fwdCylServSize() const {return m_fwdCylServ->size();}
251const IRDBRecord* SCT_DataBase::fwdCylServLoc(int i) const {return (*m_fwdCylServLoc)[i];}
253
254const std::string & SCT_DataBase::versionTag() const {
255 return m_sctVersionTag;
256}
257
258MsgStream& SCT_DataBase::msg (MSG::Level lvl) const
259{
260 return m_athenaComps->msg(lvl);
261}
#define endmsg
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
const std::string & tag() const
Return version tag.
const std::string & node() const
Return the version node.
virtual const std::string & getParamSvcName() const =0
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
virtual std::string getChildTag(const std::string &childNode, const std::string &parentTag, const std::string &parentNode, const std::string &connName="ATLASDD")=0
Gets the tag name for the node by giving its parent node tag.
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
IRDBRecord is one record in the IRDBRecordset object.
Definition IRDBRecord.h:27
const IRDBRecord * brlServices() const
const IRDBRecord * fwdPPCooling() const
IRDBRecordset_ptr m_fwdSensor
int fwdFSILocationSize() const
IRDBRecordset_ptr m_brlServPerLayer
IRDBRecordset_ptr weightTable() const
IRDBRecordset_ptr m_fwdHybrid
IRDBRecordset_ptr m_fwdGeneral
IRDBRecordset_ptr fwdDiscFixationTable() const
IRDBRecordset_ptr m_brlFSILocation
IRDBRecordset_ptr m_brlThermalShield
const IRDBRecord * conditions() const
const IRDBRecord * brlLayer(int i) const
IRDBRecordset_ptr m_brlFSI
MsgStream & msg(MSG::Level lvl) const
SCT_GeoModelAthenaComps * m_athenaComps
IRDBRecordset_ptr m_fwdCoolingBlock
IRDBRecordset_ptr scalingTable() const
int fwdFSITypeSize() const
const IRDBRecord * fwdPatchPanel(int i) const
IRDBRecordset_ptr m_fwdRing
IRDBRecordset_ptr m_fwdModule
int fwdPatchPanelSize() const
IRDBRecordset_ptr fwdOptoHarnessTable() const
IRDBRecordset_ptr m_fwdPatchPanel
int fwdPPCoolingSize() const
IRDBRecordset_ptr topLevelTable() const
IRDBRecordset_ptr m_fwdOptoHarness
const IRDBRecord * fwdDiscFixation() const
IRDBRecordset_ptr m_brlModule
int fwdModuleSize() const
const IRDBRecord * fwdSensor(int i) const
int fwdFSISize() const
const IRDBRecord * fwdThermalShield(int i) const
const IRDBRecord * fwdFSILocation(int i) const
int fwdThermalShieldSize() const
IRDBRecordset_ptr m_fwdSpine
IRDBRecordset_ptr m_brlSensor
IRDBRecordset_ptr m_fwdPPConnector
IRDBRecordset_ptr m_fwdWheel
IRDBRecordset_ptr m_fwdRingServices
IRDBRecordset_ptr m_fwdPPCooling
IRDBRecordset_ptr m_brlSki
IRDBRecordset_ptr m_fwdFSIType
const IRDBRecord * fwdModule(int i) const
const IRDBRecord * fwdCylServ(int i) const
IRDBRecordset_ptr m_fwdDiscSupport
int brlSkiZSize() const
const IRDBRecord * fwdRingServices(int i) const
const IRDBRecord * fwdModuleConnector() const
IRDBRecordset_ptr m_brlGeneral
const IRDBRecord * brlFSI() const
const IRDBRecord * brlSensor() const
const IRDBRecord * fwdRing(int i) const
std::string m_sctVersionTag
int brlFSISize() const
IRDBRecordset_ptr m_weightTable
IRDBRecordset_ptr m_fwdFSILocation
const IRDBRecord * fwdSpine(int i) const
const std::string & versionTag() const
IRDBRecordset_ptr m_fwdPatchPanelLoc
int fwdPatchPanelLocSize() const
int fwdWheelRingMapSize() const
IRDBRecordset_ptr m_fwdServices
int fwdCylServSize() const
IRDBRecordset_ptr m_fwdModuleConnector
const IRDBRecord * brlModule() const
const IRDBRecord * fwdCoolingBlock(int i) const
IRDBRecordset_ptr m_topLevel
const IRDBRecord * fwdHybrid() const
IRDBRecordset_ptr m_scalingTable
const IRDBRecord * brlSki() const
int fwdPPConnectorSize() const
const IRDBRecord * fwdDiscSupport() const
IRDBRecordset_ptr m_brlSkiZ
IRDBRecordset_ptr m_fwdCylServ
const IRDBRecord * brlGeneral() const
const IRDBRecord * fwdCylServLoc(int i) const
SCT_DataBase(SCT_GeoModelAthenaComps *athenaComps)
IRDBRecordset_ptr fwdModuleConnectorTable() const
const IRDBRecord * brlFSILocation(int i) const
const IRDBRecord * fwdPPConnector() const
const IRDBRecord * fwdWheelRingMap(int i) const
IRDBRecordset_ptr m_conditions
const IRDBRecord * brlSkiZ(int i) const
IRDBRecordset_ptr m_fwdDiscFixation
IRDBRecordset_ptr m_fwdWheelRingMap
IRDBRecordset_ptr m_brlLayer
const IRDBRecord * fwdWheel(int i) const
const IRDBRecord * fwdGeneral() const
const IRDBRecord * brlServPerLayer(int i) const
const IRDBRecord * fwdFSIType(int i) const
const IRDBRecord * fwdFSI(int i) const
const IRDBRecord * brlThermalShield() const
const IRDBRecord * fwdServices() const
IRDBRecordset_ptr m_fwdFSI
IRDBRecordset_ptr conditionsTable() const
int fwdCylServLocSize() const
IRDBRecordset_ptr m_brlServices
const IRDBRecord * fwdPatchPanelLoc(int i) const
IRDBRecordset_ptr m_fwdThermalShield
IRDBRecordset_ptr m_fwdCylServLoc
SCT_GeoModelAthenaComps * athenaComps()
int fwdRingSize() const
const IRDBRecord * fwdOptoHarness(int i) const
Class to hold various Athena components.
MsgStream & msg
Definition testRead.cxx:32