ATLAS Offline Software
DblQ00Wmdt.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 
20 namespace MuonGM
21 {
22 
23  DblQ00Wmdt::DblQ00Wmdt(IRDBAccessSvc *pAccessSvc, const std::string & GeoTag, const std::string & GeoNode){
24 
25  IRDBRecordset_ptr wmdt = pAccessSvc->getRecordsetPtr(getName(),GeoTag, GeoNode);
26 
27  if(wmdt->size()>0) {
28  m_nObj = wmdt->size();
29  m_d.resize (m_nObj);
30  if (m_nObj == 0) std::cerr<<"NO Wmdt banks in the MuonDD Database"<<std::endl;
31 
32  for(size_t i =0;i<wmdt->size(); ++i) {
33  m_d[i].version = (*wmdt)[i]->getInt("VERS");
34  m_d[i].iw = (*wmdt)[i]->getInt("IW");
35  m_d[i].laymdt = (*wmdt)[i]->getInt("LAYMDT");
36  m_d[i].typ = (*wmdt)[i]->getString("TYP");
37  m_d[i].x0 = (*wmdt)[i]->getFloat("X0");
38  m_d[i].tubpit = (*wmdt)[i]->getFloat("TUBPIT");
39  m_d[i].tubrad = (*wmdt)[i]->getFloat("TUBRAD");
40  m_d[i].tubsta = (*wmdt)[i]->getFloat("TUBSTA");
41  m_d[i].tubdea = (*wmdt)[i]->getFloat("TUBDEA");
42  m_d[i].tubwal = (*wmdt)[i]->getFloat("TUBWAL");
43  for (unsigned int j=0; j<4; j++) {
44  m_d[i].tubxco[j] = (*wmdt)[i]->getFloat("TUBXCO_"+std::to_string(j));
45  m_d[i].tubyco[j] = (*wmdt)[i]->getFloat("TUBYCO_"+std::to_string(j));
46  }
47  }
48  } else {
49  std::cerr<<"NO Wmdt banks in the MuonDD Database"<<std::endl;
50  }
51 }
52 
53 
54 } // 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::DblQ00Wmdt::m_nObj
unsigned int m_nObj
Definition: DblQ00Wmdt.h:57
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
MuonGM::DblQ00Wmdt::getName
std::string getName() const
Definition: DblQ00Wmdt.h:51
lumiFormat.i
int i
Definition: lumiFormat.py:92
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
MuonGM::DblQ00Wmdt::DblQ00Wmdt
DblQ00Wmdt()=default
MuonGM::DblQ00Wmdt::m_d
std::vector< WMDT > m_d
Definition: DblQ00Wmdt.h:56
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
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
DblQ00Wmdt.h
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.