18 const std::string& version_tag,
19 const std::string& version_node,
85 return (*
m_tile)[0]->getInt(
"NMODUL");
90 return (*
m_tile)[0]->getDouble(
"RMIM");
95 return (*
m_tile)[0]->getDouble(
"RMAM");
100 return (*
m_tile)[0]->getDouble(
"ZMAM");
105 return (*
m_tile)[0]->getDouble(
"RMIN");
110 return (*
m_tile)[0]->getDouble(
"RMAX");
115 return (*
m_tile)[0]->getDouble(
"ZSHIFT");
135 ATH_MSG_ERROR(
"TileDddbManager::GetEnvType() - Current Envelope not set, returning -999" );
147 unsigned int ind2 = 0;
148 while (((*
m_tiglob)[ind2]->getInt(
"PART") !=
static_cast<int>(envelopeT)) && (++ind2 <
m_n_tiglob))
154 unsigned int ind3 = 0;
155 while (((*
m_timod)[ind3]->getInt(
"PART") !=
static_cast<int>(envelopeT)) && (++ind3 <
m_n_timod))
165 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentEnvByType() - Couldn't return begin of modules" );
170 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentEnvByType() - Couldn't return Envelope" );
186 unsigned int ind1 = 0;
192 int part = (*m_timod)[ind1]->getInt(
"PART");
193 if (
m_tag ==
"TileCal-02" ) {
194 if (part == 3) part = 5;
195 else if (part == 2) part = 3;
197 if ( part ==
static_cast<int>(
m_EnvNum))
break;
206 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentEnvByIndex() - Couldn't return begin of modules" );
211 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentEnvByIndex() - Couldn't return Envelope" );
223 ATH_MSG_ERROR(
"TileDddbManager::GetEnvSide() - Current Section not set, returning -999" );
235 ATH_MSG_ERROR(
"TileDddbManager::GetEnvNModules() - Current Envelope not set, returning -999" );
246 ATH_MSG_ERROR(
"TileDddbManager::GetEnvRin() - Current Envelope not set, returning -999" );
257 ATH_MSG_ERROR(
"TileDddbManager::GetEnvRout() - Current Envelope not set, returning -999" );
269 if (len > 564 + 37.7*2 &&
m_tag ==
"TileCal-02") {
275 ATH_MSG_ERROR(
"TileDddbManager::GetEnvZLength() - Current Envelope not set, returning -999" );
286 if ( dphi != 0 &&
m_tag ==
"TileCal-02") {
287 dphi -= 360.0/64.0/2.;
292 ATH_MSG_ERROR(
"TileDddbManager::GetEnvDPhi() - Current Envelope not set, returning -999" );
304 if ( dz > 20 &&
m_tag ==
"TileCal-02") {
310 ATH_MSG_ERROR(
"TileDddbManager::GetEnvDZ() - Current Envelope not set, returning -999" );
321 ATH_MSG_ERROR(
"TileDddbManager::GetEnvDX() - Current Envelope not set, returning -999" );
332 ATH_MSG_ERROR(
"TileDddbManager::GetEnvDY() - Current Envelope not set, returning -999" );
343 ATH_MSG_ERROR(
"TileDddbManager::GetEnvDPsi() - Current Envelope not set, returning -999" );
354 ATH_MSG_ERROR(
"TileDddbManager::GetEnvDTheta() - Current Envelope not set, returning -999" );
365 ATH_MSG_ERROR(
"TileDddbManager::GetEnvZShift() - Current Envelope not set, returning -999" );
381 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentModuleByIndex() - Module number " << Id <<
" is out of range" );
391 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentModuleByIndex() - Current Envelope not set, returning -999" );
406 while (((*
m_timod)[ind4]->getInt(
"MODNUM") !=
static_cast<int>(Number))&&(++ind4 < EnvEnd))
416 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentModuleByNumber() - Couldn't return Module" );
421 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentModuleByNumber() - Current Envelope not set, returning -999" );
432 ATH_MSG_ERROR(
"TileDddbManager::GetModNumber() - Current Module not set, returning -999" );
443 ATH_MSG_ERROR(
"TileDddbManager::GetModType() - Current Module not set, returning -999" );
454 ATH_MSG_ERROR(
"TileDddbManager::GetModDX() - Current Module not set, returning -999" );
465 ATH_MSG_ERROR(
"TileDddbManager::GetModDY() - Current Module not set, returning -999" );
476 ATH_MSG_ERROR(
"TileDddbManager::GetModDZ() - Current Module not set, returning -999" );
487 ATH_MSG_ERROR(
"TileDddbManager::GetModDPhi() - Current Module not set, returning -999" );
498 ATH_MSG_ERROR(
"TileDddbManager::GetModDPsi() - Current Module not set, returning -999" );
509 ATH_MSG_ERROR(
"TileDddbManager::GetModDTheta() - Current Module not set, returning -999" );
521 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentTypeByIndex() - Type index (" << Id <<
") is out of range (" <<
m_modTypes.size() <<
")" );
552 while (fullType > 0) {
553 unsigned int subType = fullType%100;
571 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentSectionByIndex() - Section index (" << IdSection <<
") is out of range (" <<
m_n_tilb <<
")" );
584 unsigned int ind = 0;
591 if (
print)
ATH_MSG_ERROR(
"TileDddbManager::SetCurrentSection() - Unable to find the section" );
607 ATH_MSG_ERROR(
"TileDddbManager::TILBsection() - Current Section not set, returning -999" );
618 ATH_MSG_ERROR(
"TileDddbManager::TILBnperiod() - Current Section not set, returning -999" );
629 ATH_MSG_ERROR(
"TileDddbManager::TILBnmodul() - Current Section not set, returning -999" );
640 ATH_MSG_ERROR(
"TileDddbManager::TILBrmin() - Current Section not set, returning -999.9" );
651 ATH_MSG_ERROR(
"TileDddbManager::TILBrmax() - Current Section not set, returning -999.9" );
662 ATH_MSG_ERROR(
"TileDddbManager::TILBrminimal() - Current Section not set, returning -999.9" );
673 ATH_MSG_ERROR(
"TileDddbManager::TILBrmaximal() - Current Section not set, returning -999.9" );
684 ATH_MSG_ERROR(
"TileDddbManager::TILBdzperio() - Current Section not set, returning -999.9" );
695 ATH_MSG_ERROR(
"TileDddbManager::TILBdrfront() - Current Section not set, returning -999.9" );
706 ATH_MSG_ERROR(
"TileDddbManager::TILBdzend() - Current Section not set, returning -999.9" );
717 ATH_MSG_ERROR(
"TileDddbManager::TILBflangex() - Current Section not set, returning -999.9" );
728 ATH_MSG_ERROR(
"TileDddbManager::TILBflangey() - Current Section not set, returning -999.9" );
739 ATH_MSG_ERROR(
"TileDddbManager::TILBzoffset() - Current Section not set, returning -999.9" );
750 ATH_MSG_ERROR(
"TileDddbManager::TILBphigap() - Current Section not set, returning -999.9" );
761 ATH_MSG_ERROR(
"TileDddbManager::TILBisci_st() - Current Section not set, returning -999.9" );
772 ATH_MSG_ERROR(
"TileDddbManager::TILBdzmodul() - Current Section not set, returning -999.9" );
783 ATH_MSG_ERROR(
"TileDddbManager::TILBdzmast() - Current Section not set, returning -999.9" );
794 ATH_MSG_ERROR(
"TileDddbManager::TILBdzspac() - Current Section not set, returning -999.9" );
805 ATH_MSG_ERROR(
"TileDddbManager::TILBdzend1() - Current Section not set, returning -999.9" );
816 ATH_MSG_ERROR(
"TileDddbManager::TILBdzend2() - Current Section not set, returning -999.9" );
827 ATH_MSG_ERROR(
"TileDddbManager::TILBngirder() - Current Section not set, returning -999" );
838 ATH_MSG_ERROR(
"TileDddbManager::TILBnscin() - Current Section not set, returning -999" );
849 ATH_MSG_ERROR(
"TileDddbManager::TILBfingpattern() - Current Section not set, returning -999" );
860 ATH_MSG_ERROR(
"TileDddbManager::TILBnpercutpos() - Current Section not set, returning -999" );
871 ATH_MSG_ERROR(
"TileDddbManager::TILBnpercutneg() - Current Section not set, returning -999" );
886 ATH_MSG_ERROR(
"TileDddbManager::TILBcurscint() - Current Section not set, returning -999" );
897 ATH_MSG_ERROR(
"TileDddbManager::TILBdzgir() - Current Section not set, returning -999" );
905 unsigned int ind = 0;
907 while (((*
m_scnt)[ind]->getInt(
"ITEM") != item) && (++ind <
m_n_scnt))
913 ATH_MSG_ERROR(
"TileDddbManager::SetCurrentScin() - Unable to find the scintillator, item = " << item );
929 ATH_MSG_ERROR(
"TileDddbManager::SCNTitem() - Current Scintillator not set, returning -999" );
940 ATH_MSG_ERROR(
"TileDddbManager::SCNTdr() - Current Scintillator not set, returning -999.9" );
951 ATH_MSG_ERROR(
"TileDddbManager::SCNTrc() - Current Scintillator not set, returning -999.9" );
962 ATH_MSG_ERROR(
"TileDddbManager::SCNTzp() - Current Scintillator not set, returning -999.9" );
973 ATH_MSG_ERROR(
"TileDddbManager::SCNTdrw() - Current Scintillator not set, returning -999.9" );
984 ATH_MSG_ERROR(
"TileDddbManager::SCNTdt() - Current Scintillator not set, returning -999.9" );
995 ATH_MSG_ERROR(
"TileDddbManager::SCNTdtw() - Current Scintillator not set, returning -999.9" );
1006 ATH_MSG_ERROR(
"TileDddbManager::SCNTdphi() - Current Scintillator not set, returning -999.9" );
1017 {std::string name(input);
1018 unsigned int ind = 0;
1020 while (((*
m_cuts)[ind]->getString(
"VOLUME") != name) && (++ind <
m_n_cuts))
1025 {
ATH_MSG_ERROR(
"TileDddbManager::SetCurrentCuts() - Unable to find the m_currentCuts volume name = " << name );
1033 ATH_MSG_WARNING(
"TileDddbManager::SetCurrentCuts() - SetCuts Ext.Barrel Cuts unavailable in touched DB" );
1045{std::string output =
"-999.9";
1049 {
ATH_MSG_ERROR(
"TileDddbManager::CutsName() - Current VOLUME dimension not set, returning -999.9" );
1059 {
ATH_MSG_ERROR(
"TileDddbManager::CutsDX1() - Current dX1 dimension not set, returning -999.9" );
1069 {
ATH_MSG_ERROR(
"TileDddbManager::CutsDX2() - Current dX2 dimension not set, returning -999.9" );
1079 {
ATH_MSG_ERROR(
"TileDddbManager::CutsDY1() - Current dY1 dimension not set, returning -999.9" );
1089 {
ATH_MSG_ERROR(
"TileDddbManager::CutsDY2() - Current dY2 dimension not set, returning -999.9" );
1099 {
ATH_MSG_ERROR(
"TileDddbManager::CutsDZ1() - Current dZ1 dimension not set, returning -999.9" );
1109 {
ATH_MSG_ERROR(
"TileDddbManager::CutsXpos() - Current Xpos dimension not set, returning -999.9" );
1119 {
ATH_MSG_ERROR(
"TileDddbManager::CutsYpos() - Current Ypos dimension not set, returning -999.9" );
1137 ATH_MSG_WARNING(
"TileDddbManager::SetCurrentSaddle() - Saddle unavailable in touched DB");
1145 {
ATH_MSG_DEBUG(
"TileDddbManager::BoolSaddle() - return false" );
1155 {
ATH_MSG_ERROR(
"TileDddbManager::DzSaddleSupport() - dimension not set, returning -999.9" );
1165 {
ATH_MSG_ERROR(
"TileDddbManager::RadiusSaddle() - dimension not set, returning -999.9" );
1173 unsigned int ind = 0;
1175 while (((*
m_tigr)[ind]->getInt(
"ITEM") != item) && (++ind <
m_n_tigr))
1181 ATH_MSG_DEBUG(
"TileDddbManager::SetCurrentGird() - Unable to find the girder element, item= " << item );
1197 ATH_MSG_ERROR(
"TileDddbManager::TIGRitem() - Current Girder element not set, returning -999" );
1208 ATH_MSG_ERROR(
"TileDddbManager::TIGRmaterial() - Current Girder element not set, returning -999" );
1219 ATH_MSG_ERROR(
"TileDddbManager::TIGRrc() - Current Girder element not set, returning -999.9" );
1230 ATH_MSG_ERROR(
"TileDddbManager::TIGRdr() - Current Girder element not set, returning -999.9" );
1241 ATH_MSG_ERROR(
"TileDddbManager::TIGRdw() - Current Girder element not set, returning -999.9" );
1252 ATH_MSG_ERROR(
"TileDddbManager::TIGRoff() - Current Girder element not set, returning -999.9" );
1260 unsigned int ind = 0;
1268 ATH_MSG_DEBUG(
"TileDddbManager::SetCurrentTifg() - Unable to find the finger, section = " <<
section );
1284 ATH_MSG_ERROR(
"TileDddbManager::TIFGsection() - Current TIFG not set, returning -999" );
1295 ATH_MSG_ERROR(
"TileDddbManager::TIFGnelem() - Current TIFG not set, returning -999" );
1306 ATH_MSG_ERROR(
"TileDddbManager::TIFGdz() - Current TIFG not set, returning -999.9" );
1314 unsigned int ind = 0;
1316 while (((*
m_ticg)[ind]->getInt(
"ITEM") != item) && (++ind <
m_n_ticg))
1322 ATH_MSG_DEBUG(
"TileDddbManager::SetCurrentTicg() - Unable to find the finger element, item = " << item );
1338 ATH_MSG_ERROR(
"TileDddbManager::TICGitem() - Current TICG not set, returning -999" );
1349 ATH_MSG_ERROR(
"TileDddbManager::TICGmaterial() - Current TICG not set, returning -999" );
1360 ATH_MSG_ERROR(
"TileDddbManager::TICGshape() - Current TICG not set, returning -999" );
1371 ATH_MSG_ERROR(
"TileDddbManager::TICGrc() - Current TICG not set, returning -999.9" );
1382 ATH_MSG_ERROR(
"TileDddbManager::TICGdr() - Current TICG not set, returning -999.9" );
1393 ATH_MSG_ERROR(
"TileDddbManager::TICGdx1() - Current TICG not set, returning -999.9" );
1404 ATH_MSG_ERROR(
"TileDddbManager::TICGdx2() - Current TICG not set, returning -999.9" );
1415 ATH_MSG_ERROR(
"TileDddbManager::TICGoff() - Current TICG not set, returning -999.9" );
1426 ATH_MSG_ERROR(
"TileDddbManager::TICGdz() - Current TICG not set, returning -999.9" );
1437 ATH_MSG_ERROR(
"TileDddbManager::TICGzc() - Current TICG not set, returning -999.9" );
1450 unsigned int detector_ind = 0;
1453 while (((*
m_ticl)[detector_ind]->getInt(
"DETECTOR") != detector) && (++detector_ind <
m_n_ticl))
1459 ATH_MSG_DEBUG(
"TileDddbManager::SetCurrentTicl() - Unable to find any cell for the detector = " << detector );
1473 ATH_MSG_DEBUG(
"TileDddbManager::SetCurrentTicl() - Unable to find any cell for sample = "
1474 << sample <<
" in the detector = " << detector );
1482 while (((*
m_ticl)[ind]->getInt(
"TOWER") != tower) && (++ind <
m_n_ticl))
1488 ATH_MSG_DEBUG(
"TileDddbManager::SetCurrentTicl() - Unable to find any cell for tower = "
1489 << tower <<
" in the detector = " << detector <<
" and sample = " << sample );
1506 ATH_MSG_DEBUG(
"TileDddbManager::SetCurrentTicl() - The requested index = " <<
index <<
" out of range." );
1519 unsigned int ind = 0;
1522 while (((*
m_ticl)[ind]->getInt(
"DETECTOR") != detector) && (++ind <
m_n_ticl))
1537 unsigned int detector_ind = 0;
1540 while (((*
m_ticl)[detector_ind]->getInt(
"DETECTOR") != detector) && (++detector_ind <
m_n_ticl))
1605 ATH_MSG_ERROR(
"TileDddbManager::TICLdetector() - Current TICL not set, returning -999" );
1616 ATH_MSG_ERROR(
"TileDddbManager::TICLncell() - Current TICL not set, returning -999.9" );
1627 ATH_MSG_ERROR(
"TileDddbManager::TICLtower() - Current TICL not set, returning -999.9" );
1638 ATH_MSG_ERROR(
"TileDddbManager::TICLsample() - Current TICL not set, returning -999.9" );
1649 ATH_MSG_ERROR(
"TileDddbManager::TICLeta() - Current TICL not set, returning -999.9" );
1660 ATH_MSG_ERROR(
"TileDddbManager::TICLdeta() - Current TICL not set, returning -999.9" );
1671 ATH_MSG_ERROR(
"TileDddbManager::TICLfirstrow() - Current TICL not set, returning -999.9" );
1682 ATH_MSG_ERROR(
"TileDddbManager::TICLlastrow() - Current TICL not set, returning -999.9" );
1693 ATH_MSG_ERROR(
"TileDddbManager::TICLntilesrow() - Current TICL not set, returning 9999" );
1704 ATH_MSG_ERROR(
"TileDddbManager::TICLnpmt() - Current TICL not set, returning -999.9" );
1715 ATH_MSG_ERROR(
"TileDddbManager::TICLholes() - Current TICL not set, returning 9999" );
1725 ATH_MSG_DEBUG(
"TileDddbManager::getSwitch() - TileSwitches(" << name <<
") is EMPTY, returning " << name <<
" = " << val );
1730 }
catch (std::exception& e) {
1731 ATH_MSG_WARNING(
"TileDddbManager::getSwitch() - TileSwitches table does not contain field " << name <<
", returning " << name <<
" = " << val );
1735 ATH_MSG_ERROR(
"TileDddbManager::getSwitch() - TileSwitches is not set, returning " << name <<
" = " << val );
#define ATH_MSG_WARNING(x)
Definition of the abstract IRDBAccessSvc interface.
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
void print(char *figname, TCanvas *c1)
#define sample_ind(r, m, c, i)
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
std::vector< unsigned int > m_modTypes
double TILBrminimal() const
int SetCurrentTypeByIndex(unsigned int Id)
int SetFirstTiclInDet(int detector)
double TILBdzend1() const
double TILBdzperio() const
int GetNumberOfEnv() const
int SetCurrentModuleByIndex(unsigned int Id)
double DzSaddleSupport() const
const IRDBRecord * m_currentTileGlob
const IRDBRecord * m_currentCuts
int SetCurrentTifg(int section)
int TILBnpercutpos() const
double GetEnvDPhi() const
unsigned int GetModTypeSize() const
const IRDBRecord * m_currentTileMod
double TICLlastrow() const
int SetCurrentGird(int item)
TileDddbManager(IRDBAccessSvc *access, const std::string &version_tag, const std::string &version_node, bool sqliteInput=false)
const IRDBRecord * m_currentScin
const IRDBRecord * m_currentSection
double TICLholes(unsigned int ind) const
double TICLfirstrow() const
int getSwitch(const char *name, int def_val) const
int TILBnpercutneg() const
double TILBzoffset() const
int SetCurrentSectionByIndex(unsigned int IdSection)
unsigned int m_n_tileSwitches
double TILBisci_st() const
double TILBdrfront() const
const IRDBRecord * m_currentTicl
unsigned int GetNumTicl() const
int SetCurrentCuts(const std::string &input)
Fields of CUTS structure (see also Oracle comments):
double TILBflangex() const
double TILBflangey() const
int SCNTitem() const
Fields of SCNT structure (see also Oracle comments):
IRDBRecordset_ptr m_timod
int SetCurrentSaddle(unsigned int index)
Fields of SADDLE structure (see also Oracle comments):
double GetEnvZShift() const
double TILBdzspac() const
const IRDBRecord * m_currentSaddle
std::string CutsName() const
double TICLsample() const
int SetCurrentModuleByNumber(unsigned int Number)
double GetEnvDTheta() const
int SetCurrentTicg(int item)
int SetCurrentTypeByNumber(unsigned int Number)
int SetNextTiclInDetSamp()
const IRDBRecord * m_currentTifg
IRDBRecordset_ptr m_tileSwitches
int GetEnvNModules() const
double TILBdzend2() const
double GetEnvDPsi() const
double TILEzshift() const
double GetModDTheta() const
int SetCurrentEnvByIndex(unsigned int envelope)
int SetCurrentSectionByNumber(unsigned int section)
double GetEnvZLength() const
int SetCurrentSection(unsigned int section, bool print=true)
int SetFirstTiclInDetSamp(int detector, double sample)
int SetCurrentScin(int item)
double TILBdzmast() const
unsigned int GetNumTilb() const
const IRDBRecord * m_currentTicg
double GetModDPhi() const
int TILBfingpattern() const
IRDBRecordset_ptr m_tiglob
double TICLntilesrow(unsigned int ind) const
double RadiusSaddle() const
double TILBdzmodul() const
double TILBphigap() const
int SetCurrentEnvByType(unsigned int envelope)
double GetModDPsi() const
double GetEnvRout() const
IRDBRecordset_ptr m_saddle
double TILBrmaximal() const
int SetCurrentTicl(int detector, double sample, double tower)
const IRDBRecord * m_currentGird