ATLAS Offline Software
Loading...
Searching...
No Matches
MenuLoader.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "./MenuLoader.h"
6#include "./DBHelper.h"
10#include "./LogicExpression.h"
11
13
14#include "TrigConfL1Data/Menu.h"
19#include "TrigConfL1Data/PIT.h"
20#include "TrigConfL1Data/TIP.h"
23
24#include <iostream>
25#include <sstream>
26#include <stdexcept>
27#include <typeinfo>
28#include <list>
29
30using namespace std;
31
32bool
34
35 if(menu.smk()<=0) return false;
36 try {
38
40
42
44
46
48
50 }
51 catch( const coral::Exception& e ) {
52 TRG_MSG_ERROR("Caught coral exception: " << e.what());
54 throw;
55 }
56 catch( const std::exception& e ) {
57 TRG_MSG_ERROR("Caught std exception: " << e.what());
59 throw;
60 }
61 return true;
62}
63
64
65void
67 TRG_MSG_INFO("Loading CTP Items");
68
69 // to later load internal triggers
70 TriggerThresholdLoader& ttldr = dynamic_cast<TriggerThresholdLoader&>( (dynamic_cast<StorageMgr&>(m_storageMgr))
71 .triggerThresholdLoader() );
72 ttldr.setMenuId(menu.id());
73 ttldr.setLoadCableInfo(false);
74
75 // at this point the internal triggers are not found via the
76 // TM->TT link, hence load them when needed, and cache them
77 std::map<int,TriggerThreshold*> thresholdNotFoundCache;
78
79 unique_ptr< coral::IQuery > query( m_session.nominalSchema().newQuery() );
80 query->addToTableList ( "L1_TM_TO_TI", "TM2TI" );
81 query->addToTableList ( "L1_TRIGGER_ITEM", "TI" );
82 query->addToTableList ( "L1_TI_TO_TT", "TI2TT" );
83
84 // bind list
85 coral::AttributeList bindList;
86 bindList.extend<int>("menuId");
87 bindList[0].data<int>() = menu.id();
88
89 std::string theCondition = "";
90 theCondition += std::string( " TM2TI.L1TM2TI_TRIGGER_MENU_ID = :menuId" );
91 theCondition += std::string( " AND TM2TI.L1TM2TI_TRIGGER_ITEM_ID = TI.L1TI_ID" );
92 theCondition += std::string( " AND TI2TT.L1TI2TT_TRIGGER_ITEM_ID = TI.L1TI_ID" );
93
94 query->setCondition( theCondition, bindList );
95
96 // output data and types
97 coral::AttributeList attList;
98 attList.extend<int> ( "TI.L1TI_ID" );
99 attList.extend<std::string>( "TI.L1TI_NAME" );
100 attList.extend<int> ( "TI.L1TI_VERSION" );
101 if(isRun2()) {
102 attList.extend<int> ( "TI.L1TI_PARTITION" );
103 attList.extend<string> ( "TI.L1TI_MONITOR" );
104 }
105 attList.extend<int> ( "TI.L1TI_CTP_ID" );
106 attList.extend<std::string>( "TI.L1TI_PRIORITY" );
107 attList.extend<std::string>( "TI.L1TI_DEFINITION" );
108 attList.extend<int> ( "TI.L1TI_TRIGGER_TYPE" );
109 attList.extend<int> ( "TI2TT.L1TI2TT_TRIGGER_THRESHOLD_ID" );
110 attList.extend<int> ( "TI2TT.L1TI2TT_POSITION" );
111 attList.extend<int> ( "TI2TT.L1TI2TT_MULTIPLICITY" );
112 fillQuery(query.get(), attList);
113
114 // the ordering
115 std::string theOrder = "";
116 // to get the correct number of items
117 theOrder += " TI.L1TI_CTP_ID ASC";
118 // to get the correct TI definition
119 theOrder += ", TI2TT.L1TI2TT_POSITION ASC";
120 query->addToOrderList( theOrder );
121
122 //query->setRowCacheSize(1000);
123 query->setRowCacheSize(500);
124
125 query->setDistinct();
126
127 coral::ICursor& cursor = query->execute();
128
129 // lists to store <ctpId, vector> for later use
130 vector<int> ctpIDs;
131 map<int,vector<ThrInfo> > item_thrInfo;
132
133 // create the items
134 while (cursor.next()) {
135
136 const coral::AttributeList& row = cursor.currentRow();
137 int ctpid = row["TI.L1TI_CTP_ID"].data<int>();
138 TriggerItem* item = menu.item(ctpid);
139 if(! item) {
140 item = new TriggerItem();
141 item->setCtpId (ctpid);
142 item->setId (row["TI.L1TI_ID"].data<int>());
143 item->setName (row["TI.L1TI_NAME"].data<string>());
144 item->setVersion (row["TI.L1TI_VERSION"].data<int>());
145 if(isRun2()) {
146 item->setPartition (row["TI.L1TI_PARTITION"].data<int>());
147 string mon = row["TI.L1TI_MONITOR"].data<string>();
148 unsigned short monMask = 0;
149
150 const short TBP = 0x1;
151 const short TAP = 0x2;
152 const short TAV = 0x4;
153
154 vector<string> monLfHf = CxxUtils::tokenize(mon, ":|");
155 //copy(monLfHf.begin(),monLfHf.end(), ostream_iterator<string>(cout,"\n") );
156
157 if(monLfHf.size()==4 && monLfHf[0]=="LF" && monLfHf[2]=="HF" && monLfHf[1].size()==3 && monLfHf[3].size()==3) {
158 // LF
159 if( monLfHf[1][2]=='1' ) monMask |= TBP;
160 if( monLfHf[1][1]=='1' ) monMask |= TAP;
161 if( monLfHf[1][0]=='1' ) monMask |= TAV;
162 // HF
163 if( monLfHf[3][2]=='1' ) monMask |= TBP << 3;
164 if( monLfHf[3][1]=='1' ) monMask |= TAP << 3;
165 if( monLfHf[3][0]=='1' ) monMask |= TAV << 3;
166 } else {
167 // this is for the temporary solution
168 if(mon.find("TBP") != string::npos) monMask |= TBP;
169 if(mon.find("TAP") != string::npos) monMask |= TAP;
170 if(mon.find("TAV") != string::npos) monMask |= TAV;
171 }
172 item->setMonitor( monMask );
173 }
174
175 string priority = row["TI.L1TI_PRIORITY"].data<string>();
176 if(priority=="0" || priority=="HIGH") {
177 item->setComplexDeadtime(0);
178 } else if(priority=="1" || priority=="LOW") {
179 item->setComplexDeadtime(1);
180 }
181 item->setDefinition (row["TI.L1TI_DEFINITION"].data<string>());
182 item->setTriggerType(row["TI.L1TI_TRIGGER_TYPE"].data<int>());
183 menu.addTriggerItem(item);
184 if(verbose()>1)
185 msg() << "MenuLoader: Created Item " << item->name() << " with CTPID " << item->ctpId() << endl;
186 item_thrInfo[ctpid] = vector<ThrInfo>();
187 ctpIDs.push_back(ctpid);
188 }
189
190 ThrInfo thr_info;
191 thr_info.thrId = row["TI2TT.L1TI2TT_TRIGGER_THRESHOLD_ID"].data<int>();
192 thr_info.thrPos = row["TI2TT.L1TI2TT_POSITION"].data<int>();
193 thr_info.thrMult = row["TI2TT.L1TI2TT_MULTIPLICITY"].data<int>();
194 thr_info.thr = menu.thresholdConfig().findTriggerThreshold(thr_info.thrId);
195 if(thr_info.thr==0) {
196 // load threshold (internal thresholds)
197 thr_info.thr = new TriggerThreshold();
198 thr_info.thr->setId(thr_info.thrId);
199 if ( ! ttldr.load( *thr_info.thr ) ) {
200 msg() << "MenuLoader: Error loading TriggerThreshold " << thr_info.thrId << endl;
201 throw runtime_error( "MenuLoader::loadItems: error loading TriggerThreshold " );
202 }
203 menu.thresholdConfig().addTriggerThreshold(thr_info.thr);
204 }
205 item_thrInfo[ctpid].push_back(thr_info);
206 }
207
208 // build the item node tree
209 for(int ctpid : ctpIDs) {
210 TriggerItem* titem = menu.findTriggerItem( ctpid );
211 if(verbose()>2) {
212 msg() << "MenuLoader: Number of thresholds for item " << titem->name()
213 << ": " << item_thrInfo[ctpid].size() << " - definition: " << titem->definition() << endl;
214 }
215 // construct the tree of TriggerItemNodes according to
216 // definition and set the thresholds and multiplicities in each
217 // leaf node
218 std::unique_ptr<TriggerItemNode> topNode (constructTree(titem->definition(), item_thrInfo[ctpid]));
219 titem->setTopNode( std::move(topNode) );
220 }
221}
222
223
225TrigConf::MenuLoader::constructTree(const std::string& definition, const std::vector<ThrInfo>& thr_infos) {
226 LogicExpression logic(msg());
227 unsigned int n = logic.parse(definition);
228 if ( n <= 0 ) {
229 msg() << "Error parsing item definition : " << definition << std::endl;
230 return 0;
231 }
232 unsigned int size = thr_infos.size();
233 if (size != (n = logic.totalNumberOfElements()) ) {
234 msg() << "Total number of elements are different: "
235 << " input=" << size << ", parsed=" << n << endl;
236 }
237
238 logic.normalize();
239
240 return constructTree(logic, thr_infos);
241}
242
243
245TrigConf::MenuLoader::constructTree(const LogicExpression& def, const std::vector<ThrInfo>& thr_infos) {
246 TriggerItemNode* top_node=0;
247 const std::vector<std::shared_ptr<LogicExpression>> & sub_logics = def.subLogics();
248
249 switch (def.state()) {
252 unsigned int pos = static_cast<unsigned int>(std::stoul(def.element()));
253 // find all related information
254 for(ThrInfo ti : thr_infos) {
255 if(ti.thrPos==pos) {
256 top_node->setPosition( pos );
257 top_node->setMultiplicity( ti.thrMult );
258 top_node->setTriggerThreshold( ti.thr );
259 break;
260 }
261 }
262 break;
263 }
267 for(auto sl : sub_logics)
268 top_node->addChild( constructTree(*sl, thr_infos) );
269 break;
271 if(sub_logics.size()>0) {
272 top_node = new TriggerItemNode(TriggerItemNode::OR);
273 for(auto sl : sub_logics)
274 top_node->addChild( constructTree(*sl, thr_infos) );
275 }
276 break;
279 for(auto sl : sub_logics)
280 top_node->addChild( constructTree(*sl, thr_infos) );
281 break;
282 }
283
284 return top_node;
285}
286
287
288/*********************************************
289 * get monitoring counter
290 *********************************************/
291void
293 if( ! (m_env == MenuLoader::ALL ||
296 m_env == MenuLoader::COOLL1) ) return;
297
298 TRG_MSG_DEBUG("Load monitoring counter mapping ");
299
300 unique_ptr< coral::IQuery > q(m_session.nominalSchema().newQuery());
301 q->addToTableList ( "L1_TM_TO_TT_MON", "TM2TTM" );
302 q->addToTableList ( "L1_TRIGGER_THRESHOLD", "TT" );
303 q->addToTableList ( "L1_TM_TO_TT", "TM2TT" );
304
305 //Bind list
306 coral::AttributeList bindings;
307 bindings.extend<int>("menuId");
308 bindings[0].data<int>() = menu.id();
309
310 string cond = "";
311 cond += " TM2TTM.L1TM2TTM_TRIGGER_MENU_ID = :menuId";
312 cond += " AND TM2TT.L1TM2TT_TRIGGER_MENU_ID = :menuId";
313 cond += " AND TM2TTM.L1TM2TTM_TRIGGER_THRESHOLD_ID = TM2TT.L1TM2TT_TRIGGER_THRESHOLD_ID";
314 cond += " AND TM2TT.L1TM2TT_TRIGGER_THRESHOLD_ID = TT.L1TT_ID";
315
316 q->setCondition( cond, bindings );
317
318 // Output data and types
319 coral::AttributeList output;
320 output.extend<std::string>( "TM2TTM.L1TM2TTM_NAME" );
321 output.extend<int> ( "TM2TTM.L1TM2TTM_TRIGGER_THRESHOLD_ID" );
322 output.extend<int> ( "TM2TTM.L1TM2TTM_INTERNAL_COUNTER" );
323 output.extend<int> ( "TM2TTM.L1TM2TTM_MULTIPLICITY" );
324 output.extend<long> ( "TM2TTM.L1TM2TTM_BUNCH_GROUP_ID" );
325 output.extend<std::string>( "TM2TTM.L1TM2TTM_COUNTER_TYPE" );
326 output.extend<std::string>( "TT.L1TT_NAME" );
327 output.extend<int> ( "TT.L1TT_ACTIVE" );
328 output.extend<std::string>( "TM2TT.L1TM2TT_CABLE_CTPIN" );
329 output.extend<std::string>( "TM2TT.L1TM2TT_CABLE_CONNECTOR" );
330 output.extend<int> ( "TM2TT.L1TM2TT_CABLE_START" );
331 output.extend<int> ( "TM2TT.L1TM2TT_CABLE_END" );
332 fillQuery(q.get(), output);
333
334 q->setRowCacheSize(500);
335
336 coral::ICursor& cursor = q->execute();
337 ThresholdMonitor* tm = 0;
338
339 while (cursor.next()) {
340 const coral::AttributeList& row = cursor.currentRow();
341 tm = new ThresholdMonitor();
342
343 tm->setName ( row["TM2TTM.L1TM2TTM_NAME"].data<string>());
344 tm->setThresholdId ( row["TM2TTM.L1TM2TTM_TRIGGER_THRESHOLD_ID"].data<int>());
345 tm->setInternalCounter( row["TM2TTM.L1TM2TTM_INTERNAL_COUNTER"].data<int>());
346 tm->setMultiplicity ( row["TM2TTM.L1TM2TTM_MULTIPLICITY"].data<int>());
347 tm->setBunchGroupId ( row["TM2TTM.L1TM2TTM_BUNCH_GROUP_ID"].data<long>());
348 tm->setCounterType ( row["TM2TTM.L1TM2TTM_COUNTER_TYPE"].data<string>());
349 tm->setThresholdName ( row["TT.L1TT_NAME"].data<string>());
350 tm->setThresholdActive( row["TT.L1TT_ACTIVE"].data<int>());
351
352 string slotString = row["TM2TT.L1TM2TT_CABLE_CTPIN"].data<std::string>();
353 uint16_t slot = slotString[4]-'0'; // "SLOT7" -> 7
354 if(slot<7 || slot>9) {
355 TRG_MSG_ERROR("Unknown CTPIN string '" << slotString << "'");
356 throw runtime_error( "MenuLoader (ThresholdMonitor): Error loading Monitoring counters " );
357 }
358 tm->setCtpinSlot(slot);
359
360 string conString = row["TM2TT.L1TM2TT_CABLE_CONNECTOR"].data<std::string>();
361 uint16_t con = conString[3]-'0'; // "CON2" -> 2
362 if(con>3) {
363 TRG_MSG_ERROR("Unknown CTPIN connector string '" << conString << "'");
364 throw runtime_error( "MenuLoader (ThresholdMonitor): Error loading Monitoring counters " );
365 }
366 tm->setCtpinConnector(con);
367 tm->setThresholdStartBit(row["TM2TT.L1TM2TT_CABLE_START"].data<int>());
368 tm->setThresholdEndBit (row["TM2TT.L1TM2TT_CABLE_END"].data<int>());
369 menu.addThresholdMonitor(tm);
370 }
371
372}
373
374
375
376
377
378
379
380
381/***************************************
382 * get Thresholds
383 ***************************************/
384void
386 TRG_MSG_INFO("Loading L1 trigger thresholds");
387
389 thrldr->setLevel(outputLevel());
390 if ( !thrldr->load( menu.thresholdConfig() ) ) {
391 TRG_MSG_ERROR("Error loading ThresholdConfig " << menu.thresholdConfig().id());
392 throw runtime_error( "MenuLoader: Error loading ThresholdConfig " );
393 }
394
395 loadPIT(menu);
396
397 if( menu.pitVector().size() == menu.tipVector().size() ) {
398 // this is the case when we
399 // a) have either no direct inputs in the menu (unlikely, but then the next call doesn't matter), or
400 // b) the direct inputs were not filled in the TIP map: this is not the case since TriggerTool-04-01-06
402 }
403
404}
405
406
407
408void
410 if( ! (m_env == MenuLoader::ALL ||
412 m_env == MenuLoader::COOLL1) ) return;
413
414 set<int> tipNumbersUsed;
415
416
417 unique_ptr< coral::IQuery > q( m_session.nominalSchema().newQuery() );
418 q->addToTableList ( "L1_TM_TO_TT", "TM2TT" );
419 q->addToTableList ( "L1_PITS", "PITS" );
420
421 //Bind list
422 coral::AttributeList bindings;
423 bindings.extend<int>("menuId");
424 bindings[0].data<int>() = menu.id();
425
426 std::string cond("TM2TT.L1TM2TT_TRIGGER_MENU_ID = :menuId");
427 cond += " AND PITS.L1PIT_TM_TO_TT_ID = TM2TT.L1TM2TT_ID";
428 q->setCondition( cond, bindings );
429
430 // should not be necessary, however currently the TriggerTool uploads identical copies in some cases
431 q->setDistinct();
432
433 // Output data and types
434 coral::AttributeList attList;
435 attList.extend<int>( "TM2TT.L1TM2TT_TRIGGER_THRESHOLD_ID" );
436 attList.extend<int>( "TM2TT.L1TM2TT_ID" );
437 attList.extend<int>( "PITS.L1PIT_PIT_NUMBER" );
438 attList.extend<int>( "PITS.L1PIT_THRESHOLD_BIT" );
439 fillQuery(q.get(), attList);
440
441 uint npits(0), ntips(0);
442
443 coral::ICursor& cursor = q->execute();
444 while (cursor.next()) {
445 const coral::AttributeList& row = cursor.currentRow();
446
447 int ttid = row["TM2TT.L1TM2TT_TRIGGER_THRESHOLD_ID"].data<int>();
448 int tmtott = row["TM2TT.L1TM2TT_ID"].data<int>();
449 int tipnum = row["PITS.L1PIT_PIT_NUMBER"].data<int>();
450 int bitnum = row["PITS.L1PIT_THRESHOLD_BIT"].data<int>();
451
452 TriggerThreshold* tt = menu.thresholdConfig().findTriggerThreshold(ttid);
453
454
455 string slotString = tt->cableCtpin();
456 uint16_t slot = 0;
457 if( slotString == "CTPCORE" ) {
458 slot = 10;
459 } else {
460 slot = slotString[4]-'0'; // "SLOT7" -> (uint)7
461 }
462 if(slot<7 || slot>10) {
463 TRG_MSG_ERROR("Unknown CTPIN SLOT '" << slotString << "'");
464 throw runtime_error( "MenuLoader: Error loading PITs " );
465 }
466
467 string conString = tt->cableConnector();
468 uint16_t con = conString[3]-'0'; // "CON2" -> (uint)2
469 uint16_t conMax = slot==10 ? 2 : 3;
470 if( con > conMax ) {
471 TRG_MSG_ERROR("Unknown CTPIN CONNECTOR '" << conString << "'");
472 throw runtime_error( "MenuLoader: Error loading PITs " );
473 }
474
475 if(slot!=10) {
476 PIT* pit = new PIT();
477 pit->setThresholdName(tt->name());
478 pit->setCtpinSlot(slot);
479 pit->setCtpinConnector( con );
480 pit->setPitNumber(tipnum);
481 pit->setThresholdBit(bitnum);
482 pit->setCableBit( tt->cableStart() + bitnum );
483 pit->setTmToTtId(tmtott);
484 pit->setTriggerThresholdId(ttid);
485 pit->setThresholdActive(tt->active());
486 pit->setThresholdMapping(tt->mapping());
487 menu.addPit(pit);
488 npits++;
489 }
490
491 // this is for early menus
492 if(tipNumbersUsed.count(tipnum) > 0) {
493 tipnum = tipnum + 160;
494 } else {
495 tipNumbersUsed.insert(tipnum);
496 }
497
498 TIP* tip = new TIP();
499 tip->setThresholdName(tt->name());
500 tip->setSlot(slot);
501 tip->setConnector( con );
502 tip->setTipNumber(tipnum);
503 tip->setClock( tipnum % 2 );
504 tip->setThresholdBit(bitnum);
505 tip->setCableBit( tt->cableStart() + bitnum );
506 tip->setTmToTtId(tmtott);
507 tip->setTriggerThresholdId(ttid);
508 tip->setThresholdActive(tt->active());
509 tip->setThresholdMapping(tt->mapping());
510 if(slot==10) tip->setIsDirect(true);
511 else tip->setIsDirect(false);
512 menu.addTip(tip);
513 ntips++;
514
515 TRG_MSG_DEBUG("TIP " << tip->tipNumber() << " --> " << tt->name());
516 }
517
518 TRG_MSG_INFO("Loaded " << npits << " PITs and " << ntips << " TIPs");
519 TRG_MSG_INFO("Menu has " << menu.pitVector().size() << " PITs and " << menu.tipVector().size() << " TIPs");
520
521
522}
523
524
525void
527
528 // this is only needed as long as the TIPs from the direct input are not in the database
529
530 unsigned int ntips(0);
531
532 for(TriggerThreshold * thr : menu.thresholdConfig().getThresholdVector() ) {
533 if(thr->ttype()==L1DataDef::TOPO || thr->ttype()==L1DataDef::ALFA) {
534
535 const string & conn = thr->cableConnector(); // "CON0", "CON1", "CON2"
536
537 unsigned int connector = conn[3]-'0';
538 unsigned int cableOffset = 320 + connector * 64;
539 unsigned int cableBit = (unsigned int) thr->cableStart();
540 unsigned int clock = thr->clock();
541 unsigned int tipNumber = 2*cableBit + clock + cableOffset;
542
543 TIP* tip = new TIP();
544 tip->setThresholdName(thr->name());
545 tip->setSlot(10);
546 tip->setConnector( connector );
547 tip->setTipNumber( tipNumber );
548 tip->setThresholdBit( thr->clock() );
549 tip->setCableBit( thr->cableStart() );
550 tip->setTriggerThresholdId(thr->id() );
551 tip->setThresholdActive(thr->active());
552 tip->setThresholdMapping(thr->mapping());
553 tip->setIsDirect(true);
554 menu.addTip(tip);
555
556 TRG_MSG_DEBUG("TIP from direct input thresholds " << tip->tipNumber() << " --> " << thr->name());
557
558 ntips++;
559
560 }
561 }
562
563 TRG_MSG_INFO( "Number of TIPs from direct input thresholds " << ntips );
564
565}
566
567
568
569void
571 // load the CaloInfo
573 ci.setSMK(menu.smk());
574 m_storageMgr.caloInfoLoader().setLevel(outputLevel());
575 m_storageMgr.caloInfoLoader().load(ci);
576 menu.setCaloInfo(ci);
577}
578
579/***********************************
580 * retrieve menu name and version
581 ***********************************/
582void
584
585 TRG_MSG_DEBUG("Loading menu data for SMK " << menu.smk());
586
587 unique_ptr< coral::IQuery > q( m_session.nominalSchema().newQuery() );
588 q->addToTableList ( "SUPER_MASTER_TABLE", "SM" );
589 q->addToTableList ( "L1_MASTER_TABLE", "MT" );
590 q->addToTableList ( "L1_TRIGGER_MENU", "TM" );
591
592 //Bind list
593 coral::AttributeList bindings;
594 bindings.extend<int>("smk");
595 bindings[0].data<int>() = menu.smk();
596
597 string condition("");
598 condition += "SM.SMT_ID = :smk";
599 condition += " AND SM.SMT_L1_MASTER_TABLE_ID = MT.L1MT_ID";
600 condition += " AND MT.L1MT_TRIGGER_MENU_ID = TM.L1TM_ID";
601 q->setCondition( condition , bindings );
602
603 //Define the data types
604 coral::AttributeList attList;
605 attList.extend<int>("TM.L1TM_ID");
606 attList.extend<string>("TM.L1TM_NAME");
607 attList.extend<int>("TM.L1TM_VERSION");
608 attList.extend<int>("MT.L1MT_ID" );
609 fillQuery(q.get(), attList);
610
611 coral::ICursor& cursor = q->execute();
612 if ( ! cursor.next() ) {
613 TRG_MSG_ERROR("No trigger menu in SMK " << menu.smk());
614 throw runtime_error( "MenuLoader: ERROR trigger menu not available" );
615 }
616
617 // fill the object with data
618 const coral::AttributeList& row = cursor.currentRow();
619 menu.setId ( row["TM.L1TM_ID"].data<int>() );
620 menu.setName ( row["TM.L1TM_NAME"].data<string>() );
621 menu.setVersion( row["TM.L1TM_VERSION"].data<int>() );
622 menu.thresholdConfig().setLvl1MasterTableId( row["MT.L1MT_ID"].data<int>() );
623}
unsigned int uint
size_t size() const
Number of registered mappings.
StorageMgr & m_storageMgr
reference to the storage manager
Definition DBLoader.h:66
virtual MSGTC::Level outputLevel() const override
Definition DBLoader.h:39
void commitSession()
commit session if not already done
Definition DBLoader.cxx:45
virtual void setLevel(MSGTC::Level lvl) override
Load the configuration data from the configuration source.
Definition DBLoader.cxx:60
coral::ISessionProxy & m_session
CORAL interface to database session.
Definition DBLoader.h:67
void startSession()
start session if not already active
Definition DBLoader.cxx:36
static const char kAND
AND of sub-logics.
static const char kOPEN
empty logic but may have sub-logics.
const std::string & element() const
static const char kNOT
NOT of a sub-logic. (only one sub-logic).
static const char kELEMENT
simple element.
const LogicV_t & subLogics() const
static const char kOR
OR of sub-logics.
virtual int parse(const std::string &expr, bool enclosed=false)
void createTipFromDirectThresholds(TrigConf::Menu &menu)
void loadThresholds(TrigConf::Menu &menu)
virtual bool load(Menu &data) override
void loadMonitoring(TrigConf::Menu &menu)
void loadMenuAttributes(TrigConf::Menu &menu)
TriggerItemNode * constructTree(const std::string &def, const std::vector< ThrInfo > &)
New versions for item definition in string.
void loadItems(TrigConf::Menu &menu)
void loadCaloInfo(TrigConf::Menu &menu)
void loadPIT(TrigConf::Menu &menu)
void setTriggerThresholdId(const int &id)
Definition PIT.h:42
void setCtpinConnector(const uint16_t &id)
Definition PIT.h:27
void setTmToTtId(const int &tmtottid)
Definition PIT.h:39
void setThresholdActive(const bool &a)
Definition PIT.h:48
void setCableBit(const uint16_t &num)
Definition PIT.h:36
void setThresholdBit(const uint16_t &num)
Definition PIT.h:33
void setThresholdName(const std::string &name)
Definition PIT.h:21
void setCtpinSlot(const uint16_t &id)
Definition PIT.h:24
void setPitNumber(const uint16_t &pitnumber)
Definition PIT.h:30
void setThresholdMapping(const int16_t &m)
Definition PIT.h:45
Database Storage Manager, controls the database session and the different loader classes for DB acces...
Definition StorageMgr.h:23
void setTmToTtId(const int &tmtottid)
Definition TIP.h:39
void setThresholdName(const std::string &name)
Definition TIP.h:21
void setTriggerThresholdId(const int &id)
Definition TIP.h:42
void setTipNumber(const uint16_t &tipnumber)
Definition TIP.h:30
uint16_t tipNumber() const
Definition TIP.h:29
void setThresholdMapping(const int16_t &m)
Definition TIP.h:45
void setConnector(const uint16_t &id)
Definition TIP.h:27
void setThresholdActive(const bool &a)
Definition TIP.h:48
void setSlot(const uint16_t &id)
Definition TIP.h:24
void setThresholdBit(const uint16_t &num)
Definition TIP.h:33
void setClock(const int &clock)
Definition TIP.h:54
void setCableBit(const uint16_t &num)
Definition TIP.h:36
void setIsDirect(const bool &a)
Definition TIP.h:51
TriggerDB loader of the LVL1 trigger threshold configuration.
virtual bool load(ThresholdConfig &data) override
void setCtpinSlot(const uint16_t &slot)
void setThresholdStartBit(const int &bit)
void setInternalCounter(const int &internalcounter)
void setThresholdName(const std::string &name)
void setBunchGroupId(const int &bunchgroupid)
void setMultiplicity(const int &multiplicity)
void setThresholdEndBit(const int &bit)
void setCtpinConnector(const uint16_t &con)
void setThresholdActive(const bool &active)
void setThresholdId(const int &id)
void setCounterType(const std::string &countertype)
void setId(unsigned int id)
void setName(const std::string &name)
const std::string & name() const
void addChild(TriggerItemNode *node)
void setTriggerThreshold(TriggerThreshold *thr)
void setTopNode(std::unique_ptr< TriggerItemNode > ptrnode)
Definition TriggerItem.h:44
const std::string & definition() const
Definition TriggerItem.h:33
TriggerDB loader of the LVL1 trigger thresholds.
virtual bool load(TriggerThreshold &data) override
make the sidebar many part of the config
Definition hcg.cxx:554
bool verbose
Definition hcg.cxx:75
std::vector< std::string > tokenize(std::string_view the_str, std::string_view delimiters)
Splits the string into smaller substrings.
void fillQuery(coral::IQuery *q, coral::AttributeList &attList)
Definition DBHelper.cxx:13
Definition query.py:1
STL namespace.
TriggerThreshold * thr
Definition MenuLoader.h:45
MsgStream & msg
Definition testRead.cxx:32