ATLAS Offline Software
Loading...
Searching...
No Matches
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
14
15
16#include <iostream>
17#include <sstream>
18#include <stdio.h>
19#include <stdexcept>
20
21namespace 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
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
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.
virtual unsigned int size() const =0
std::vector< WTGC > m_d
Definition DblQ00Wtgc.h:51
unsigned int m_nObj
Definition DblQ00Wtgc.h:52
std::string getName() const
Definition DblQ00Wtgc.h:46
DblQ00Wtgc()=default
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27