ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDetDescr
MuonGMdbObjects
src
DblQ00Wcsc.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/***************************************************************************
6
DB data - Muon Station components
7
-----------------------------------------
8
***************************************************************************/
9
10
#include "
MuonGMdbObjects/DblQ00Wcsc.h
"
11
#include "
RDBAccessSvc/IRDBRecordset.h
"
12
#include "
RDBAccessSvc/IRDBAccessSvc.h
"
13
#include "
RDBAccessSvc/IRDBRecord.h
"
14
15
#include <iostream>
16
#include <sstream>
17
#include <stdexcept>
18
#include <limits>
19
20
namespace
MuonGM
21
{
22
23
DblQ00Wcsc::DblQ00Wcsc
(
IRDBAccessSvc
*pAccessSvc,
const
std::string & GeoTag,
const
std::string & GeoNode){
24
25
IRDBRecordset_ptr
wcsc = pAccessSvc->
getRecordsetPtr
(
getName
(),GeoTag, GeoNode);
26
27
if
(wcsc->
size
()>0) {
28
m_nObj
= wcsc->
size
();
29
m_d
.resize (
m_nObj
);
30
if
(
m_nObj
== 0) std::cerr<<
"NO Wcsc banks in the MuonDD Database"
<<std::endl;
31
32
for
(
size_t
i = 0; i<wcsc->
size
(); ++i) {
33
m_d
[i].version = (*wcsc)[i]->getInt(
"VERS"
);
34
m_d
[i].jsta = (*wcsc)[i]->getInt(
"JSTA"
);
35
m_d
[i].laycsc = (*wcsc)[i]->getInt(
"LAYCSC"
);
36
m_d
[i].ttotal = (*wcsc)[i]->getFloat(
"TTOTAL"
);
37
m_d
[i].tnomex = (*wcsc)[i]->getFloat(
"TNOMEX"
);
38
m_d
[i].tlag10 = (*wcsc)[i]->getFloat(
"TLAG10"
);
39
m_d
[i].wispa = (*wcsc)[i]->getFloat(
"WISPA"
);
40
m_d
[i].dancat = (*wcsc)[i]->getFloat(
"DANCAT"
);
41
m_d
[i].pcatre = (*wcsc)[i]->getFloat(
"PCATRE"
);
42
m_d
[i].gstrip = (*wcsc)[i]->getFloat(
"GSTRIP"
);
43
m_d
[i].wrestr = (*wcsc)[i]->getFloat(
"WRESTR"
);
44
m_d
[i].wflstr = (*wcsc)[i]->getFloat(
"WFLSTR"
);
45
m_d
[i].trrwas = (*wcsc)[i]->getFloat(
"TRRWAS"
);
46
m_d
[i].wroxa = (*wcsc)[i]->getFloat(
"WROXA"
);
47
m_d
[i].groxwi = (*wcsc)[i]->getFloat(
"GROXWI"
);
48
m_d
[i].wgasba = (*wcsc)[i]->getFloat(
"WGASBA"
);
49
m_d
[i].tgasba = (*wcsc)[i]->getFloat(
"TGASBA"
);
50
m_d
[i].wgascu = (*wcsc)[i]->getFloat(
"WGASCU"
);
51
m_d
[i].tgascu = (*wcsc)[i]->getFloat(
"TGASCU"
);
52
m_d
[i].wfixwi = (*wcsc)[i]->getFloat(
"WFIXWI"
);
53
m_d
[i].tfixwi = (*wcsc)[i]->getFloat(
"TFIXWI"
);
54
m_d
[i].pba1wi = (*wcsc)[i]->getFloat(
"PBA1WI"
);
55
m_d
[i].pba2wi = (*wcsc)[i]->getFloat(
"PBA2WI"
);
56
m_d
[i].pba3wi = (*wcsc)[i]->getFloat(
"PBA3WI"
);
57
m_d
[i].psndco = (*wcsc)[i]->getFloat(
"PSNDCO"
);
58
m_d
[i].azcat = 0.;
59
float
azcat = 0.;
60
try
{
61
azcat = (*wcsc)[i]->getFloat(
"AZCAT"
);
62
m_d
[i].azcat = azcat;
63
}
64
catch
(
const
std::runtime_error&) {
65
std::cerr<<
" azcat field does not exists !"
<<std::endl;
66
m_d
[i].azcat = 0.;
67
}
68
}
69
}
70
else
{
71
std::cerr<<
"NO Wcsc banks in the MuonDD Database"
<<std::endl;
72
}
73
}
74
75
76
}
// end of namespace MuonGM
DblQ00Wcsc.h
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition
IRDBAccessSvc.h:30
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition
IRDBAccessSvc.h:45
IRDBAccessSvc::getRecordsetPtr
virtual IRDBRecordset_ptr getRecordsetPtr(std::string_view node, std::string_view tag, std::string_view tag2node="", std::string_view connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
IRDBRecordset::size
virtual unsigned int size() const =0
MuonGM::DblQ00Wcsc::m_d
std::vector< WCSC > m_d
Definition
DblQ00Wcsc.h:67
MuonGM::DblQ00Wcsc::getName
std::string getName() const
Definition
DblQ00Wcsc.h:62
MuonGM::DblQ00Wcsc::m_nObj
unsigned int m_nObj
Definition
DblQ00Wcsc.h:68
MuonGM::DblQ00Wcsc::DblQ00Wcsc
DblQ00Wcsc()=default
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition
GeoMuonHits.h:27
Generated on
for ATLAS Offline Software by
1.17.0