7#include "GaudiKernel/SystemOfUnits.h"
27 const std::map<std::string, std::string>& asciiFileDBMap):
33 ATH_MSG_INFO(
"Start retrieving dbObjects with tag = <" << geoTag <<
"> node <" << geoNode <<
">");
92 if (
m_pRDBAccess->getRecordsetPtr(
"XtomoData", geoTag, geoNode)->size()!=0) {
93 m_dhxtomo= std::make_unique<DblQ00Xtomo>(pRDBAccess, geoTag, geoNode);
96 m_dhxtomo= std::make_unique<DblQ00Xtomo>();
104 if (asciiFileDBMap.find(
"ASZT") != asciiFileDBMap.end()) {
105 ATH_MSG_INFO(
"getting aszt from ascii file - named <" << asciiFileDBMap.find(
"ASZT")->second <<
">");
106 ATH_MSG_INFO(
"Ascii aszt input has priority over A-lines in ORACLE; A-lines from Oracle will not be read");
108 m_dhaszt = std::make_unique<DblQ00Aszt>(asciiFileDBMap.find(
"ASZT")->second);
117 ATH_MSG_INFO(
"No Ascii aszt input found: looking for A-lines in ORACLE");
118 if (
m_pRDBAccess->getRecordsetPtr(
"ASZT",geoTag,geoNode)->size()==0) {
119 m_dhaszt = std::make_unique<DblQ00Aszt>();
127 ATH_MSG_INFO(
"ASZT table in Oracle, if any, will not be read" );
133 if (asciiFileDBMap.find(
"IACSC") != asciiFileDBMap.end()) {
135 ATH_MSG_INFO(
"getting iacsc from ascii file - named <" << asciiFileDBMap.find(
"IACSC")->second <<
">" );
136 ATH_MSG_INFO(
"Ascii iacsc input has priority over A-lines in ORACLE; A-lines from Oracle will not be read" );
138 m_dhiacsc = std::make_unique<DblQ00IAcsc>(asciiFileDBMap.find(
"IACSC")->second);
146 ATH_MSG_INFO(
"No Ascii iacsc input found: looking for A-lines in ORACLE" );
147 if (
m_pRDBAccess->getRecordsetPtr(
"IZST", geoTag,geoNode)->size()==0) {
148 m_dhiacsc = std::make_unique<DblQ00IAcsc>();
155 ATH_MSG_INFO(
"ISZT table in Oracle, if any, will not be read" );
176 ATH_MSG_INFO(
"Access granted for all dbObjects needed by muon detectors" );
217 ATH_MSG_INFO(
"Intermediate Objects built from primary numbers" );
224 std::vector<std::string> slist;
225 slist.emplace_back(
"*");
232 for (it =
sel.begin(); it !=
sel.end(); ++it) {
233 Station *station = (*it).second;
238 const std::string &cname = c->name;
240 if (cname.compare(0, 3,
"CSC") == 0)
242 else if (cname.compare(0, 3,
"MDT") == 0)
244 else if (cname.compare(0, 3,
"RPC") == 0)
246 else if (cname.compare(0, 3,
"TGC") == 0)
248 else if (cname.compare(0, 3,
"SPA") == 0)
250 else if (cname.compare(0, 3,
"DED") == 0)
252 else if (cname.compare(0, 3,
"SUP") == 0)
254 else if (cname.compare(0, 3,
"CHV") == 0 && have_spa_details)
256 else if (cname.compare(0, 3,
"CRO") == 0 && have_spa_details)
258 else if (cname.compare(0, 3,
"CMI") == 0 && have_spa_details)
260 else if (cname.compare(0, 2,
"LB") == 0 && have_spa_details)
265 ATH_MSG_INFO(
"nMDT " << nmdt <<
" nCSC " << ncsc <<
" nTGC " << ntgc <<
" nRPC " << nrpc );
266 ATH_MSG_INFO(
"nDED " << nded <<
" nSUP " << nsup <<
" nSPA " << nspa );
267 ATH_MSG_INFO(
"nCHV " << nchv <<
" nCRO " << ncro <<
" nCMI " << ncmi <<
" nLBI " << nlbi );
277 float wirespacing(0);
278 unsigned int gglnSize(0);
280 gglnSize = ggln->
size();
282 ATH_MSG_WARNING(
" ProcessTGCreadout - IRDBRecordset_ptr GGLN is nullptr" );
285 version = (int)(*ggln)[0]->getInt(
"VERS");
286 wirespacing = (*ggln)[0]->getFloat(
"WIRESP") * Gaudi::Units::mm;
289 ATH_MSG_INFO(
" ProcessTGCreadout - version " << version <<
" wirespacing " << wirespacing );
292 for (
unsigned int ich = 0; ich < gglnSize; ++ich) {
293 int type = (int)(*ggln)[ich]->getInt(
"JSTA");
312 for (
int i = 0; i < 3; i++) {
313 nwgs[i] = (*ggln)[ich]->getInt(
"NWGS", i );
314 nsps[i] = (*ggln)[ich]->getInt(
"NSPS", i);
316 for (
int i = 0; i < nwgs[0]; i++) {
317 iwgs1[i] = (*ggln)[ich]->getInt(
"IWGS1", i);
320 for (
int i = 0; i < nwgs[1]; i++) {
321 iwgs2[i] = (*ggln)[ich]->getInt(
"IWGS2", i);
323 for (
int i = 0; i < nwgs[2]; i++) {
324 iwgs3[i] = (*ggln)[ich]->getInt(
"IWGS3", i);
328 float pdist = (*ggln)[ich]->getFloat(
"PDIST");
330 for (
int i = 0; i < nsps[0] + 1; i++) {
331 slarge[0][i] = (*ggln)[ich]->getFloat(
"SLARGE", i);
332 sshort[0][i] = (*ggln)[ich]->getFloat(
"SHORT", i);
335 std::make_unique<TgcReadoutParams>(name,
type, wirespacing, nchrng,
347 std::ostringstream Astr;
349 Astr <<
"0" << ich + 1;
353 std::string
A = Astr.str();
361 tgc->
angleTilt = (*ggln)[ich]->getFloat(
"TILT") * Gaudi::Units::deg;
363 tgc->
pitchButton[0] = (*ggln)[ich]->getFloat(
"SP2BU");
364 tgc->
pitchButton[1] = (*ggln)[ich]->getFloat(
"SP3BU");
365 tgc->
angleButton = (*ggln)[ich]->getFloat(
"SP4BU") * Gaudi::Units::deg;
404 if (ichtyp < 1 || ichtyp > 19) {
405 ATH_MSG_ERROR(
" DBReader::TGCreadoutName - ichtype " << ichtyp <<
" out of range 1-19" );
445 if (ichtyp < 1 || ichtyp > 21) {
446 ATH_MSG_ERROR(
" DBReader::TGCreadoutName - ichtype " << ichtyp <<
" out of range 1-21" );
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
#define ATH_MSG_WARNING(x)
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
virtual unsigned int size() const =0
std::vector< std::string > m_tgcReadoutMapping
const std::string & getGeometryVersion() const
void setLayoutName(const std::string &s)
void StoreTgcRPars(GeoModel::TransientConstSharedPtr< TgcReadoutParams > t)
Technology * GetTechnology(const std::string &name)
void setNovaVersion(int i)
void setGeometryVersion(const std::string &s)
void setNovaReadVersion(int i)
std::unique_ptr< DblQ00Xtomo > m_dhxtomo
const DblQ00Wrpc::WRPC * m_wrpcall
std::unique_ptr< DblQ00Wlbi > m_dhwlbi
RDBReaderAtlas(StoreGateSvc *pDetStore, IRDBAccessSvc *m_pRDBAccess, const std::string &geoTag, const std::string &geoNode, const std::map< std::string, std::string > &asciiFileDBMap)
const DblQ00Atyp::ATYP * m_atyp
const DblQ00Wcsc::WCSC * m_wcsc
const DblQ00Almn::ALMN * m_almn
std::unique_ptr< DblQ00IAcsc > m_dhiacsc
const DblQ00Wcro::WCRO * m_wcro
const DblQ00Aszt::ASZT * m_aszt
const DblQ00Awln::AWLN * m_wrpc
std::unique_ptr< DblQ00Wsup > m_dhwsup
const DblQ00Acut::ACUT * m_acut
std::unique_ptr< DblQ00Wmdt > m_dhwmdt
std::unique_ptr< DblQ00Wcsc > m_dhwcsc
std::unique_ptr< DblQ00Aptp > m_dhaptp
const DblQ00Wchv::WCHV * m_wchv
std::unique_ptr< DblQ00Aszt > m_dhaszt
std::string TGCreadoutName(int ichtyp)
const DblQ00Wsup::WSUP * m_wsup
std::unique_ptr< DblQ00Wtgc > m_dhwtgcall
std::unique_ptr< DblQ00Wchv > m_dhwchv
const DblQ00Asmp::ASMP * m_asmp
const DblQ00Wcmi::WCMI * m_wcmi
void ProcessTechnologies(MYSQL &mysql)
std::unique_ptr< DblQ00Wcro > m_dhwcro
const std::string m_geoTag
const DblQ00Dbam::DBAM * m_dbam
std::unique_ptr< DblQ00Wrpc > m_dhwrpcall
virtual StatusCode ProcessDB(MYSQL &mysql) override
const DblQ00Wded::WDED * m_wded
std::unique_ptr< DblQ00Asmp > m_dhasmp
const DblQ00Wspa::WSPA * m_wspa
const DblQ00IAcsc::IACSC * m_iacsc
IRDBAccessSvc * m_pRDBAccess
std::unique_ptr< DblQ00Awln > m_dhwrpc
std::unique_ptr< DblQ00Atyp > m_dhatyp
std::unique_ptr< DblQ00Almn > m_dhalmn
void ProcessTGCreadout(MYSQL &mysql)
std::unique_ptr< DblQ00Dbam > m_dhdbam
std::unique_ptr< DblQ00Atln > m_dhwtgc
const DblQ00Alin::ALIN * m_alin
const DblQ00Atln::ATLN * m_wtgc
const DblQ00Wtgc::WTGC * m_wtgcall
const DblQ00Wlbi::WLBI * m_wlbi
std::unique_ptr< DblQ00Wded > m_dhwded
std::unique_ptr< DblQ00Acut > m_dhacut
const DblQ00Wmdt::WMDT * m_wmdt
const std::string m_geoNode
const DblQ00Xtomo::XTOMO * m_xtomo
std::unique_ptr< DblQ00Alin > m_dhalin
std::unique_ptr< DblQ00Wspa > m_dhwspa
std::unique_ptr< DblQ00Wcmi > m_dhwcmi
const DblQ00Aptp::APTP * m_aptp
StationMap::const_iterator StationIterator
int GetNrOfComponents() const
Component * GetComponent(int i) const
std::array< double, 2 > pitchButton
std::array< double, 3 > offsetWireSupport
double distanceWireSupport
std::array< double, MaxNStrips > StripArray
std::array< int, MaxNGangs > WiregangArray
std::array< double, MaxNGaps > GasGapFloatArray
std::array< int, MaxNGaps > GasGapIntArray
The Athena Transient Store API.
Ensure that the Athena extensions are properly loaded.
std::string buildString(int i, int ncha)
TgcReadoutParams::WiregangArray WiregangArray
TgcReadoutParams::GasGapIntArray GasGapIntArray
TgcReadoutParams::StripArray StripArray
TgcReadoutParams::GasGapFloatArray GasGapFloatArray
hold the test vectors and ease the comparison