39 virtual std::shared_ptr< L1MuDTTFParameters >
newObject(
69 std::shared_ptr< L1MuDTTFParameters >
74 auto pDTTFParameters = std::make_shared< L1MuDTTFParameters >() ;
76 pDTTFParameters->reset() ;
81 std::vector< std::string > crateKeyColumns ;
82 crateKeyColumns.push_back(
"WEDGE_CRATE_1" ) ;
83 crateKeyColumns.push_back(
"WEDGE_CRATE_2" ) ;
84 crateKeyColumns.push_back(
"WEDGE_CRATE_3" ) ;
85 crateKeyColumns.push_back(
"WEDGE_CRATE_4" ) ;
86 crateKeyColumns.push_back(
"WEDGE_CRATE_5" ) ;
87 crateKeyColumns.push_back(
"WEDGE_CRATE_6" ) ;
100 <<
"Problem with L1MuDTTFParameters key " << objectKey ;
101 return std::shared_ptr< L1MuDTTFParameters >() ;
106 for(
int icrate = 0 ; icrate < 6 ; ++icrate )
108 crateKeyResults.
fillVariable( crateKeyColumns[ icrate ],
109 crateKeys[ icrate ] ) ;
110 std::cout <<
"Crate " << icrate <<
" key " 111 << crateKeys[ icrate ] << std::endl ;
116 "R",
"L",
"R",
"L",
"L",
"R",
"L",
"R",
"R",
"L",
"R",
"L" } ;
119 int crateNumbers[ 12 ] = { 3, 3, 4, 4, 5, 5, 2, 2, 1, 1, 0, 0 } ;
122 int wheelNumbers[ 6 ] = { -3, -2, -1, 1, 2, 3 } ;
125 std::string wheelNames[ 6 ] = {
"N2",
"N1",
"N0",
"P0",
"P1",
"P2" } ;
128 std::vector< std::string > phtfMaskColumns ;
129 phtfMaskColumns.push_back(
"INREC_QUAL_ST1" ) ;
130 phtfMaskColumns.push_back(
"INREC_QUAL_ST2" ) ;
131 phtfMaskColumns.push_back(
"INREC_QUAL_ST3" ) ;
132 phtfMaskColumns.push_back(
"INREC_QUAL_ST4" ) ;
133 phtfMaskColumns.push_back(
"SOC_QUAL_CSC" ) ;
134 phtfMaskColumns.push_back(
"SOC_STDIS_N" ) ;
135 phtfMaskColumns.push_back(
"SOC_STDIS_WL" ) ;
136 phtfMaskColumns.push_back(
"SOC_STDIS_WR" ) ;
137 phtfMaskColumns.push_back(
"SOC_STDIS_ZL" ) ;
138 phtfMaskColumns.push_back(
"SOC_STDIS_ZR" ) ;
139 phtfMaskColumns.push_back(
"SOC_QCUT_ST1" ) ;
140 phtfMaskColumns.push_back(
"SOC_QCUT_ST2" ) ;
141 phtfMaskColumns.push_back(
"SOC_QCUT_ST4" ) ;
142 phtfMaskColumns.push_back(
"SOC_RUN_21" ) ;
143 phtfMaskColumns.push_back(
"SOC_NBX_DEL" ) ;
144 phtfMaskColumns.push_back(
"SOC_CSC_ETACANC" ) ;
145 phtfMaskColumns.push_back(
"SOC_OPENLUT_EXTR" ) ;
148 for(
int isc = 0 ; isc < 12 ; ++isc )
150 int crateNumber = crateNumbers[ isc ] ;
151 std::cout <<
"isc " << isc <<
" icr " << crateNumber << std::endl ;
154 for(
int iwh = 0 ; iwh < 6 ; ++iwh )
157 sectorNames[ isc ] + wheelNames[ iwh ] ;
159 int nwh = wheelNumbers[ iwh ] ;
163 if( crateKeyResults.
fillVariable( crateKeyColumns[ crateNumber ],
167 std::vector< std::string > phtfKeyColumns ;
168 phtfKeyColumns.push_back(
"PHTF_" + sectorWheelName ) ;
174 "WEDGE_CRATE_CONF.ID",
176 crateKeyColumns[ crateNumber ] ) ;
182 <<
"Problem with WEDGE_CRATE_CONF key." ;
183 return std::shared_ptr< L1MuDTTFParameters >() ;
189 std::cout <<
"PHTF key " << dummy << std::endl ;
202 <<
"Problem with PHTF_CONF key." ;
203 return std::shared_ptr< L1MuDTTFParameters >() ;
210 pDTTFParameters->set_inrec_qual_st1( nwh, isc, tmp ) ;
213 pDTTFParameters->set_inrec_qual_st2( nwh, isc, tmp ) ;
216 pDTTFParameters->set_inrec_qual_st3( nwh, isc, tmp ) ;
218 std::cout <<
" INREC_QUAL_ST4 " << tmp << std::endl ;
219 pDTTFParameters->set_inrec_qual_st4( nwh, isc, tmp ) ;
220 std::cout <<
" SOC_QUAL_CSC " << tmp << std::endl ;
221 pDTTFParameters->set_soc_qual_csc( nwh, isc, tmp ) ;
225 pDTTFParameters->set_soc_stdis_n( nwh, isc, tmp ) ;
228 pDTTFParameters->set_soc_stdis_wl( nwh, isc, tmp ) ;
231 pDTTFParameters->set_soc_stdis_wr( nwh, isc, tmp ) ;
234 pDTTFParameters->set_soc_stdis_zl( nwh, isc, tmp ) ;
236 std::cout <<
" SOC_STDIS_ZR " << tmp << std::endl ;
237 pDTTFParameters->set_soc_stdis_zr( nwh, isc, tmp ) ;
241 pDTTFParameters->set_soc_qcut_st1( nwh, isc, tmp ) ;
244 pDTTFParameters->set_soc_qcut_st2( nwh, isc, tmp ) ;
246 std::cout <<
" SOC_QCUT_ST4 " << tmp << std::endl ;
247 pDTTFParameters->set_soc_qcut_st4( nwh, isc, tmp ) ;
251 pDTTFParameters->set_soc_run_21( nwh, isc, tmp ) ;
254 pDTTFParameters->set_soc_nbx_del( nwh, isc, tmp ) ;
255 phtfMaskResults.
fillVariable(
"SOC_CSC_ETACANC", tmp ) ;
257 pDTTFParameters->set_soc_csc_etacanc( nwh, isc, tmp ) ;
258 phtfMaskResults.
fillVariable(
"SOC_OPENLUT_EXTR", tmp ) ;
259 std::cout <<
" SOC_OPENLUT_EXTR " << tmp << std::endl ;
260 pDTTFParameters->set_soc_openlut_extr( nwh, isc, tmp ) ;
266 return pDTTFParameters ;
bool fillVariable(const std::string &columnName, T &outputVariable) const
const QueryResults singleAttribute(const T &data) const
DTTFParametersOnlineProd(const edm::ParameterSet &)
virtual std::shared_ptr< L1MuDTTFParameters > newObject(const std::string &objectKey) override
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="")
l1t::OMDSReader m_omdsReader
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
std::vector< std::vector< double > > tmp
~DTTFParametersOnlineProd()