237 if(ctpFiles.id() <= 0 || ctpFiles.smxId() <= 0) {
238 int l1id = ctpFiles.lvl1MasterTableId();
240 if(ctpFiles.id() <= 0) {
242 ctpFiles.setId(filesid);
244 if(ctpFiles.smxId() <= 0) {
246 ctpFiles.setSmxId(
id);
251 unique_ptr<coral::IQuery>
query(
m_session.nominalSchema().tableHandle(
"L1_CTP_FILES").newQuery() );
252 query->setRowCacheSize( 13 );
256 std::string
condition =
"L1CF_ID = :fId";
257 emptyBindVariableList0.extend<
long>(
"fId");
258 emptyBindVariableList0[0].data<
long>() = ctpFiles.id();
262 attList.extend<std::string>(
"L1CF_NAME" );
263 attList.extend<
int>(
"L1CF_VERSION" );
264 attList.extend<std::string>(
"L1CF_MON_SEL_SLOT7" );
265 attList.extend<std::string>(
"L1CF_MON_SEL_SLOT8" );
266 attList.extend<std::string>(
"L1CF_MON_SEL_SLOT9" );
267 attList.extend<std::string>(
"L1CF_MON_DEC_SLOT7" );
268 attList.extend<std::string>(
"L1CF_MON_DEC_SLOT8" );
269 attList.extend<std::string>(
"L1CF_MON_DEC_SLOT9" );
274 TRG_MSG_ERROR(
"No such L1_CTP_Files exists " << ctpFiles.id());
276 throw std::runtime_error(
"CTPFilesLoader >> CTPFiles not available" );
280 std::string
name =
row[
"L1CF_NAME"].data<std::string>();
281 int version =
row[
"L1CF_VERSION"].data<
int>();
282 std::string strMonSel7 =
row[
"L1CF_MON_SEL_SLOT7"].data<std::string>();
283 std::string strMonSel8 =
row[
"L1CF_MON_SEL_SLOT8"].data<std::string>();
284 std::string strMonSel9 =
row[
"L1CF_MON_SEL_SLOT9"].data<std::string>();
285 std::string strMonDec7 =
row[
"L1CF_MON_DEC_SLOT7"].data<std::string>();
286 std::string strMonDec8 =
row[
"L1CF_MON_DEC_SLOT8"].data<std::string>();
287 std::string strMonDec9 =
row[
"L1CF_MON_DEC_SLOT9"].data<std::string>();
290 TRG_MSG_ERROR(
"More than one GetFile exists " << ctpFiles.id());
292 throw std::runtime_error(
"CTPFilesLoader >> CTPFiles not available" );
295 std::vector<u_int> monDecSlot7(CTPFiles::ALL_CTPINMONDEC_SIZE);
296 TRG_MSG_INFO(
"Loading MON Slot7 of size " << monDecSlot7.size());
298 std::vector<u_int> monDecSlot8(CTPFiles::ALL_CTPINMONDEC_SIZE);
299 TRG_MSG_INFO(
"Loading MON Slot8 of size " << monDecSlot8.size());
301 std::vector<u_int> monDecSlot9(CTPFiles::ALL_CTPINMONDEC_SIZE);
302 TRG_MSG_INFO(
"Loading MON Slot9 of size " << monDecSlot9.size());
305 std::vector<u_int> monSelSlot7(CTPFiles::ALL_CTPINMONSEL_SIZE);
306 TRG_MSG_INFO(
"Loading MON SEL Slot7 of size " << monSelSlot7.size());
308 std::vector<u_int> monSelSlot8(CTPFiles::ALL_CTPINMONSEL_SIZE);
309 TRG_MSG_INFO(
"Loading MON SEL Slot8 of size " << monSelSlot8.size());
311 std::vector<u_int> monSelSlot9(CTPFiles::ALL_CTPINMONSEL_SIZE);
312 TRG_MSG_INFO(
"Loading MON SEL Slot9 of size " << monSelSlot9.size());
316 ctpFiles.setName(
name );
317 ctpFiles.setVersion(
version );
318 ctpFiles.setCtpinMonDecoderSlot7(monDecSlot7);
319 ctpFiles.setCtpinMonDecoderSlot8(monDecSlot8);
320 ctpFiles.setCtpinMonDecoderSlot9(monDecSlot9);
321 ctpFiles.setCtpinMonSelectorSlot7(monSelSlot7);
322 ctpFiles.setCtpinMonSelectorSlot8(monSelSlot8);
323 ctpFiles.setCtpinMonSelectorSlot9(monSelSlot9);
327 unique_ptr<coral::IQuery>
query(
m_session.nominalSchema().tableHandle(
"L1_CTP_SMX").newQuery() );
328 query->setRowCacheSize( 13 );
332 std::string
condition =
"L1SMX_ID = :sId";
333 emptyBindVariableList0.extend<
long>(
"sId");
334 emptyBindVariableList0[0].data<
long>() = ctpFiles.smxId();
338 attList.extend<std::string>(
"L1SMX_NAME" );
339 attList.extend<std::string>(
"L1SMX_OUTPUT" );
340 attList.extend<std::string>(
"L1SMX_VHDL_SLOT7" );
341 attList.extend<std::string>(
"L1SMX_VHDL_SLOT8" );
342 attList.extend<std::string>(
"L1SMX_VHDL_SLOT9" );
343 attList.extend<std::string>(
"L1SMX_SVFI_SLOT7" );
344 attList.extend<std::string>(
"L1SMX_SVFI_SLOT8" );
345 attList.extend<std::string>(
"L1SMX_SVFI_SLOT9" );
350 TRG_MSG_ERROR(
"No such L1_CTP_SMX entry " << ctpFiles.smxId() <<
" exists");
352 throw std::runtime_error(
"CTPFilesLoader >> CTPFiles not available" );
356 ctpFiles.setSmxName(
row[
"L1SMX_NAME"].data<std::string>());
357 ctpFiles.setCtpinSmxOutput(
row[
"L1SMX_OUTPUT"].data<std::string>());
359 ctpFiles.setCtpinSmxVhdlSlot7(
row[
"L1SMX_VHDL_SLOT7"].data<std::string>());
360 ctpFiles.setCtpinSmxVhdlSlot8(
row[
"L1SMX_VHDL_SLOT8"].data<std::string>());
361 ctpFiles.setCtpinSmxVhdlSlot9(
row[
"L1SMX_VHDL_SLOT9"].data<std::string>());
362 ctpFiles.setCtpinSmxSvfiSlot7(
row[
"L1SMX_SVFI_SLOT7"].data<std::string>());
363 ctpFiles.setCtpinSmxSvfiSlot8(
row[
"L1SMX_SVFI_SLOT8"].data<std::string>());
364 ctpFiles.setCtpinSmxSvfiSlot9(
row[
"L1SMX_SVFI_SLOT9"].data<std::string>());
369 catch(
const coral::Exception&
e ) {