ATLAS Offline Software
DblQ00Wlbi.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 
11 #include "RelationalAccess/ICursor.h"
12 #include "CoralBase/AttributeList.h"
13 #include "CoralBase/Attribute.h"
17 
18 
19 #include <iostream>
20 #include <sstream>
21 #include <stdexcept>
22 #include <limits>
23 
24 namespace MuonGM
25 {
26 
27  DblQ00Wlbi::DblQ00Wlbi(IRDBAccessSvc *pAccessSvc, const std::string & GeoTag, const std::string & GeoNode) {
28 
29  IRDBRecordset_ptr wlbi = pAccessSvc->getRecordsetPtr(getName(),GeoTag, GeoNode);
30 
31  if(wlbi->size()>0) {
32  m_nObj = wlbi->size();
33  m_d.resize (m_nObj);
34  if (m_nObj == 0) std::cerr<<"NO Wlbi banks in the MuonDD Database"<<std::endl;
35 
36  for(size_t i =0;i<wlbi->size(); ++i) {
37  m_d[i].version = (*wlbi)[i]->getInt("VERS");
38  m_d[i].jsta = (*wlbi)[i]->getInt("JSTA");
39  m_d[i].num = (*wlbi)[i]->getInt("NUM");
40  m_d[i].height = (*wlbi)[i]->getFloat("HEIGHT");
41  m_d[i].thickness = (*wlbi)[i]->getFloat("THICKNESS");
42  try{
43  m_d[i].lowerThickness = (*wlbi)[i]->getFloat("LOWERTHICK");
44  } catch (const std::runtime_error &) {
45  m_d[i].lowerThickness = m_d[i].thickness ;
46  }
47  try {
48  m_d[i].yShift = (*wlbi)[i]->getFloat("SHIFTYSTATION");
49  } catch(const std::runtime_error &) {
50  m_d[i].yShift = 0.;
51  }
52  }
53  }
54  else {
55  std::cerr<<"NO Wlbi banks in the MuonDD Database"<<std::endl;
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.
MuonGM::DblQ00Wlbi::getName
std::string getName() const
Definition: DblQ00Wlbi.h:45
MuonGM::DblQ00Wlbi::m_d
std::vector< WLBI > m_d
Definition: DblQ00Wlbi.h:50
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::DblQ00Wlbi::m_nObj
unsigned int m_nObj
Definition: DblQ00Wlbi.h:51
DblQ00Wlbi.h
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
MuonGM::DblQ00Wlbi::DblQ00Wlbi
DblQ00Wlbi()=default
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.