60 auto pDTTFParameters = std::make_unique<L1MuDTTFParameters>();
62 pDTTFParameters->reset();
67 std::vector<std::string> crateKeyColumns;
68 crateKeyColumns.push_back(
"WEDGE_CRATE_1");
69 crateKeyColumns.push_back(
"WEDGE_CRATE_2");
70 crateKeyColumns.push_back(
"WEDGE_CRATE_3");
71 crateKeyColumns.push_back(
"WEDGE_CRATE_4");
72 crateKeyColumns.push_back(
"WEDGE_CRATE_5");
73 crateKeyColumns.push_back(
"WEDGE_CRATE_6");
80 edm::LogError(
"L1-O2O") <<
"Problem with L1MuDTTFParameters key " << objectKey;
81 return std::unique_ptr<L1MuDTTFParameters>();
86 for (
int icrate = 0; icrate < 6; ++icrate) {
87 crateKeyResults.
fillVariable(crateKeyColumns[icrate], crateKeys[icrate]);
88 std::cout <<
"Crate " << icrate <<
" key " << crateKeys[icrate] << std::endl;
92 std::string sectorNames[12] = {
"R",
"L",
"R",
"L",
"L",
"R",
"L",
"R",
"R",
"L",
"R",
"L"};
95 int crateNumbers[12] = {3, 3, 4, 4, 5, 5, 2, 2, 1, 1, 0, 0};
98 int wheelNumbers[6] = {-3, -2, -1, 1, 2, 3};
101 std::string wheelNames[6] = {
"N2",
"N1",
"N0",
"P0",
"P1",
"P2"};
104 std::vector<std::string> phtfMaskColumns;
105 phtfMaskColumns.push_back(
"INREC_QUAL_ST1");
106 phtfMaskColumns.push_back(
"INREC_QUAL_ST2");
107 phtfMaskColumns.push_back(
"INREC_QUAL_ST3");
108 phtfMaskColumns.push_back(
"INREC_QUAL_ST4");
109 phtfMaskColumns.push_back(
"SOC_QUAL_CSC");
110 phtfMaskColumns.push_back(
"SOC_STDIS_N");
111 phtfMaskColumns.push_back(
"SOC_STDIS_WL");
112 phtfMaskColumns.push_back(
"SOC_STDIS_WR");
113 phtfMaskColumns.push_back(
"SOC_STDIS_ZL");
114 phtfMaskColumns.push_back(
"SOC_STDIS_ZR");
115 phtfMaskColumns.push_back(
"SOC_QCUT_ST1");
116 phtfMaskColumns.push_back(
"SOC_QCUT_ST2");
117 phtfMaskColumns.push_back(
"SOC_QCUT_ST4");
118 phtfMaskColumns.push_back(
"SOC_RUN_21");
119 phtfMaskColumns.push_back(
"SOC_NBX_DEL");
120 phtfMaskColumns.push_back(
"SOC_CSC_ETACANC");
121 phtfMaskColumns.push_back(
"SOC_OPENLUT_EXTR");
124 for (
int isc = 0; isc < 12; ++isc) {
125 int crateNumber = crateNumbers[isc];
126 std::cout <<
"isc " << isc <<
" icr " << crateNumber << std::endl;
129 for (
int iwh = 0; iwh < 6; ++iwh) {
130 std::string sectorWheelName = sectorNames[isc] + wheelNames[iwh];
132 int nwh = wheelNumbers[iwh];
136 if (crateKeyResults.
fillVariable(crateKeyColumns[crateNumber], crateKey)) {
138 std::vector<std::string> phtfKeyColumns;
139 phtfKeyColumns.push_back(
"PHTF_" + sectorWheelName);
144 "WEDGE_CRATE_CONF.ID",
146 crateKeyColumns[crateNumber]);
149 edm::LogError(
"L1-O2O") <<
"Problem with WEDGE_CRATE_CONF key.";
150 return std::unique_ptr<L1MuDTTFParameters>();
162 return std::unique_ptr<L1MuDTTFParameters>();
169 pDTTFParameters->set_inrec_qual_st1(nwh, isc,
tmp);
172 pDTTFParameters->set_inrec_qual_st2(nwh, isc,
tmp);
175 pDTTFParameters->set_inrec_qual_st3(nwh, isc,
tmp);
178 pDTTFParameters->set_inrec_qual_st4(nwh, isc,
tmp);
180 pDTTFParameters->set_soc_qual_csc(nwh, isc,
tmp);
184 pDTTFParameters->set_soc_stdis_n(nwh, isc,
tmp);
187 pDTTFParameters->set_soc_stdis_wl(nwh, isc,
tmp);
190 pDTTFParameters->set_soc_stdis_wr(nwh, isc,
tmp);
193 pDTTFParameters->set_soc_stdis_zl(nwh, isc,
tmp);
196 pDTTFParameters->set_soc_stdis_zr(nwh, isc,
tmp);
200 pDTTFParameters->set_soc_qcut_st1(nwh, isc,
tmp);
203 pDTTFParameters->set_soc_qcut_st2(nwh, isc,
tmp);
206 pDTTFParameters->set_soc_qcut_st4(nwh, isc,
tmp);
210 pDTTFParameters->set_soc_run_21(nwh, isc,
tmp);
213 pDTTFParameters->set_soc_nbx_del(nwh, isc,
tmp);
216 pDTTFParameters->set_soc_csc_etacanc(nwh, isc,
tmp);
219 pDTTFParameters->set_soc_openlut_extr(nwh, isc,
tmp);
225 return pDTTFParameters;
const QueryResults singleAttribute(const T &data) const
DTTFParametersOnlineProd(const edm::ParameterSet &)
Log< level::Error, false > LogError
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
bool fillVariable(const std::string &columnName, T &outputVariable) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
l1t::OMDSReader m_omdsReader
~DTTFParametersOnlineProd() override
std::unique_ptr< L1MuDTTFParameters > newObject(const std::string &objectKey) override