ATLAS Offline Software
MuonSpectrometer
MuonDetDescr
MuonGMdbObjects
src
DblQ00Wtgc.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/DblQ00Wtgc.h
"
11
#include "
RDBAccessSvc/IRDBRecordset.h
"
12
#include "
RDBAccessSvc/IRDBAccessSvc.h
"
13
#include "
RDBAccessSvc/IRDBRecord.h
"
14
15
16
#include <iostream>
17
#include <sstream>
18
#include <stdio.h>
19
#include <stdexcept>
20
21
namespace
MuonGM
22
{
23
24
DblQ00Wtgc::DblQ00Wtgc
(
IRDBAccessSvc
*pAccessSvc,
const
std::string & GeoTag,
const
std::string & GeoNode){
25
26
27
IRDBRecordset_ptr
wtgc = pAccessSvc->
getRecordsetPtr
(
getName
(),GeoTag, GeoNode);
28
29
if
(wtgc->size()>0) {
30
m_nObj
= wtgc->size();
31
m_d
.resize (
m_nObj
);
32
if
(
m_nObj
== 0) std::cerr<<
"NO Wtgc banks in the MuonDD Database"
<<std::endl;
33
34
for
(
size_t
i
=0;
i
<wtgc->size(); ++
i
) {
35
m_d
[
i
].version = (*wtgc)[
i
]->getInt(
"VERS"
);
36
m_d
[
i
].jsta = (*wtgc)[
i
]->getInt(
"JSTA"
);
37
m_d
[
i
].nbevol = (*wtgc)[
i
]->getInt(
"NBEVOL"
);
38
m_d
[
i
].x0 = (*wtgc)[
i
]->getFloat(
"X0"
);
39
m_d
[
i
].widchb = (*wtgc)[
i
]->getFloat(
"WIDCHB"
);
40
m_d
[
i
].fwirch = (*wtgc)[
i
]->getFloat(
"FWIRCH"
);
41
m_d
[
i
].fwixch = (*wtgc)[
i
]->getFloat(
"FWIXCH"
);
42
for
(
unsigned
int
j=0; j<9; j++) {
43
44
try
{
45
m_d
[
i
].allname[j] = (*wtgc)[
i
]->getString(
"ALLNAME_"
+
std::to_string
(j));
46
}
catch
(
const
std::runtime_error&) {
47
break
;
48
}
49
}
50
}
51
}
52
else
{
53
std::cerr<<
"NO Wtgc banks in the MuonDD Database"
<<std::endl;
54
}
55
}
56
57
58
59
}
// end of namespace MuonGM
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition:
GeoMuonHits.h:27
IRDBAccessSvc::getRecordsetPtr
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.
DblQ00Wtgc.h
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
lumiFormat.i
int i
Definition:
lumiFormat.py:85
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition:
IRDBAccessSvc.h:42
MuonGM::DblQ00Wtgc::m_d
std::vector< WTGC > m_d
Definition:
DblQ00Wtgc.h:51
MuonGM::DblQ00Wtgc::DblQ00Wtgc
DblQ00Wtgc()=default
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition:
IRDBAccessSvc.h:25
MuonGM::DblQ00Wtgc::getName
std::string getName() const
Definition:
DblQ00Wtgc.h:46
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition:
GeometryDefs.h:34
MuonGM::DblQ00Wtgc::m_nObj
unsigned int m_nObj
Definition:
DblQ00Wtgc.h:52
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.
Generated on Sun Dec 22 2024 21:09:16 for ATLAS Offline Software by
1.8.18