ATLAS Offline Software
DblQ00Xtomo.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 #include <iostream>
16 
17 namespace MuonGM {
18  DblQ00Xtomo::DblQ00Xtomo(IRDBAccessSvc *pAccessSvc, const std::string & GeoTag, const std::string & GeoNode){
19 
20  IRDBRecordset_ptr xtomo = pAccessSvc->getRecordsetPtr(getName(),GeoTag, GeoNode);
21  if(xtomo->size()>0) {
22 
23 
24  m_nObj = xtomo->size();
25  m_d.resize(m_nObj);
26  if (m_nObj == 0) std::cerr << "No XtomoData entries in the MuonDD Database" << std::endl;
27 
28  for (size_t i =0 ; i<xtomo->size(); ++i) {
29  m_d[i].line = i;
30  m_d[i].XTOMOCHBERNAME = (*xtomo)[i]->getString("XTOMOCHBERNAME");
31  m_d[i].XTOMOSITE = (*xtomo)[i]->getString("XTOMOSITE");
32  m_d[i].XTOMOSITEID = (*xtomo)[i]->getInt("XTOMOSITEID");
33  m_d[i].XTOMOTIME = (*xtomo)[i]->getInt("XTOMOTIME");
34  m_d[i].XTOMOPASSED = (*xtomo)[i]->getInt("XTOMOPASSED");
35  m_d[i].XTOMOSIDE = (*xtomo)[i]->getString("XTOMOSIDE");
36  m_d[i].XTOMONBERTUBE1 = (*xtomo)[i]->getInt("XTOMONBERTUBE1");
37  m_d[i].XTOMONBERTUBE2 = (*xtomo)[i]->getInt("XTOMONBERTUBE2");
38  m_d[i].XTOMONBERML = (*xtomo)[i]->getInt("XTOMONBERML");
39  m_d[i].XTOMONBERLAYER = (*xtomo)[i]->getInt("XTOMONBERLAYER");
40  try {
41  m_d[i].XTOMOML1STAGG = (*xtomo)[i]->getInt("XTOMOML1STAGG");
42  } catch (const std::exception&) {} // ignore exception for now: field missing in MuonSpectrometer-R.06.01-tomotest
43  try {
44  m_d[i].XTOMOML2STAGG = (*xtomo)[i]->getInt("XTOMOML2STAGG");
45  } catch (const std::exception&) {} // ignore exception for now: field missing in MuonSpectrometer-R.06.01-tomotest
46  try {
47  m_d[i].XTOMOD1 = (*xtomo)[i]->getFloat("XTOMOD1");
48  } catch (const std::exception&) {} // ignore exception for now: field missing in MuonSpectrometer-R.06.01-tomotest
49  try {
50  m_d[i].XTOMONMEZ = (*xtomo)[i]->getInt("XTOMONMEZ");
51  } catch (const std::exception&) {} // ignore exception for now: field missing in MuonSpectrometer-R.06.01-tomotest
52  m_d[i].XTOMOML1NYTUB = (*xtomo)[i]->getFloat("XTOMOML1NYTUB");
53  m_d[i].XTOMOML1NZTUB = (*xtomo)[i]->getFloat("XTOMOML1NZTUB");
54  m_d[i].XTOMOML1NDELA = (*xtomo)[i]->getFloat("XTOMOML1NDELA");
55  m_d[i].XTOMOML1NYPIT = (*xtomo)[i]->getFloat("XTOMOML1NYPIT");
56  m_d[i].XTOMOML1NZPIT = (*xtomo)[i]->getFloat("XTOMOML1NZPIT");
57  m_d[i].XTOMOML1PYTUB = (*xtomo)[i]->getFloat("XTOMOML1PYTUB");
58  m_d[i].XTOMOML1PZTUB = (*xtomo)[i]->getFloat("XTOMOML1PZTUB");
59  m_d[i].XTOMOML1PDELA = (*xtomo)[i]->getFloat("XTOMOML1PDELA");
60  m_d[i].XTOMOML1PYPIT = (*xtomo)[i]->getFloat("XTOMOML1PYPIT");
61  m_d[i].XTOMOML1PZPIT = (*xtomo)[i]->getFloat("XTOMOML1PZPIT");
62  m_d[i].XTOMOML2NYTUB = (*xtomo)[i]->getFloat("XTOMOML2NYTUB");
63  m_d[i].XTOMOML2NZTUB = (*xtomo)[i]->getFloat("XTOMOML2NZTUB");
64  m_d[i].XTOMOML2NDELA = (*xtomo)[i]->getFloat("XTOMOML2NDELA");
65  m_d[i].XTOMOML2NYPIT = (*xtomo)[i]->getFloat("XTOMOML2NYPIT");
66  m_d[i].XTOMOML2NZPIT = (*xtomo)[i]->getFloat("XTOMOML2NZPIT");
67  m_d[i].XTOMOML2PYTUB = (*xtomo)[i]->getFloat("XTOMOML2PYTUB");
68  m_d[i].XTOMOML2PZTUB = (*xtomo)[i]->getFloat("XTOMOML2PZTUB");
69  m_d[i].XTOMOML2PDELA = (*xtomo)[i]->getFloat("XTOMOML2PDELA");
70  m_d[i].XTOMOML2PYPIT = (*xtomo)[i]->getFloat("XTOMOML2PYPIT");
71  m_d[i].XTOMOML2PZPIT = (*xtomo)[i]->getFloat("XTOMOML2PZPIT");
72  }
73  }
74 }
75 } // end of namespace MuonGM
MuonGM::DblQ00Xtomo::getName
std::string getName() const
Definition: DblQ00Xtomo.h:73
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
MuonGM::DblQ00Xtomo::m_d
std::vector< XTOMO > m_d
Definition: DblQ00Xtomo.h:78
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::DblQ00Xtomo::m_nObj
unsigned int m_nObj
Definition: DblQ00Xtomo.h:79
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
calibdata.exception
exception
Definition: calibdata.py:496
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
MuonGM::DblQ00Xtomo::DblQ00Xtomo
DblQ00Xtomo()=default
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.
DblQ00Xtomo.h