diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/CMAprogram.h b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/CMAprogram.h index d5ed05d81f8079c326f608447016d3c4fdbfa001..dfede4c07306844e77fda6c9e533bb4d47d7c6b7 100755 --- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/CMAprogram.h +++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/CMAprogram.h @@ -106,7 +106,6 @@ private: bool m_threshold_registers[3][CMAparameters::pivot_channels][CMAparameters::confirm_channels]; uint32_t m_program_bytes[3][CMAparameters::pivot_channels][2]; - bool read(DBline&); bool read_v02(DBline&); public: diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/CMAprogram.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/CMAprogram.cxx index 5f644d25301dc1196f03fdb91be6cd16b7ed2292..6773dcb86efc54a9e87ebb3b1d0d79dbe33481c2 100755 --- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/CMAprogram.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/CMAprogram.cxx @@ -4,7 +4,7 @@ #include "RPC_CondCabling/CMAprogram.h" -#include <cstring> +#include <string> CMAprogram::CMAprogram() { @@ -34,61 +34,9 @@ CMAprogram::CMAprogram(std::istringstream& filestr, bool NewCab) : m_status = read_v02(data); } -bool CMAprogram::read(DBline& data) { - unsigned long right_bit = 0x1; - - // switch to new DBline I/O format - data.setdbfmtflag(0); - - ++data; - - while (data) { - // start read the threshold registers - for (int i = 1; i <= 3; ++i) { - int majority; - - if (data("th #", i) && data("maj_reg") >> majority) { - int th = 0; - int ch = 0; - uint32_t first_word = 0; - uint32_t second_word = 0; - - ++data; - - while (data("th") >> th >> "thr_reg" >> ch >> data.dbhex() >> first_word >> second_word >> data.dbdec()) { - if (th < 1) return false; - m_program_bytes[th - 1][ch][1] = first_word; - m_program_bytes[th - 1][ch][0] = second_word; - - for (int bit = 0; bit < 32; ++bit) { - m_threshold_registers[th - 1][ch][bit] = ((second_word >> bit) & right_bit) != 0; - m_threshold_registers[th - 1][ch][bit + 32] = ((first_word >> bit) & right_bit) != 0; - } - - ++data; - } - } - } - - data("overlap1") >> data.dbhex() >> m_overlap1; - data("overlap2") >> data.dbhex() >> m_overlap2; - data("trig_local_direc_i") >> m_trig_local_direc_i; - data("trig_local_direc_j") >> m_trig_local_direc_j; - data("trig_k_readout") >> m_trig_k_readout; - - ++data; - } - - // switch back to previous DBline I/O format - data.setdbfmtflag(1); - return true; -} - bool CMAprogram::read_v02(DBline& data) { uint32_t right_bit = 0x1; - - // switch to new DBline I/O format - data.setdbfmtflag(0); + std::string ignore; ++data; @@ -175,12 +123,12 @@ bool CMAprogram::read_v02(DBline& data) { if (m_isnewcab) { // case RPC_CondCabling if (data("set_trig_thr0_thr_reg_00")) { - std::string newString = "empty"; for (int i = 0; i < 32; ++i) { + ignore.clear(); if (i == 0) data >> data.dbhex() >> twowords >> data.dbdec(); else - data >> newString >> data.dbhex() >> twowords >> data.dbdec(); + data >> ignore >> data.dbhex() >> twowords >> data.dbdec(); union Data { uint64_t bits; @@ -201,12 +149,12 @@ bool CMAprogram::read_v02(DBline& data) { } if (data("set_trig_thr1_thr_reg_00")) { - std::string newString = "empty"; + ignore.clear(); for (int i = 0; i < 32; ++i) { if (i == 0) data >> data.dbhex() >> twowords >> data.dbdec(); else - data >> newString >> data.dbhex() >> twowords >> data.dbdec(); + data >> ignore >> data.dbhex() >> twowords >> data.dbdec(); union Data { uint64_t bits; @@ -228,12 +176,12 @@ bool CMAprogram::read_v02(DBline& data) { } if (data("set_trig_thr2_thr_reg_00")) { - std::string newString = "empty"; + ignore.clear(); for (int i = 0; i < 32; ++i) { if (i == 0) data >> data.dbhex() >> twowords >> data.dbdec(); else - data >> newString >> data.dbhex() >> twowords >> data.dbdec(); + data >> ignore >> data.dbhex() >> twowords >> data.dbdec(); union Data { uint64_t bits; @@ -294,8 +242,7 @@ bool CMAprogram::read_v02(DBline& data) { ++data; } } - // switch back to previous DBline I/O format - data.setdbfmtflag(1); + return true; } diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx index 848afe528407c7753c76f719eb2f710f712f64e8..40d4f0568351fe91d33b55d22ff9015b11fd50c8 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx @@ -358,8 +358,6 @@ StatusCode RpcCablingCondAlg::setup(const CondAttrListCollection* readCdoMap, co } DBline data_corr(MAP_corr); - // switch to new DBline I/O format - data_corr.setdbfmtflag(0); nlines = 0; while (++data_corr) { ++nlines; @@ -425,9 +423,6 @@ StatusCode RpcCablingCondAlg::setup(const CondAttrListCollection* readCdoMap, co } } ATH_MSG_DEBUG("setup() - corrected map n. of lines read is " << nlines); - // switch back to previous DBline I/O format - data_corr.setdbfmtflag(1); - ATH_MSG_DEBUG("setup() - " << m_readKey_map_schema_corr.key() << " maps have been parsed"); for (int side = 0; side < 2; ++side) {