39 std::unique_ptr< L1MuDTTFParameters >
newObject(
69 std::unique_ptr< L1MuDTTFParameters >
72 auto pDTTFParameters = std::make_unique< L1MuDTTFParameters >() ;
74 pDTTFParameters->reset() ;
79 std::vector< std::string > crateKeyColumns ;
80 crateKeyColumns.push_back(
"WEDGE_CRATE_1" ) ;
81 crateKeyColumns.push_back(
"WEDGE_CRATE_2" ) ;
82 crateKeyColumns.push_back(
"WEDGE_CRATE_3" ) ;
83 crateKeyColumns.push_back(
"WEDGE_CRATE_4" ) ;
84 crateKeyColumns.push_back(
"WEDGE_CRATE_5" ) ;
85 crateKeyColumns.push_back(
"WEDGE_CRATE_6" ) ;
98 <<
"Problem with L1MuDTTFParameters key " << objectKey ;
99 return std::unique_ptr< L1MuDTTFParameters >() ;
104 for(
int icrate = 0 ; icrate < 6 ; ++icrate )
106 crateKeyResults.
fillVariable( crateKeyColumns[ icrate ],
107 crateKeys[ icrate ] ) ;
108 std::cout <<
"Crate " << icrate <<
" key " 109 << crateKeys[ icrate ] << std::endl ;
114 "R",
"L",
"R",
"L",
"L",
"R",
"L",
"R",
"R",
"L",
"R",
"L" } ;
117 int crateNumbers[ 12 ] = { 3, 3, 4, 4, 5, 5, 2, 2, 1, 1, 0, 0 } ;
120 int wheelNumbers[ 6 ] = { -3, -2, -1, 1, 2, 3 } ;
123 std::string wheelNames[ 6 ] = {
"N2",
"N1",
"N0",
"P0",
"P1",
"P2" } ;
126 std::vector< std::string > phtfMaskColumns ;
127 phtfMaskColumns.push_back(
"INREC_QUAL_ST1" ) ;
128 phtfMaskColumns.push_back(
"INREC_QUAL_ST2" ) ;
129 phtfMaskColumns.push_back(
"INREC_QUAL_ST3" ) ;
130 phtfMaskColumns.push_back(
"INREC_QUAL_ST4" ) ;
131 phtfMaskColumns.push_back(
"SOC_QUAL_CSC" ) ;
132 phtfMaskColumns.push_back(
"SOC_STDIS_N" ) ;
133 phtfMaskColumns.push_back(
"SOC_STDIS_WL" ) ;
134 phtfMaskColumns.push_back(
"SOC_STDIS_WR" ) ;
135 phtfMaskColumns.push_back(
"SOC_STDIS_ZL" ) ;
136 phtfMaskColumns.push_back(
"SOC_STDIS_ZR" ) ;
137 phtfMaskColumns.push_back(
"SOC_QCUT_ST1" ) ;
138 phtfMaskColumns.push_back(
"SOC_QCUT_ST2" ) ;
139 phtfMaskColumns.push_back(
"SOC_QCUT_ST4" ) ;
140 phtfMaskColumns.push_back(
"SOC_RUN_21" ) ;
141 phtfMaskColumns.push_back(
"SOC_NBX_DEL" ) ;
142 phtfMaskColumns.push_back(
"SOC_CSC_ETACANC" ) ;
143 phtfMaskColumns.push_back(
"SOC_OPENLUT_EXTR" ) ;
146 for(
int isc = 0 ; isc < 12 ; ++isc )
148 int crateNumber = crateNumbers[ isc ] ;
149 std::cout <<
"isc " << isc <<
" icr " << crateNumber << std::endl ;
152 for(
int iwh = 0 ; iwh < 6 ; ++iwh )
155 sectorNames[ isc ] + wheelNames[ iwh ] ;
157 int nwh = wheelNumbers[ iwh ] ;
161 if( crateKeyResults.
fillVariable( crateKeyColumns[ crateNumber ],
165 std::vector< std::string > phtfKeyColumns ;
166 phtfKeyColumns.push_back(
"PHTF_" + sectorWheelName ) ;
172 "WEDGE_CRATE_CONF.ID",
174 crateKeyColumns[ crateNumber ] ) ;
180 <<
"Problem with WEDGE_CRATE_CONF key." ;
181 return std::unique_ptr< L1MuDTTFParameters >() ;
187 std::cout <<
"PHTF key " << dummy << std::endl ;
200 <<
"Problem with PHTF_CONF key." ;
201 return std::unique_ptr< L1MuDTTFParameters >() ;
208 pDTTFParameters->set_inrec_qual_st1( nwh, isc, tmp ) ;
211 pDTTFParameters->set_inrec_qual_st2( nwh, isc, tmp ) ;
214 pDTTFParameters->set_inrec_qual_st3( nwh, isc, tmp ) ;
216 std::cout <<
" INREC_QUAL_ST4 " << tmp << std::endl ;
217 pDTTFParameters->set_inrec_qual_st4( nwh, isc, tmp ) ;
218 std::cout <<
" SOC_QUAL_CSC " << tmp << std::endl ;
219 pDTTFParameters->set_soc_qual_csc( nwh, isc, tmp ) ;
223 pDTTFParameters->set_soc_stdis_n( nwh, isc, tmp ) ;
226 pDTTFParameters->set_soc_stdis_wl( nwh, isc, tmp ) ;
229 pDTTFParameters->set_soc_stdis_wr( nwh, isc, tmp ) ;
232 pDTTFParameters->set_soc_stdis_zl( nwh, isc, tmp ) ;
234 std::cout <<
" SOC_STDIS_ZR " << tmp << std::endl ;
235 pDTTFParameters->set_soc_stdis_zr( nwh, isc, tmp ) ;
239 pDTTFParameters->set_soc_qcut_st1( nwh, isc, tmp ) ;
242 pDTTFParameters->set_soc_qcut_st2( nwh, isc, tmp ) ;
244 std::cout <<
" SOC_QCUT_ST4 " << tmp << std::endl ;
245 pDTTFParameters->set_soc_qcut_st4( nwh, isc, tmp ) ;
249 pDTTFParameters->set_soc_run_21( nwh, isc, tmp ) ;
252 pDTTFParameters->set_soc_nbx_del( nwh, isc, tmp ) ;
253 phtfMaskResults.
fillVariable(
"SOC_CSC_ETACANC", tmp ) ;
255 pDTTFParameters->set_soc_csc_etacanc( nwh, isc, tmp ) ;
256 phtfMaskResults.
fillVariable(
"SOC_OPENLUT_EXTR", tmp ) ;
257 std::cout <<
" SOC_OPENLUT_EXTR " << tmp << std::endl ;
258 pDTTFParameters->set_soc_openlut_extr( nwh, isc, tmp ) ;
264 return pDTTFParameters ;
bool fillVariable(const std::string &columnName, T &outputVariable) const
const QueryResults singleAttribute(const T &data) const
DTTFParametersOnlineProd(const edm::ParameterSet &)
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)
~DTTFParametersOnlineProd() override
std::unique_ptr< L1MuDTTFParameters > newObject(const std::string &objectKey) override
std::vector< std::vector< double > > tmp