39 virtual boost::shared_ptr< L1MuDTTFParameters >
newObject(
69 boost::shared_ptr< L1MuDTTFParameters >
72 using namespace edm::es;
74 boost::shared_ptr< L1MuDTTFParameters > pDTTFParameters(
77 pDTTFParameters->reset() ;
82 std::vector< std::string > crateKeyColumns ;
83 crateKeyColumns.push_back(
"WEDGE_CRATE_1" ) ;
84 crateKeyColumns.push_back(
"WEDGE_CRATE_2" ) ;
85 crateKeyColumns.push_back(
"WEDGE_CRATE_3" ) ;
86 crateKeyColumns.push_back(
"WEDGE_CRATE_4" ) ;
87 crateKeyColumns.push_back(
"WEDGE_CRATE_5" ) ;
88 crateKeyColumns.push_back(
"WEDGE_CRATE_6" ) ;
97 if( crateKeyResults.queryFailed() ||
98 crateKeyResults.numberRows() != 1 )
101 <<
"Problem with L1MuDTTFParameters key " << objectKey ;
102 return boost::shared_ptr< L1MuDTTFParameters >() ;
107 for(
int icrate = 0 ; icrate < 6 ; ++icrate )
109 crateKeyResults.fillVariable( crateKeyColumns[ icrate ],
110 crateKeys[ icrate ] ) ;
111 std::cout <<
"Crate " << icrate <<
" key "
112 << crateKeys[ icrate ] << std::endl ;
117 "R",
"L",
"R",
"L",
"L",
"R",
"L",
"R",
"R",
"L",
"R",
"L" } ;
120 int crateNumbers[ 12 ] = { 3, 3, 4, 4, 5, 5, 2, 2, 1, 1, 0, 0 } ;
123 int wheelNumbers[ 6 ] = { -3, -2, -1, 1, 2, 3 } ;
126 std::string wheelNames[ 6 ] = {
"N2",
"N1",
"N0",
"P0",
"P1",
"P2" } ;
129 std::vector< std::string > phtfMaskColumns ;
130 phtfMaskColumns.push_back(
"INREC_QUAL_ST1" ) ;
131 phtfMaskColumns.push_back(
"INREC_QUAL_ST2" ) ;
132 phtfMaskColumns.push_back(
"INREC_QUAL_ST3" ) ;
133 phtfMaskColumns.push_back(
"INREC_QUAL_ST4" ) ;
134 phtfMaskColumns.push_back(
"SOC_QUAL_CSC" ) ;
135 phtfMaskColumns.push_back(
"SOC_STDIS_N" ) ;
136 phtfMaskColumns.push_back(
"SOC_STDIS_WL" ) ;
137 phtfMaskColumns.push_back(
"SOC_STDIS_WR" ) ;
138 phtfMaskColumns.push_back(
"SOC_STDIS_ZL" ) ;
139 phtfMaskColumns.push_back(
"SOC_STDIS_ZR" ) ;
140 phtfMaskColumns.push_back(
"SOC_QCUT_ST1" ) ;
141 phtfMaskColumns.push_back(
"SOC_QCUT_ST2" ) ;
142 phtfMaskColumns.push_back(
"SOC_QCUT_ST4" ) ;
143 phtfMaskColumns.push_back(
"SOC_RUN_21" ) ;
144 phtfMaskColumns.push_back(
"SOC_NBX_DEL" ) ;
145 phtfMaskColumns.push_back(
"SOC_CSC_ETACANC" ) ;
146 phtfMaskColumns.push_back(
"SOC_OPENLUT_EXTR" ) ;
149 for(
int isc = 0 ; isc < 12 ; ++isc )
151 int crateNumber = crateNumbers[ isc ] ;
152 std::cout <<
"isc " << isc <<
" icr " << crateNumber << std::endl ;
155 for(
int iwh = 0 ; iwh < 6 ; ++iwh )
158 sectorNames[ isc ] + wheelNames[ iwh ] ;
160 int nwh = wheelNumbers[ iwh ] ;
164 if( crateKeyResults.fillVariable( crateKeyColumns[ crateNumber ],
168 std::vector< std::string > phtfKeyColumns ;
169 phtfKeyColumns.push_back(
"PHTF_" + sectorWheelName ) ;
175 "WEDGE_CRATE_CONF.ID",
177 crateKeyColumns[ crateNumber ] ) ;
183 <<
"Problem with WEDGE_CRATE_CONF key." ;
184 return boost::shared_ptr< L1MuDTTFParameters >() ;
190 std::cout <<
"PHTF key " << dummy << std::endl ;
203 <<
"Problem with PHTF_CONF key." ;
204 return boost::shared_ptr< L1MuDTTFParameters >() ;
211 pDTTFParameters->set_inrec_qual_st1( nwh, isc, tmp ) ;
214 pDTTFParameters->set_inrec_qual_st2( nwh, isc, tmp ) ;
217 pDTTFParameters->set_inrec_qual_st3( nwh, isc, tmp ) ;
219 std::cout <<
" INREC_QUAL_ST4 " << tmp << std::endl ;
220 pDTTFParameters->set_inrec_qual_st4( nwh, isc, tmp ) ;
221 std::cout <<
" SOC_QUAL_CSC " << tmp << std::endl ;
222 pDTTFParameters->set_soc_qual_csc( nwh, isc, tmp ) ;
226 pDTTFParameters->set_soc_stdis_n( nwh, isc, tmp ) ;
229 pDTTFParameters->set_soc_stdis_wl( nwh, isc, tmp ) ;
232 pDTTFParameters->set_soc_stdis_wr( nwh, isc, tmp ) ;
235 pDTTFParameters->set_soc_stdis_zl( nwh, isc, tmp ) ;
237 std::cout <<
" SOC_STDIS_ZR " << tmp << std::endl ;
238 pDTTFParameters->set_soc_stdis_zr( nwh, isc, tmp ) ;
242 pDTTFParameters->set_soc_qcut_st1( nwh, isc, tmp ) ;
245 pDTTFParameters->set_soc_qcut_st2( nwh, isc, tmp ) ;
247 std::cout <<
" SOC_QCUT_ST4 " << tmp << std::endl ;
248 pDTTFParameters->set_soc_qcut_st4( nwh, isc, tmp ) ;
252 pDTTFParameters->set_soc_run_21( nwh, isc, tmp ) ;
255 pDTTFParameters->set_soc_nbx_del( nwh, isc, tmp ) ;
256 phtfMaskResults.
fillVariable(
"SOC_CSC_ETACANC", tmp ) ;
258 pDTTFParameters->set_soc_csc_etacanc( nwh, isc, tmp ) ;
259 phtfMaskResults.
fillVariable(
"SOC_OPENLUT_EXTR", tmp ) ;
260 std::cout <<
" SOC_OPENLUT_EXTR " << tmp << std::endl ;
261 pDTTFParameters->set_soc_openlut_extr( nwh, isc, tmp ) ;
267 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="") const
l1t::OMDSReader m_omdsReader
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
std::vector< std::vector< double > > tmp
~DTTFParametersOnlineProd()
virtual boost::shared_ptr< L1MuDTTFParameters > newObject(const std::string &objectKey) override