ATLAS Offline Software
DblQ00Wsup.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 #include <iostream>
15 #include <sstream>
16 
17 namespace MuonGM
18 {
19 
20  DblQ00Wsup::DblQ00Wsup(IRDBAccessSvc *pAccessSvc, const std::string & GeoTag, const std::string & GeoNode) {
21 
22  IRDBRecordset_ptr wsup = pAccessSvc->getRecordsetPtr(getName(),GeoTag, GeoNode);
23 
24  if(wsup->size()>0) {
25  m_nObj = wsup->size();
26  m_d.resize (m_nObj);
27  if (m_nObj == 0) std::cerr<<"NO Wsup banks in the MuonDD Database"<<std::endl;
28 
29  for(size_t i=0 ; i<wsup->size(); ++i) {
30  m_d[i].version = (*wsup)[i]->getInt("VERS");
31  m_d[i].jsta = (*wsup)[i]->getInt("JSTA");
32  m_d[i].nxxsup = (*wsup)[i]->getInt("NXXSUP");
33  m_d[i].nzzsup = (*wsup)[i]->getInt("NZZSUP");
34  m_d[i].x0 = (*wsup)[i]->getFloat("X0");
35  m_d[i].thickn = (*wsup)[i]->getFloat("THICKN");
36  for (unsigned int j=0; j<4; ++j){
37  m_d[i].xxsup[j] = (*wsup)[i]->getFloat("XXSUP_"+std::to_string(j));
38  m_d[i].zzsup[j] = (*wsup)[i]->getFloat("ZZSUP_"+std::to_string(j));
39  }
40  }
41  }
42  else {
43  std::cerr<<"NO Wsup banks in the MuonDD Database"<<std::endl;
44  }
45 }
46 
47 } // 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::DblQ00Wsup::m_d
std::vector< WSUP > m_d
Definition: DblQ00Wsup.h:51
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
MuonGM::DblQ00Wsup::m_nObj
unsigned int m_nObj
Definition: DblQ00Wsup.h:52
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
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
MuonGM::DblQ00Wsup::DblQ00Wsup
DblQ00Wsup()=default
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
MuonGM::DblQ00Wsup::getName
std::string getName() const
Definition: DblQ00Wsup.h:46
DblQ00Wsup.h
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.