7 #include "GaudiKernel/SystemOfUnits.h"
27 const std::map<std::string, std::string>& asciiFileDBMap):
29 m_geoTag(geoTag), m_geoNode(geoNode), m_pRDBAccess(pRDBAccess) {
30 m_SCdbaccess = StatusCode::FAILURE;
33 ATH_MSG_INFO(
"Start retriving dbObjects with tag = <" << geoTag <<
"> node <" << geoNode <<
">");
36 m_dhatyp = std::make_unique<DblQ00Atyp>(m_pRDBAccess, geoTag, geoNode);
37 m_atyp = m_dhatyp->data();
40 m_dhasmp = std::make_unique<DblQ00Asmp>(m_pRDBAccess, geoTag, geoNode);
41 m_asmp = m_dhasmp->data();
44 m_dhalmn = std::make_unique<DblQ00Almn>(m_pRDBAccess, geoTag, geoNode);
45 m_almn = m_dhalmn->data();
48 m_dhaptp = std::make_unique<DblQ00Aptp>(m_pRDBAccess, geoTag, geoNode);
49 m_aptp = m_dhaptp->data();
52 m_dhacut = std::make_unique<DblQ00Acut>(m_pRDBAccess, geoTag, geoNode);
53 m_acut = m_dhacut->data();
55 m_dhalin = std::make_unique<DblQ00Alin>(m_pRDBAccess, geoTag, geoNode);
56 m_alin = m_dhalin->data();
58 m_dhdbam = std::make_unique<DblQ00Dbam>(m_pRDBAccess, geoTag, geoNode);
59 m_dbam = m_dhdbam->data();
62 m_dhwrpc = std::make_unique<DblQ00Awln>(m_pRDBAccess, geoTag, geoNode);
63 m_wrpc = m_dhwrpc->data();
65 m_dhwtgc = std::make_unique<DblQ00Atln>(m_pRDBAccess, geoTag, geoNode);
66 m_wtgc = m_dhwtgc->data();
68 m_dhwmdt = std::make_unique<DblQ00Wmdt>(m_pRDBAccess, geoTag, geoNode);
69 m_wmdt = m_dhwmdt->data();
71 m_dhwcsc = std::make_unique<DblQ00Wcsc>(m_pRDBAccess, geoTag, geoNode);
72 m_wcsc = m_dhwcsc->data();
75 m_dhwrpcall = std::make_unique<DblQ00Wrpc>(m_pRDBAccess, geoTag, geoNode);
76 m_wrpcall = m_dhwrpcall->data();
78 m_dhwtgcall = std::make_unique<DblQ00Wtgc>(m_pRDBAccess, geoTag, geoNode);
79 m_wtgcall = m_dhwtgcall->data();
81 m_dhwspa = std::make_unique<DblQ00Wspa>(m_pRDBAccess, geoTag, geoNode);
82 m_wspa = m_dhwspa->data();
85 m_dhwded = std::make_unique<DblQ00Wded>(m_pRDBAccess, geoTag, geoNode);
86 m_wded = m_dhwded->data();
89 m_dhwsup = std::make_unique<DblQ00Wsup>(m_pRDBAccess, geoTag, geoNode);
90 m_wsup = m_dhwsup->data();
92 if (m_pRDBAccess->getRecordsetPtr(
"XtomoData", geoTag, geoNode)->size()!=0) {
93 m_dhxtomo= std::make_unique<DblQ00Xtomo>(pRDBAccess, geoTag, geoNode);
96 m_dhxtomo= std::make_unique<DblQ00Xtomo>();
101 m_xtomo = m_dhxtomo->data();
104 if (asciiFileDBMap.find(
"ASZT") != asciiFileDBMap.end()) {
105 ATH_MSG_INFO(
"getting aszt from ascii file - named <" << asciiFileDBMap.find(
"ASZT")->second <<
">");
106 ATH_MSG_INFO(
"Ascii aszt input has priority over A-lines in ORACLE; A-lines from Oracle will not be read");
108 m_dhaszt = std::make_unique<DblQ00Aszt>(asciiFileDBMap.find(
"ASZT")->second);
109 if (m_dhaszt->size() == 0) {
112 ATH_MSG_INFO(
"N. of lines read = " << m_dhaszt->size());
116 if (!m_dhaszt || m_dhaszt->size() == 0) {
117 ATH_MSG_INFO(
"No Ascii aszt input found: looking for A-lines in ORACLE");
118 if (m_pRDBAccess->getRecordsetPtr(
"ASZT",geoTag,geoNode)->size()==0) {
119 m_dhaszt = std::make_unique<DblQ00Aszt>();
123 m_dhaszt = std::make_unique<DblQ00Aszt>(m_pRDBAccess, geoTag, geoNode);
127 ATH_MSG_INFO(
"ASZT table in Oracle, if any, will not be read" );
130 m_aszt = m_dhaszt->data();
133 if (asciiFileDBMap.find(
"IACSC") != asciiFileDBMap.end()) {
135 ATH_MSG_INFO(
"getting iacsc from ascii file - named <" << asciiFileDBMap.find(
"IACSC")->second <<
">" );
136 ATH_MSG_INFO(
"Ascii iacsc input has priority over A-lines in ORACLE; A-lines from Oracle will not be read" );
138 m_dhiacsc = std::make_unique<DblQ00IAcsc>(asciiFileDBMap.find(
"IACSC")->second);
139 if (m_dhiacsc->size() == 0) {
142 ATH_MSG_INFO(
"N. of lines read = " << m_dhiacsc->size() );
145 if (!m_dhiacsc || m_dhiacsc->size() == 0) {
146 ATH_MSG_INFO(
"No Ascii iacsc input found: looking for A-lines in ORACLE" );
147 if (m_pRDBAccess->getRecordsetPtr(
"IZST", geoTag,geoNode)->size()==0) {
148 m_dhiacsc = std::make_unique<DblQ00IAcsc>();
152 m_dhiacsc = std::make_unique<DblQ00IAcsc>(m_pRDBAccess, geoTag, geoNode);
155 ATH_MSG_INFO(
"ISZT table in Oracle, if any, will not be read" );
158 m_iacsc = m_dhiacsc->data();
161 m_dhwchv = std::make_unique<DblQ00Wchv>(m_pRDBAccess, geoTag, geoNode);
162 m_wchv = m_dhwchv->data();
164 m_dhwcro = std::make_unique<DblQ00Wcro>(m_pRDBAccess, geoTag, geoNode);
165 m_wcro = m_dhwcro->data();
167 m_dhwcmi = std::make_unique<DblQ00Wcmi>(m_pRDBAccess, geoTag, geoNode);
168 m_wcmi = m_dhwcmi->data();
171 m_dhwlbi = std::make_unique<DblQ00Wlbi>(m_pRDBAccess, geoTag, geoNode);
172 m_wlbi = m_dhwlbi->data();
175 m_SCdbaccess = StatusCode::SUCCESS;
176 ATH_MSG_INFO(
"Access granted for all dbObjects needed by muon detectors" );
217 ATH_MSG_INFO(
"Intermediate Objects built from primary numbers" );
224 std::vector<std::string> slist;
225 slist.emplace_back(
"*");
233 Station *station = (*it).second;
238 const std::string &cname =
c->name;
240 if (cname.compare(0, 3,
"CSC") == 0)
242 else if (cname.compare(0, 3,
"MDT") == 0)
244 else if (cname.compare(0, 3,
"RPC") == 0)
246 else if (cname.compare(0, 3,
"TGC") == 0)
248 else if (cname.compare(0, 3,
"SPA") == 0)
250 else if (cname.compare(0, 3,
"DED") == 0)
252 else if (cname.compare(0, 3,
"SUP") == 0)
254 else if (cname.compare(0, 3,
"CHV") == 0 && have_spa_details)
256 else if (cname.compare(0, 3,
"CRO") == 0 && have_spa_details)
258 else if (cname.compare(0, 3,
"CMI") == 0 && have_spa_details)
260 else if (cname.compare(0, 2,
"LB") == 0 && have_spa_details)
265 ATH_MSG_INFO(
"nMDT " << nmdt <<
" nCSC " << ncsc <<
" nTGC " << ntgc <<
" nRPC " << nrpc );
266 ATH_MSG_INFO(
"nDED " << nded <<
" nSUP " << nsup <<
" nSPA " << nspa );
267 ATH_MSG_INFO(
"nCHV " << nchv <<
" nCRO " << ncro <<
" nCMI " << ncmi <<
" nLBI " << nlbi );
277 float wirespacing(0);
278 unsigned int gglnSize(0);
280 gglnSize = ggln->size();
282 ATH_MSG_WARNING(
" ProcessTGCreadout - IRDBRecordset_ptr GGLN is nullptr" );
289 ATH_MSG_INFO(
" ProcessTGCreadout - version " <<
version <<
" wirespacing " << wirespacing );
292 for (
unsigned int ich = 0; ich < gglnSize; ++ich) {
293 int type = (
int)(*ggln)[ich]->getInt(
"JSTA");
309 std::vector<StripArray> slarge{make_array<double, MaxNStrips>(0)};
310 std::vector<StripArray> sshort{make_array<double, MaxNStrips>(0)};
312 for (
int i = 0;
i < 3;
i++) {
313 nwgs[
i] = (*ggln)[ich]->getInt(
"NWGS",
i );
314 nsps[
i] = (*ggln)[ich]->getInt(
"NSPS",
i);
316 for (
int i = 0;
i < nwgs[0];
i++) {
317 iwgs1[
i] = (*ggln)[ich]->getInt(
"IWGS1",
i);
320 for (
int i = 0;
i < nwgs[1];
i++) {
321 iwgs2[
i] = (*ggln)[ich]->getInt(
"IWGS2",
i);
323 for (
int i = 0;
i < nwgs[2];
i++) {
324 iwgs3[
i] = (*ggln)[ich]->getInt(
"IWGS3",
i);
328 float pdist = (*ggln)[ich]->getFloat(
"PDIST");
330 for (
int i = 0;
i < nsps[0] + 1;
i++) {
331 slarge[0][
i] = (*ggln)[ich]->getFloat(
"SLARGE",
i);
332 sshort[0][
i] = (*ggln)[ich]->getFloat(
"SHORT",
i);
335 std::make_unique<TgcReadoutParams>(
name,
type, wirespacing, nchrng,
347 std::ostringstream Astr;
349 Astr <<
"0" << ich + 1;
353 std::string
A = Astr.str();
363 tgc->
pitchButton[0] = (*ggln)[ich]->getFloat(
"SP2BU");
364 tgc->
pitchButton[1] = (*ggln)[ich]->getFloat(
"SP3BU");
404 if (ichtyp < 1 || ichtyp > 19) {
405 ATH_MSG_ERROR(
" DBReader::TGCreadoutName - ichtype " << ichtyp <<
" out of range 1-19" );
445 if (ichtyp < 1 || ichtyp > 21) {
446 ATH_MSG_ERROR(
" DBReader::TGCreadoutName - ichtype " << ichtyp <<
" out of range 1-21" );