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