ATLAS Offline Software
TrigDBCTPFilesLoader.cxx
Go to the documentation of this file.
1 // Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 #include "./TrigDBHelper.h"
6 #include <iterator>
7 
8 TrigConf::TrigDBCTPFilesLoader::TrigDBCTPFilesLoader(const std::string & connection) :
9  TrigDBLoader("TrigDBCTPFilesLoader", connection)
10 {
11  // CTP and MUCTPI hardware files only exist for schema versions >= 3
12 
13  { // links to file tables
14  auto & q = m_link_queries[3];
15  // tables
16  q.addToTableList ( "SUPER_MASTER_TABLE", "SMT" );
17  q.addToTableList ( "L1_MENU", "L1TM" );
18  // bind vars
19  q.extendBinding<unsigned int>("smk");
20  // conditions
21  q.extendCondition("SMT.SMT_ID = :smk AND SMT.SMT_L1_MENU_ID = L1TM.L1TM_ID");
22  // attributes
23  q.extendOutput<unsigned int>( "L1TM.L1TM_CTP_FILES_ID");
24  q.extendOutput<unsigned int>( "L1TM.L1TM_CTP_SMX_ID");
25  q.extendOutput<unsigned int>( "L1TM.L1TM_MUCTPI_FILES_ID");
26  q.extendOutput<unsigned int>( "L1TM.L1TM_TMC_SIGNALS_ID");
27  }
28 
29  { // ctp files
30  auto & q = m_ctpfiles_queries[3];
31  // tables
32  q.addToTableList ( "L1_CTP_FILES" );
33  // bind vars
34  q.extendBinding<unsigned int>("id");
35  // conditions
36  q.extendCondition("L1CF_ID = :id");
37  // attributes
38  q.extendOutput<coral::Blob>( "L1CF_LUT" );
39  q.extendOutput<coral::Blob>( "L1CF_CAM" );
40  q.extendOutput<coral::Blob>( "L1CF_MON_SEL_SLOT7" );
41  q.extendOutput<coral::Blob>( "L1CF_MON_SEL_SLOT8" );
42  q.extendOutput<coral::Blob>( "L1CF_MON_SEL_SLOT9" );
43  q.extendOutput<coral::Blob>( "L1CF_MON_SEL_CTPMON" );
44  q.extendOutput<coral::Blob>( "L1CF_MON_DEC_SLOT7" );
45  q.extendOutput<coral::Blob>( "L1CF_MON_DEC_SLOT8" );
46  q.extendOutput<coral::Blob>( "L1CF_MON_DEC_SLOT9" );
47  q.extendOutput<coral::Blob>( "L1CF_MON_DEC_CTPMON" );
48  q.extendOutput<coral::Blob>( "L1CF_MON_DMX" );
49  }
50 
51  {
52  // ctp files >= v6
53  // in version 6 this field (ctp core switchmatrix) was added
54  auto q = m_ctpfiles_queries[3];
55  q.extendOutput<coral::Blob>( "L1CF_SMX" );
56  m_ctpfiles_queries[6] = q;
57  }
58 
59  { // ctp smx
60  auto & q = m_ctpsmx_queries[3];
61  // tables
62  q.addToTableList ( "L1_CTP_SMX" );
63  // bind vars
64  q.extendBinding<unsigned int>("id");
65  // conditions
66  q.extendCondition("L1SMX_ID = :id");
67  // attributes
68  q.extendOutput<coral::Blob>( "L1SMX_OUTPUT" );
69  q.extendOutput<coral::Blob>( "L1SMX_VHDL_SLOT7" );
70  q.extendOutput<coral::Blob>( "L1SMX_VHDL_SLOT8" );
71  q.extendOutput<coral::Blob>( "L1SMX_VHDL_SLOT9" );
72  q.extendOutput<coral::Blob>( "L1SMX_SVFI_SLOT7" );
73  q.extendOutput<coral::Blob>( "L1SMX_SVFI_SLOT8" );
74  q.extendOutput<coral::Blob>( "L1SMX_SVFI_SLOT9" );
75  }
76 
77  { // muctpi
78  auto & q = m_muctpi_queries[3];
79  // tables
80  q.addToTableList ( "L1_MUCTPI_FILES" );
81  // bind vars
82  q.extendBinding<unsigned int>("id");
83  // conditions
84  q.extendCondition("L1MF_ID = :id");
85  // attributes
86  q.extendOutput<coral::Blob>( "L1MF_DATA" );
87  }
88 
89  { // tmc
90  auto & q = m_tmcsig_queries[3];
91  // tables
92  q.addToTableList ( "L1_TMC_SIGNALS" );
93  // bind vars
94  q.extendBinding<unsigned int>("id");
95  // conditions
96  q.extendCondition("L1TMC_ID = :id");
97  // attributes
98  q.extendOutput<coral::Blob>( "L1TMC_DATA" );
99  }
100 }
101 
102 // Destructor defined here because QueryDefinition is an incomplete type in the header
104 
105 bool
107  TrigConf::L1CTPFiles & ctpfiles,
108  uint8_t loadMask,
109  const std::string & /*outFileName*/ ) const
110 {
111  unsigned int ctpFilesID{0};
112  unsigned int ctpSmxID{0};
113  unsigned int muctpiID{0};
114  unsigned int tmcSignalsID{0};
115 
116  auto session = createDBSession();
117  session->transaction().start( /*bool readonly=*/ true);
118  const size_t sv = schemaVersion(session.get());
119  try {
120  QueryDefinition qdef = getQueryDefinition(sv, m_link_queries);
121  qdef.setBoundValue<unsigned int>("smk", smk);
122  auto q = qdef.createQuery( session.get() );
123  auto & cursor = q->execute();
124  if ( ! cursor.next() ) {
125  TRG_MSG_ERROR("Tried reading L1 CTPFiles, but super master key " << smk << " is not available" );
126  throw TrigConf::NoSMKException("TrigDBCTPFilesLoader: super master key " + std::to_string(smk) + " not available");
127  }
128  const coral::AttributeList& row = cursor.currentRow();
129  try {
130  ctpFilesID = row["L1TM.L1TM_CTP_FILES_ID"].data<unsigned int>();
131  }
132  catch(const coral::AttributeException & e) // NULL content
133  {}
134  try {
135  ctpSmxID = row["L1TM.L1TM_CTP_SMX_ID"].data<unsigned int>();
136  }
137  catch(const coral::AttributeException & e) // NULL content
138  {}
139  try {
140  muctpiID = row["L1TM.L1TM_MUCTPI_FILES_ID"].data<unsigned int>();
141  }
142  catch(const coral::AttributeException & e) // NULL content
143  {}
144  try {
145  tmcSignalsID = row["L1TM.L1TM_TMC_SIGNALS_ID"].data<unsigned int>();
146  }
147  catch(const coral::AttributeException & e) // NULL content
148  {}
149 
150  TRG_MSG_INFO("ID of table L1_CTP_FILES : " << ctpFilesID);
151  TRG_MSG_INFO("ID of table L1_CTP_SMX : " << ctpSmxID);
152  TRG_MSG_INFO("ID of table L1_MUCTPI_FILES : " << muctpiID);
153  TRG_MSG_INFO("ID of table L1_TMC_SIGNALS : " << tmcSignalsID);
154  }
155  catch(coral::QueryException & ex) {
156  TRG_MSG_ERROR("When reading the files table links for super master key " << smk << " a coral::QueryException was caught ( " << ex.what() <<" )" );
157  throw TrigConf::QueryException("TrigDBCTPFilesLoader: " + std::string(ex.what()));
158  }
159 
160  if(ctpFilesID>0 && (loadMask & 0x01)!=0 ) {
161  QueryDefinition qdef = getQueryDefinition(sv, m_ctpfiles_queries);
162  qdef.setBoundValue<unsigned int>("id", ctpFilesID);
163  loadCTPFiles(ctpfiles, qdef.createQuery( session.get() ), sv );
164  }
165 
166  if(ctpSmxID>0 && (loadMask & 0x02)!=0) {
167  QueryDefinition qdef = getQueryDefinition(sv, m_ctpsmx_queries);
168  qdef.setBoundValue<unsigned int>("id", ctpSmxID);
169  loadCTPSMX(ctpfiles, qdef.createQuery( session.get() ), sv );
170  }
171 
172  if(tmcSignalsID>0 && (loadMask & 0x04)!=0) {
173  QueryDefinition qdef = getQueryDefinition(sv, m_tmcsig_queries);
174  qdef.setBoundValue<unsigned int>("id", tmcSignalsID);
175  loadTMC(ctpfiles, qdef.createQuery( session.get() ), sv );
176  }
177 
178  if(muctpiID>0 && (loadMask & 0x08)!=0) {
179  QueryDefinition qdef = getQueryDefinition(sv, m_muctpi_queries);
180  qdef.setBoundValue<unsigned int>("id", muctpiID);
181  loadMUCTPI(ctpfiles, qdef.createQuery( session.get() ), sv );
182  }
183  return true;
184 }
185 
186 
187 void
188 TrigConf::TrigDBCTPFilesLoader::loadCTPFiles(L1CTPFiles & ctpfiles, std::unique_ptr<coral::IQuery> query, size_t schemaVersion) const
189 {
190  TRG_MSG_INFO("Loading data from table L1_CTP_FILES.");
191  try
192  {
193  auto & cursor = query->execute();
194  cursor.next();
195  const coral::AttributeList& row = cursor.currentRow();
196  {
197  ctpfiles.set_Ctpcore_LUT(
198  loadDBFieldIntoVector(row, "L1CF_LUT", L1CTPFiles::CTPCORE_LUT_SIZE)
199  );
200  }
201  {
202  ctpfiles.set_Ctpcore_CAM(
203  loadDBFieldIntoVector(row, "L1CF_CAM", L1CTPFiles::CTPCORE_CAM_SIZE)
204  );
205  }
206  if(schemaVersion>=6) {
207  ctpfiles.set_Ctpcore_SMX(
208  loadDBFieldIntoVector(row, "L1CF_SMX", L1CTPFiles::CTPCORE_SMX_SIZE)
209  );
210  }
211 
212  {
214  loadDBFieldIntoVector(row, "L1CF_MON_SEL_SLOT7", L1CTPFiles::CTPIN_MONSEL_SIZE)
215  );
216  }
217  {
219  loadDBFieldIntoVector(row, "L1CF_MON_SEL_SLOT8", L1CTPFiles::CTPIN_MONSEL_SIZE)
220  );
221  }
222  {
224  loadDBFieldIntoVector(row, "L1CF_MON_SEL_SLOT9", L1CTPFiles::CTPIN_MONSEL_SIZE)
225  );
226  }
227  {
229  loadDBFieldIntoVector(row, "L1CF_MON_DEC_SLOT7", L1CTPFiles::CTPIN_MONDEC_SIZE)
230  );
231  }
232  {
234  loadDBFieldIntoVector(row, "L1CF_MON_DEC_SLOT8", L1CTPFiles::CTPIN_MONDEC_SIZE)
235  );
236  }
237  {
239  loadDBFieldIntoVector(row, "L1CF_MON_DEC_SLOT9", L1CTPFiles::CTPIN_MONDEC_SIZE)
240  );
241  }
242  {
243  ctpfiles.set_Ctpmon_MonSelector(
244  loadDBFieldIntoVector(row, "L1CF_MON_SEL_CTPMON", L1CTPFiles::CTPMON_SELECTOR_SIZE)
245  );
246  }
247  {
248  ctpfiles.set_Ctpmon_MonDecoder(
249  loadDBFieldIntoVector(row, "L1CF_MON_DEC_CTPMON", L1CTPFiles::CTPMON_DECODER_SIZE)
250  );
251  }
252  {
253  ctpfiles.set_Ctpmon_DMX(
254  loadDBFieldIntoVector(row, "L1CF_MON_DMX", L1CTPFiles::CTPMON_DMX_SIZE)
255  );
256  }
257  ctpfiles.set_HasCompleteCtpData(true);
258  }
259  catch(coral::QueryException & ex) {
260  TRG_MSG_ERROR("When reading the L1CTPFiles a coral::QueryException was caught ( " << ex.what() <<" )" );
261  throw TrigConf::QueryException("TrigDBCTPFilesLoader: " + std::string(ex.what()));
262  }
263 }
264 
265 void
266 TrigConf::TrigDBCTPFilesLoader::loadCTPSMX(L1CTPFiles & ctpfiles, std::unique_ptr<coral::IQuery> query, size_t) const {
267  TRG_MSG_INFO("Loading data from table L1_CTP_SMX");
268  try
269  {
270  auto & cursor = query->execute();
271  cursor.next();
272  const coral::AttributeList& row = cursor.currentRow();
273 
274  ctpfiles.set_Smx_Output( loadDBFieldIntoString(row, "L1SMX_OUTPUT") );
275  ctpfiles.set_Smx_Vhdl_Slot7( loadDBFieldIntoString(row, "L1SMX_VHDL_SLOT7") );
276  ctpfiles.set_Smx_Vhdl_Slot8( loadDBFieldIntoString(row, "L1SMX_VHDL_SLOT8") );
277  ctpfiles.set_Smx_Vhdl_Slot9( loadDBFieldIntoString(row, "L1SMX_VHDL_SLOT9") );
278  ctpfiles.set_Smx_Svfi_Slot7( loadDBFieldIntoString(row, "L1SMX_SVFI_SLOT7") );
279  ctpfiles.set_Smx_Svfi_Slot8( loadDBFieldIntoString(row, "L1SMX_SVFI_SLOT8") );
280  ctpfiles.set_Smx_Svfi_Slot9( loadDBFieldIntoString(row, "L1SMX_SVFI_SLOT9") );
281  ctpfiles.set_HasCompleteSmxData(true);
282  }
283  catch(coral::QueryException & ex) {
284  TRG_MSG_ERROR("When reading the L1CTPFiles a coral::QueryException was caught ( " << ex.what() <<" )" );
285  throw TrigConf::QueryException("TrigDBCTPFilesLoader: " + std::string(ex.what()));
286  }
287 }
288 
289 void
290 TrigConf::TrigDBCTPFilesLoader::loadMUCTPI(L1CTPFiles & ctpfiles, std::unique_ptr<coral::IQuery> query, size_t) const {
291  TRG_MSG_INFO("Loading data from table L1_MUCTPI_FILES");
292 
293  bool incomplete = false;
295  try
296  {
297  auto & cursor = query->execute();
298  cursor.next();
299  const coral::AttributeList& row = cursor.currentRow();
300  const coral::Blob & blob = row["L1MF_DATA"].data<coral::Blob>();
301  blobToPtree(blob, pt);
302  }
303  catch(coral::QueryException & ex) {
304  TRG_MSG_ERROR("When reading the L1CTPFiles a coral::QueryException was caught ( " << ex.what() <<" )" );
305  throw TrigConf::QueryException("TrigDBCTPFilesLoader: " + std::string(ex.what()));
306  }
307  DataStructure ds("L1_MUCTPI_FILES", std::move(pt));
308  std::vector<std::string> keys = ds.getKeys();
310  if( auto dv = ds.getList_optional(L1CTPFiles::s_keyMap.at(k)) ) {
311  keys.erase( std::find(keys.begin(), keys.end(), L1CTPFiles::s_keyMap.at(k)) );
312  std::vector<uint32_t> v;
313  v.reserve(200);
314  for( auto x : *dv ) {
315  v.push_back(std::stoul(x.getValue<std::string>(), nullptr, 0));
316  }
317  ctpfiles.set_Muctpi(k, std::move(v));
318  } else {
319  incomplete = true;
320  }
321  }
322  for(const std::string & k : keys) {
323  if(ds.isNull(k)) {
324  TRG_MSG_INFO("Attribute " << k << " has null-content");
325  incomplete = true;
326  continue;
327  }
328  auto sopt = ds.getAttribute_optional<std::string>(k);
329  if(k.compare(0, 6, "pt_lut") == 0) {
330  auto dv = ds.getList(k);
331  std::vector<uint32_t> v;
332  v.reserve(200);
333  for( auto x : dv ) {
334  v.push_back(std::stoul(x.getValue<std::string>(), nullptr, 0));
335  }
336  ctpfiles.set_Muctpi_Extra_Ptlut(k, std::move(v));
337  } else if(k=="multiplicities_nbits") {
338  auto dv = ds.getList(k);
339  std::vector<uint32_t> v;
340  for( auto x : dv ) {
341  v.push_back(std::stoul(x.getValue<std::string>(), nullptr, 0));
342  }
343  ctpfiles.set_Muctpi_Nbits(std::move(v));
344  }
345  }
347 }
348 
349 void
350 TrigConf::TrigDBCTPFilesLoader::loadTMC(L1CTPFiles & ctpfiles, std::unique_ptr<coral::IQuery> query, size_t) const {
351  TRG_MSG_INFO("Loading data from table L1_TMC_SIGNALS");
353  try
354  {
355  auto & cursor = query->execute();
356  cursor.next();
357  const coral::AttributeList& row = cursor.currentRow();
358  const coral::Blob & blob = row["L1TMC_DATA"].data<coral::Blob>();
359  blobToPtree(blob, pt);
360  }
361  catch(coral::QueryException & ex) {
362  TRG_MSG_ERROR("When reading the L1CTPFiles a coral::QueryException was caught ( " << ex.what() <<" )" );
363  throw TrigConf::QueryException("TrigDBCTPFilesLoader: " + std::string(ex.what()));
364  }
365 
366  DataStructure ds("L1_TMC", std::move(pt));
367 
368  // should always be the correct type
369  if( auto ft = ds.getAttribute<std::string>("filetype"); ft != "tmcresult" ) {
370  throw TrigConf::ParsingException("TrigDBCTPFilesLoader::loadTMC: json structure of unexpected file type found. Expected 'tmcresult', but found " + ft);
371  }
372 
373  // read the ctpcore inputs
374  if (auto dv = ds.getObject_optional("CTPCORE.TriggerInputs"))
375  {
376  std::vector<TrigConf::L1CTPFiles::CTPCoreInput> ctpcoreInputs;
377  for (const std::string &k : dv->getKeys())
378  {
379  const TrigConf::DataStructure &inp = dv->getObject(k);
380  const std::string &inputType = inp["type"];
382  if (inputType == "PIT")
383  {
385  }
386  else if (inputType == "DIR")
387  {
389  }
390  else if (inputType == "CTPX")
391  continue;
392  else
393  continue;
394  ctpcoreInputs.push_back(
396  inp.getAttribute<size_t>("number"), inp.getAttribute<std::string>("name"),
397  inp.getAttribute<size_t>("bit"), inp.getAttribute<size_t>("phase"),
398  inpEnum));
399  }
400  TRG_MSG_INFO("Loading ctpcore inputs " << ctpcoreInputs.size());
401  ctpfiles.set_Tmc_CtpcoreInputs(std::move(ctpcoreInputs));
402  }
403 
404  // read the ctpcore CTPX inputs
405  if (auto dv = ds.getObject_optional("CTPCORE.TriggerInputs"))
406  {
407  std::vector<TrigConf::L1CTPFiles::CTPCoreCTPXInput> ctpcoreCTPXInputs;
408  for (const std::string &k : dv->getKeys())
409  {
410  const TrigConf::DataStructure &inp = dv->getObject(k);
411  const std::string &inputType = inp["type"];
413  if (inputType == "CTPX")
414  {
416  }
417  else if (inputType == "PIT" || inputType == "DIR")
418  continue;
419  else
420  continue;
421  ctpcoreCTPXInputs.push_back(
423  inp.getAttribute<size_t>("number"), inp.getAttribute<std::string>("name"),
424  inp.getAttribute<size_t>("bit"),
425  inpEnum));
426  }
427  TRG_MSG_INFO("Loading ctpcore CTPX inputs " << ctpcoreCTPXInputs.size());
428  ctpfiles.set_Tmc_CtpcoreCTPXInputs(std::move(ctpcoreCTPXInputs));
429  }
430 
431  // read the ctpin map
432  std::vector<TrigConf::L1CTPFiles::CTPInCounter> ctpinCounters;
433  for (size_t slot : {7, 8, 9})
434  {
435  for (size_t conn : {0, 1, 2, 3})
436  {
437  std::string path = "CTPINs.SLOT" + std::to_string(slot) + ".Monitoring.Cables.CON" + std::to_string(conn);
438  if (auto dv = ds.getObject_optional(path))
439  {
440  if (auto ov = dv->getList_optional("outputs"))
441  {
442  for (const DataStructure &output : *ov)
443  {
444  ctpinCounters.push_back(
446  output.getAttribute<std::string>("TriggerCounter"), slot, conn, output.getAttribute<size_t>("number")));
447  }
448  }
449  }
450  }
451  }
452  TRG_MSG_INFO("Loading ctpin counters " << ctpinCounters.size());
453  ctpfiles.set_Tmc_CtpinCounters(std::move(ctpinCounters));
454 
455  // read the ctpmon map
456  std::vector<TrigConf::L1CTPFiles::CTPMonCounter> ctpmonCounters;
457  if( auto dv = ds.getObject_optional("CTPMON.Monitoring") ) {
458  if (auto ov = dv->getList_optional("outputs"))
459  {
460  for (const DataStructure &output : *ov)
461  {
462  ctpmonCounters.push_back(
464  output.getAttribute<std::string>("TriggerCounter"), output.getAttribute<size_t>("number")));
465  }
466  }
467  }
468  TRG_MSG_INFO("Loading ctpmon counters " << ctpmonCounters.size());
469  ctpfiles.set_Tmc_CtpmonCounters(std::move(ctpmonCounters));
470 
471  ctpfiles.set_Tmc_Data(std::move(ds));
472  ctpfiles.set_HasCompleteTmcData(true);
473 }
474 
475 std::vector<uint32_t>
477  std::vector<uint32_t> vec;
478  if(size>0) {
479  vec.reserve(size);
480  }
481  try {
482  TRG_MSG_INFO("Loading " << field << " of size (#words) " << size);
483  const coral::Blob& blob = row[field].data<coral::Blob>();
484  boost::iostreams::stream<boost::iostreams::array_source> stream(
485  static_cast<const char*> (blob.startingAddress()),
486  blob.size()
487  );
488  std::string word{""};
489  while(stream >> word) {
490  vec.push_back(std::stoul(word,nullptr, 0));
491  }
492  }
493  catch(const coral::AttributeException & e) {} // NULL content
494  // check the size if a positive size was requested
495  if(size > 0 && size != vec.size()) {
496  TRG_MSG_ERROR("File content from DB of size " << vec.size() << ", but expect " << size);
497  throw std::runtime_error( "CTPFilesLoader: file of unexpected size" );
498  }
499 
500  return vec;
501 }
502 
503 std::string
505  std::string result;
506  try {
507  const coral::Blob& blob = row[field].data<coral::Blob>();
508  boost::iostreams::stream<boost::iostreams::array_source> stream(
509  static_cast<const char*> (blob.startingAddress()),
510  blob.size()
511  );
512  result = std::string (
513  std::istreambuf_iterator<char>(stream.rdbuf()),
514  std::istreambuf_iterator<char>()
515  );
516  TRG_MSG_INFO("Loading " << field << " of size " << result.size());
517  }
518  catch(const coral::AttributeException & e) {} // NULL content
519  if(result.empty()) {
520  TRG_MSG_ERROR("Field " << field << " in DB is empty");
521  throw std::runtime_error( "CTPFilesLoader: field " + field + " in DB is empty" );
522  }
523  return result;
524 }
TrigDBCTPFilesLoader.h
Loader class for Trigger configuration (L1 hardware files) from the Trigger DB.
ReadFromCoolCompare.ov
ov
Definition: ReadFromCoolCompare.py:230
TRG_MSG_ERROR
#define TRG_MSG_ERROR(x)
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStreamMacros.h:29
query_example.row
row
Definition: query_example.py:24
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:257
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
TrigConf::L1CTPFiles::CTPCoreCTPXInput
Definition: L1CTPFiles.h:70
PlotCalibFromCool.ft
ft
Definition: PlotCalibFromCool.py:329
get_generator_info.result
result
Definition: get_generator_info.py:21
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
TrigConf::TrigDBCTPFilesLoader::loadTMC
void loadTMC(L1CTPFiles &ctpfiles, std::unique_ptr< coral::IQuery > query, size_t schemaVersion) const
Definition: TrigDBCTPFilesLoader.cxx:350
PlotCalibFromCool.dv
dv
Definition: PlotCalibFromCool.py:762
TrigConf::L1CTPFiles::set_Ctpin_MonSelector_Slot7
void set_Ctpin_MonSelector_Slot7(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:254
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
TrigConf::L1CTPFiles::set_Muctpi_Nbits
void set_Muctpi_Nbits(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:344
TrigConf::L1CTPFiles::set_Smx_Svfi_Slot7
void set_Smx_Svfi_Slot7(const std::string &data)
Definition: L1CTPFiles.cxx:319
TrigConf::L1CTPFiles::CTPMON_DECODER_SIZE
static const size_t CTPMON_DECODER_SIZE
Definition: L1CTPFiles.h:44
TrigConf::L1CTPFiles::set_Muctpi
void set_Muctpi(MuctpiAccess key, std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:334
RunEBWeightsComputation.smk
smk
Definition: RunEBWeightsComputation.py:87
TrigConf::TrigDBCTPFilesLoader::m_link_queries
std::map< size_t, QueryDefinition > m_link_queries
Definition: TrigDBCTPFilesLoader.h:66
TrigConf::L1CTPFiles::set_Smx_Vhdl_Slot9
void set_Smx_Vhdl_Slot9(const std::string &data)
Definition: L1CTPFiles.cxx:314
TrigConf::L1CTPFiles::set_Tmc_CtpinCounters
void set_Tmc_CtpinCounters(std::vector< TrigConf::L1CTPFiles::CTPInCounter > data)
Definition: L1CTPFiles.cxx:359
TrigConf::NoSMKException
Definition: Trigger/TrigConfiguration/TrigConfIO/TrigConfIO/Exceptions.h:31
TrigConf::L1CTPFiles::s_keyMap
static const std::map< MuctpiAccess, std::string > s_keyMap
Definition: L1CTPFiles.h:48
TrigConf::TrigDBCTPFilesLoader::m_muctpi_queries
std::map< size_t, QueryDefinition > m_muctpi_queries
Definition: TrigDBCTPFilesLoader.h:69
TrigConf::L1CTPFiles::CTPCoreCTPXInput::CTPX
@ CTPX
Definition: L1CTPFiles.h:72
TrigConf::TrigDBLoader
Loader of trigger configurations from Json files.
Definition: TrigDBLoader.h:33
test_pyathena.pt
pt
Definition: test_pyathena.py:11
TrigConf::L1CTPFiles::set_Tmc_Data
void set_Tmc_Data(DataStructure data)
Definition: L1CTPFiles.cxx:369
TrigConf::TrigDBCTPFilesLoader::TrigDBCTPFilesLoader
TrigDBCTPFilesLoader(const std::string &connection)
Constructor.
Definition: TrigDBCTPFilesLoader.cxx:8
TrigConf::DataStructure::getAttribute
T getAttribute(const std::string &key, bool ignoreIfMissing=false, const T &def=T()) const
Access to simple attribute.
Definition: DataStructure.h:152
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
TrigConf::TrigDBCTPFilesLoader::~TrigDBCTPFilesLoader
virtual ~TrigDBCTPFilesLoader() override
Destructor - cannot be defined here because QueryDefinition is an incomplete type.
TrigConf::L1CTPFiles::CTPCoreInput::NONE
@ NONE
Definition: L1CTPFiles.h:53
TrigConf::TrigDBCTPFilesLoader::m_tmcsig_queries
std::map< size_t, QueryDefinition > m_tmcsig_queries
Definition: TrigDBCTPFilesLoader.h:70
x
#define x
TrigConf::L1CTPFiles::set_HasCompleteTmcData
void set_HasCompleteTmcData(bool flag)
Definition: L1CTPFiles.cxx:234
TrigConf::QueryDefinition
Definition: TrigDBHelper.h:28
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
TrigConf::L1CTPFiles::CTPCORE_LUT_SIZE
static const size_t CTPCORE_LUT_SIZE
Definition: L1CTPFiles.h:34
TrigConf::L1CTPFiles::PtLutBarrel
@ PtLutBarrel
Definition: L1CTPFiles.h:47
TrigConf::L1CTPFiles::set_Smx_Vhdl_Slot7
void set_Smx_Vhdl_Slot7(const std::string &data)
Definition: L1CTPFiles.cxx:304
TrigConf::L1CTPFiles::set_Smx_Svfi_Slot9
void set_Smx_Svfi_Slot9(const std::string &data)
Definition: L1CTPFiles.cxx:329
TrigConf::L1CTPFiles
L1 menu configuration.
Definition: L1CTPFiles.h:29
TrigConf::L1CTPFiles::set_Ctpcore_LUT
void set_Ctpcore_LUT(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:239
TrigConf::QueryDefinition::setBoundValue
void setBoundValue(const std::string &fieldName, const T &value)
Definition: TrigDBHelper.h:75
query
Definition: query.py:1
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
CxxUtils::vec
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
Definition: vec.h:207
TrigConf::L1CTPFiles::CTPIN_MONDEC_SIZE
static const size_t CTPIN_MONDEC_SIZE
Definition: L1CTPFiles.h:39
TrigConf::L1CTPFiles::CTPInCounter
Definition: L1CTPFiles.h:86
jobOptions_CavernBackground.inputType
inputType
Definition: jobOptions_CavernBackground.py:21
TrigConf::L1CTPFiles::set_Ctpcore_CAM
void set_Ctpcore_CAM(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:244
TrigConf::L1CTPFiles::set_HasCompleteMuctpiData
void set_HasCompleteMuctpiData(bool flag)
Definition: L1CTPFiles.cxx:229
TrigConf::L1CTPFiles::CTPCoreInput::DIR
@ DIR
Definition: L1CTPFiles.h:53
TrigConf::L1CTPFiles::CTPMON_SELECTOR_SIZE
static const size_t CTPMON_SELECTOR_SIZE
Definition: L1CTPFiles.h:43
TrigConf::TrigDBCTPFilesLoader::loadDBFieldIntoString
std::string loadDBFieldIntoString(const coral::AttributeList &row, const std::string &field) const
Definition: TrigDBCTPFilesLoader.cxx:504
TrigConf::QueryDefinition::createQuery
std::unique_ptr< coral::IQuery > createQuery(coral::ISessionProxy *session)
Definition: TrigDBHelper.cxx:10
TrigConf::L1CTPFiles::CTPCORE_CAM_SIZE
static const size_t CTPCORE_CAM_SIZE
Definition: L1CTPFiles.h:35
TRG_MSG_INFO
#define TRG_MSG_INFO(x)
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStreamMacros.h:27
TrigConf::TrigDBCTPFilesLoader::m_ctpfiles_queries
std::map< size_t, QueryDefinition > m_ctpfiles_queries
Definition: TrigDBCTPFilesLoader.h:67
TrigConf::L1CTPFiles::set_Ctpcore_SMX
void set_Ctpcore_SMX(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:249
merge.output
output
Definition: merge.py:17
Muon::nsw::incomplete
@ incomplete
Definition: NSWTriggerElink.h:37
TrigConf::L1CTPFiles::RoiMaskC
@ RoiMaskC
Definition: L1CTPFiles.h:47
TrigConf::L1CTPFiles::set_Ctpmon_MonSelector
void set_Ctpmon_MonSelector(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:284
TrigConf::L1CTPFiles::set_Ctpmon_DMX
void set_Ctpmon_DMX(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:294
TrigConf::L1CTPFiles::set_Tmc_CtpmonCounters
void set_Tmc_CtpmonCounters(std::vector< TrigConf::L1CTPFiles::CTPMonCounter > data)
Definition: L1CTPFiles.cxx:364
TrigConf::ParsingException
Definition: Trigger/TrigConfiguration/TrigConfIO/TrigConfIO/Exceptions.h:51
ptree
boost::property_tree::ptree ptree
Definition: JsonFileLoader.cxx:16
TrigConf::L1CTPFiles::set_Ctpin_MonDecoder_Slot7
void set_Ctpin_MonDecoder_Slot7(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:269
TrigConf::L1CTPFiles::CTPCoreCTPXInput::NONE
@ NONE
Definition: L1CTPFiles.h:72
TrigConf::L1CTPFiles::set_Muctpi_Extra_Ptlut
void set_Muctpi_Extra_Ptlut(const std::string &key, std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:339
TrigConf::L1CTPFiles::set_Smx_Vhdl_Slot8
void set_Smx_Vhdl_Slot8(const std::string &data)
Definition: L1CTPFiles.cxx:309
TrigConf::QueryException
Definition: Trigger/TrigConfiguration/TrigConfIO/TrigConfIO/Exceptions.h:21
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
TrigConf::L1CTPFiles::PtLutEndcap
@ PtLutEndcap
Definition: L1CTPFiles.h:47
TrigConf::L1CTPFiles::CTPMON_DMX_SIZE
static const size_t CTPMON_DMX_SIZE
Definition: L1CTPFiles.h:45
TrigConf::TrigDBCTPFilesLoader::loadCTPFiles
void loadCTPFiles(L1CTPFiles &ctpfiles, std::unique_ptr< coral::IQuery > query, size_t schemaVersion) const
Definition: TrigDBCTPFilesLoader.cxx:188
TrigConf::DataStructure
Base class for Trigger configuration data and wrapper around underlying representation.
Definition: DataStructure.h:37
TrigConf::L1CTPFiles::set_Smx_Svfi_Slot8
void set_Smx_Svfi_Slot8(const std::string &data)
Definition: L1CTPFiles.cxx:324
TrigConf::TrigDBCTPFilesLoader::loadHardwareFiles
bool loadHardwareFiles(unsigned int smk, L1CTPFiles &ctpfiles, uint8_t loadMask=0x0F, const std::string &outFileName="") const
Load content from the Trigger DB into an L1CTPFiles object for a given super master key (SMK)
Definition: TrigDBCTPFilesLoader.cxx:106
python.PyAthena.v
v
Definition: PyAthena.py:157
TrigConf::L1CTPFiles::set_Tmc_CtpcoreInputs
void set_Tmc_CtpcoreInputs(std::vector< TrigConf::L1CTPFiles::CTPCoreInput > data)
Definition: L1CTPFiles.cxx:349
TrigConf::L1CTPFiles::set_Ctpin_MonSelector_Slot9
void set_Ctpin_MonSelector_Slot9(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:264
TrigConf::TrigDBCTPFilesLoader::m_ctpsmx_queries
std::map< size_t, QueryDefinition > m_ctpsmx_queries
Definition: TrigDBCTPFilesLoader.h:68
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
query_example.cursor
cursor
Definition: query_example.py:21
TrigConf::L1CTPFiles::CTPCoreInput::InputType
InputType
Definition: L1CTPFiles.h:53
TrigConf::blobToPtree
void blobToPtree(const coral::Blob &blob, boost::property_tree::ptree &pt)
Definition: TrigDBHelper.cxx:58
TrigConf::L1CTPFiles::set_Smx_Output
void set_Smx_Output(const std::string &data)
Definition: L1CTPFiles.cxx:299
TrigConf::L1CTPFiles::CTPMonCounter
Definition: L1CTPFiles.h:101
TrigConf::L1CTPFiles::set_Ctpin_MonDecoder_Slot8
void set_Ctpin_MonDecoder_Slot8(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:274
LArCellConditions.sv
bool sv
Definition: LArCellConditions.py:45
TrigConf::L1CTPFiles::set_Tmc_CtpcoreCTPXInputs
void set_Tmc_CtpcoreCTPXInputs(std::vector< TrigConf::L1CTPFiles::CTPCoreCTPXInput > data)
Definition: L1CTPFiles.cxx:354
extractSporadic.q
list q
Definition: extractSporadic.py:98
TrigDBHelper.h
TrigConf::L1CTPFiles::set_Ctpin_MonSelector_Slot8
void set_Ctpin_MonSelector_Slot8(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:259
TrigConf::TrigDBCTPFilesLoader::loadDBFieldIntoVector
std::vector< uint32_t > loadDBFieldIntoVector(const coral::AttributeList &row, const std::string &field, size_t size) const
Definition: TrigDBCTPFilesLoader.cxx:476
TrigConf::L1CTPFiles::CTPCoreCTPXInput::InputType
InputType
Definition: L1CTPFiles.h:72
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
TrigConf::TrigDBCTPFilesLoader::loadCTPSMX
void loadCTPSMX(L1CTPFiles &ctpfiles, std::unique_ptr< coral::IQuery > query, size_t schemaVersion) const
Definition: TrigDBCTPFilesLoader.cxx:266
TrigConf::TrigDBCTPFilesLoader::loadMUCTPI
void loadMUCTPI(L1CTPFiles &ctpfiles, std::unique_ptr< coral::IQuery > query, size_t schemaVersion) const
Definition: TrigDBCTPFilesLoader.cxx:290
DataStructure.h
TrigConf::L1CTPFiles::CTPIN_MONSEL_SIZE
static const size_t CTPIN_MONSEL_SIZE
Definition: L1CTPFiles.h:38
TrigConf::L1CTPFiles::CTPCoreInput::PIT
@ PIT
Definition: L1CTPFiles.h:53
TrigConf::L1CTPFiles::set_Ctpmon_MonDecoder
void set_Ctpmon_MonDecoder(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:289
TrigConf::L1CTPFiles::CTPCoreInput
Definition: L1CTPFiles.h:51
TrigConf::L1CTPFiles::CTPCORE_SMX_SIZE
static const size_t CTPCORE_SMX_SIZE
Definition: L1CTPFiles.h:36
TrigConf::L1CTPFiles::set_HasCompleteSmxData
void set_HasCompleteSmxData(bool flag)
Definition: L1CTPFiles.cxx:224
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:96
fitman.k
k
Definition: fitman.py:528
TrigConf::L1CTPFiles::set_HasCompleteCtpData
void set_HasCompleteCtpData(bool flag)
Setters of the various CTP data.
Definition: L1CTPFiles.cxx:219
TrigConf::L1CTPFiles::set_Ctpin_MonDecoder_Slot9
void set_Ctpin_MonDecoder_Slot9(std::vector< uint32_t > data)
Definition: L1CTPFiles.cxx:279
TrigConf::L1CTPFiles::RoiMaskA
@ RoiMaskA
Definition: L1CTPFiles.h:47