8#include "CoolKernel/Record.h"
9#include "CoolKernel/IFolder.h"
10#include "CoralBase/Attribute.h"
11#include "CoralBase/AttributeList.h"
12#include "CoralBase/AttributeListException.h"
14#include "CTPfragment/CTPdataformatVersion.h"
46 Record payload(fld->payloadSpecification());
47 payload[
"ItemName"].setValue<cool::String255>(item.
name());
48 payload[
"ItemVersion"].setValue<cool::UInt32>(item.
version());
55 Record payload(fld->payloadSpecification());
56 vector<string> thresholdlist;
57 string logic, conditions;
59 vector<string>::iterator thrIt = thresholdlist.begin();
60 for(;thrIt!=thresholdlist.end();++thrIt) {
61 if(thrIt!=thresholdlist.begin()) conditions +=
";";
64 payload[
"Logic"].setValue<cool::String255>(logic);
65 payload[
"ConditionsList"].setValue<cool::String4k>(conditions);
72 Record payload(fld->payloadSpecification());
73 std::string thrValDef(
"");
74 for(std::vector<int>::const_iterator wIt = jetweights.begin(); wIt!=jetweights.end(); ++wIt) {
75 if(wIt != jetweights.begin()) thrValDef +=
",";
76 thrValDef += std::to_string(*wIt);
78 payload[
"Threshold"].setValue<cool::String255>(
"JetWeights");
79 payload[
"ThresholdValue"].setValue<cool::String4k>(thrValDef);
80 payload[
"Cable"].setValue<cool::String255>(
"");
87 Record payload(fld->payloadSpecification());
89 thrValDef += std::to_string(metSigParams.
xsSigmaScale()) +
",";
90 thrValDef += std::to_string(metSigParams.
xsSigmaOffset()) +
",";
91 thrValDef += std::to_string(metSigParams.
xeMin()) +
",";
92 thrValDef += std::to_string(metSigParams.
xeMax()) +
",";
93 thrValDef += std::to_string(metSigParams.
teSqrtMin()) +
",";
94 thrValDef += std::to_string(metSigParams.
teSqrtMax());
95 payload[
"Threshold"].setValue<cool::String255>(
"METSigParams");
96 payload[
"ThresholdValue"].setValue<cool::String4k>(thrValDef);
97 payload[
"Cable"].setValue<cool::String255>(
"");
104 Record payload(fld->payloadSpecification());
107 thrDef += thr.name(); thrDef +=
",";
108 thrDef += std::to_string(thr.version()); thrDef +=
",";
109 thrDef += thr.type(); thrDef +=
",";
110 thrDef += std::to_string(thr.mapping()); thrDef +=
",";
111 thrDef += std::to_string(thr.active());
115 string thrValDef(
"");
116 vector<TriggerThresholdValue*>::const_iterator thrValIt = thr.thresholdValueVector().begin();
117 vector<TriggerThresholdValue*>::const_iterator thrValEnd = thr.thresholdValueVector().end();
118 for(;thrValIt!=thrValEnd;++thrValIt) {
121 string valName = thrVal->
name();
122 string valType = thrVal->
type();
123 string valThresholdval = std::to_string(thrVal->
ptcut());
124 string valEtamin = std::to_string(thrVal->
etamin());
125 string valEtamax = std::to_string(thrVal->
etamax());
126 string valPhimin = std::to_string(thrVal->
phimin());
127 string valPhimax = std::to_string(thrVal->
phimax());
128 string valWindow = std::to_string(thrVal->
window());
129 string valEm_isolation =
"63";
130 string valHad_isolation =
"63";
131 string valHad_veto =
"63";
132 string valPriority = std::to_string(thrVal->
priority());
138 valEm_isolation = std::to_string(cluThrVal->
emIsolation());
139 valHad_isolation = std::to_string(cluThrVal->
hadIsolation());
140 valHad_veto = std::to_string(cluThrVal->
hadVeto());
144 if(thrValIt!=thr.thresholdValueVector().begin()) thrValDef +=
";";
145 thrValDef += valName; thrValDef +=
",";
146 thrValDef += valType; thrValDef +=
",";
147 thrValDef += valThresholdval; thrValDef +=
",";
148 thrValDef += valEtamin; thrValDef +=
",";
149 thrValDef += valEtamax; thrValDef +=
",";
150 thrValDef += valPhimin; thrValDef +=
",";
151 thrValDef += valPhimax; thrValDef +=
",";
152 thrValDef += valEm_isolation; thrValDef +=
",";
153 thrValDef += valHad_isolation; thrValDef +=
",";
154 thrValDef += valHad_veto; thrValDef +=
",";
155 thrValDef += valWindow; thrValDef +=
",";
156 thrValDef += valPriority;
161 std::string cableDef(
"");
162 cableDef += thr.cableName(); cableDef +=
",";
163 cableDef += thr.cableCtpin(); cableDef +=
",";
164 cableDef += thr.cableConnector(); cableDef +=
",";
165 cableDef += std::to_string(thr.cableStart()); cableDef +=
",";
166 cableDef += std::to_string(thr.cableEnd());
169 payload[
"Threshold"].setValue<cool::String255>(thrDef);
170 payload[
"ThresholdValue"].setValue<cool::String4k>(thrValDef);
171 payload[
"Cable"].setValue<cool::String255>(cableDef);
178 Record payload(fld->payloadSpecification());
179 payload[
"Lvl1PrescaleConfigurationKey"].setValue<cool::UInt32>(lvl1PrescaleKey);
186 Record payload(fld->payloadSpecification());
187 if(payload[
"Lvl1Prescale"].storageType()==cool::StorageType::Int32)
188 payload[
"Lvl1Prescale"].setValue<cool::Int32>(prescale);
190 payload[
"Lvl1Prescale"].setValue<cool::Int64>(prescale);
197 Record payload(fld->payloadSpecification());
198 if(payload[
"Lvl1Prescale"].storageType()==cool::StorageType::Int32)
199 payload[
"Lvl1Prescale"].setValue<cool::Int32>(prescale);
201 payload[
"Lvl1Prescale"].setValue<cool::Int64>(prescale);
208 Record payload(fld->payloadSpecification());
209 payload[
"Lvl1BunchGroupConfigurationKey"].setValue<cool::UInt32>(lvl1BunchgroupKey);
217 Record payload(fld->payloadSpecification());
222 std::vector<const BunchGroup*> bgOrdered(16,(
const BunchGroup*)0);
225 bgOrdered.at(bgp.internalNumber()) = &bgp;
230 for(
int bgC=0; bgC<16; ++bgC) {
236 unsigned char mask = (1 << (bgC % 8) );
239 for(
int b : bg->bunches()) {
242 std::string errorMsg =
243 "Bunch group " +
to_string(bgC) +
" contains bunch number "
244 +
to_string(b) +
" which is outside the range [0,3563]";
245 throw std::runtime_error(errorMsg);
247 codes[
static_cast<unsigned int>(b) + bgOffset] |= mask;
251 std::cout <<
"LVL1 bunchgroups [list 16 bunches per line]:" << std::endl;
254 blob.resize( codes.size() );
256 unsigned char* p =
static_cast<unsigned char*
>(blob.startingAddress());
258 for (
size_t i=0; i < codes.size() ; ++i,++p) {
261 cout << string(std::bitset<8>(codes[i]).to_string<char,std::char_traits<char>,std::allocator<char> >());
262 if((i+1)%16==0) cout << endl;
267 payload[
"BunchCode"].setValue<coral::Blob>( blob );
282 Record payload(fld->payloadSpecification());
287 unsigned int internalNumber = bunchgroup.internalNumber();
289 const string bgname = bunchgroup.name();
291 std::string payloadKey =
"BunchGroup" + std::to_string(internalNumber);
293 if(payload.specification().exists(payloadKey)) {
294 std::cout <<
"Write bunch group " << payloadKey <<
": '"<< bgname <<
"'" << std::endl;
295 payload[payloadKey].setValue<cool::String255>( bgname );
297 std::cout <<
"WARNING: COOL DB schema has not yet made fields for bunchgroup " << internalNumber <<
" (" << bgname <<
")" << endl;
301 cout <<
"Writing bunch group description with size " << ctpDataformat.getMaxTrigItems() << endl;
303 vector<unsigned char> codes( ctpDataformat.getMaxTrigItems() ,0);
306 unsigned int ctpid = item->ctpId();
307 if(ctpid >= codes.size())
308 throw runtime_error(
"Item ctpid exceeds blob size!");
311 throw runtime_error(
"Item " + item->name() +
" has no definition nodes attached");
316 for(
size_t i = 0; i<v1.size();++i) {
317 if(v1[i]) codes[ctpid] |= (1<<i);
320 cout <<
"Item " << setw(3) << setfill(
' ') << ctpid <<
" bunch-group code "
321 << string(bitset<8>(codes[ctpid]).
to_string<
char,char_traits<char>,allocator<char> >())
328 blob.resize( codes.size() );
329 unsigned char* p =
static_cast<unsigned char*
>(blob.startingAddress());
330 for (
size_t i=0; i < codes.size(); ++i,++p) {
334 payload[
"ItemToBunchGroupMap"].setValue<coral::Blob>( blob );
348 Record payload(fld->payloadSpecification());
349 payload[
"ThresholdName"].setValue<cool::String255>(tip.
thresholdName());
350 payload[
"CtpinSlot"].setValue<cool::UChar>(
static_cast<unsigned char>(tip.
slot()));
351 payload[
"CtpinConnector"].setValue<cool::UChar>(
static_cast<unsigned char>(tip.
connector()));
352 payload[
"ThresholdBit"].setValue<cool::UChar>(
static_cast<unsigned char>(tip.
thresholdBit()));
353 payload[
"CableBit"].setValue<cool::UChar>(
static_cast<unsigned char>(tip.
cableBit()));
354 payload[
"ThresholdMapping"].setValue<cool::UChar>(
static_cast<unsigned char>(tip.
thresholdMapping()));
355 payload[
"ThresholdActive"].setValue<cool::Bool>(tip.
thresholdActive());
364 const std::string&
type,
365 const uint16_t& bgId,
366 const std::string& threshName,
367 const std::string& slot,
368 const std::string& con,
369 const std::string& mult,
370 const std::string& start,
371 const std::string& end,
372 const std::string& active,
373 const std::string& monName,
374 const std::string& CounterLogic)
376 Record payload(fld->payloadSpecification());
377 payload[
"CounterType"].setValue<cool::String255>(
type);
378 payload[
"BunchGroupId"].setValue<cool::UChar>(
static_cast<unsigned char>(bgId));
379 payload[
"ThresholdName"].setValue<cool::String255>(threshName);
380 payload[
"CtpinSlot"].setValue<cool::String255>(slot);
381 payload[
"CtpinConnector"].setValue<cool::String255>(con);
382 payload[
"Multiplicity"].setValue<cool::String255>(mult);
383 payload[
"ThresholdBitStart"].setValue<cool::String255>(start);
384 payload[
"ThresholdBitEnd"].setValue<cool::String255>(end);
385 payload[
"ThresholdActive"].setValue<cool::String255>(active);
386 payload[
"CounterName"].setValue<cool::String255>(monName);
387 payload[
"CounterLogic"].setValue<cool::String255>(CounterLogic);
395 item->
setName (
al[
"ItemName"]. data<cool::String255>() );
396 item->
setVersion(
al[
"ItemVersion"].data<cool::UInt32>() );
403 const vector<TriggerThreshold*>& thrs) {
404 string logic =
al[
"Logic"].data<cool::String255>();
405 vector<string> condList =
split(
al[
"ConditionsList"].data<cool::String4k>(),
";");
413 string thrDef =
al[
"Threshold"].data<cool::String255>();
414 string thrValDef =
al[
"ThresholdValue"].data<cool::String4k>();
415 string cableDef =
al[
"Cable"].data<cool::String255>();
419 vector<string> thrDefV =
split(thrDef,
",");
420 thr->setName(thrDefV[0]);
425 if(thr->name()==
"JetWeights" || thr->name()==
"METSigParams") {
426 thr->setCableName(thrValDef);
430 thr->setVersion(std::stoi(thrDefV[1]));
431 thr->setType(thrDefV[2]);
432 thr->setMapping(std::stoi(thrDefV[3]));
433 thr->setActive(thrDefV[4] ==
"1" || thrDefV[4] ==
"true");
440 if(thr->isInternal()) {
441 string::size_type pos = thr->name().find_first_of(
"0123456789");
442 int mapping = std::stoi(thr->name().substr(pos));
443 thr->setMapping( mapping );
447 vector<string> thrAllValDefV =
split(thrValDef,
";");
448 for(
const string& thrAllVal: thrAllValDefV) {
449 if(thrAllVal==
"")
continue;
450 vector<string> thrValDefV =
split(thrAllVal,
",");
452 string valName = thrValDefV[0];
453 string valType = thrValDefV[1];
454 float valThresholdval = std::stof(thrValDefV[2]);
455 int valEtamin = std::stoi(thrValDefV[3]);
456 int valEtamax = std::stoi(thrValDefV[4]);
457 int valPhimin = std::stoi(thrValDefV[5]);
458 int valPhimax = std::stoi(thrValDefV[6]);
459 float valEm_isolation = std::stof(thrValDefV[7]);
460 float valHad_isolation = std::stof(thrValDefV[8]);
461 float valHad_veto = std::stof(thrValDefV[9]);
462 int valWindow = std::stoi(thrValDefV[10]);
463 float valPriority = std::stof(thrValDefV[11]);
485 thr->addThresholdValue(thrv);
489 vector<string> cableDefV =
split(cableDef,
",");
490 string cableName = cableDefV[0];
491 string cableCtpin = cableDefV[1];
492 string cableConnector = cableDefV[2];
493 int cableStart = std::stoi(cableDefV[3]);
494 int cableEnd = std::stoi(cableDefV[4]);
495 thr->setCableName ( cableName );
496 thr->setCableCtpin ( cableCtpin);
497 string ctpin(std::move(cableCtpin));
498 std::transform(ctpin.begin(), ctpin.end(), ctpin.begin(),
::tolower);
499 if( ctpin ==
"ctpcore" ) {
500 thr->setInput(
"ctpcore" );
502 thr->setInput(
"ctpin" );
504 thr->setCableConnector( cableConnector);
505 thr->setCableStart ( cableStart );
506 thr->setCableEnd ( cableEnd );
514 const coral::Blob& blob =
al[
"BunchCode"].data<coral::Blob>();
517 if(blob.size() != 3564 && blob.size() != 2 * 3564)
518 throw runtime_error(
"Read BLOB for BunchCode of unexpected size!");
521 unsigned int numberBG = (blob.size() == 3564) ? 8 : 16;
523 vector<BunchGroup> bgV(numberBG);
524 unsigned int bgIdx(0);
526 bg.setInternalNumber(bgIdx++);
529 const unsigned char* p =
static_cast<const unsigned char*
>(blob.startingAddress());
531 for (
size_t bunch = 0; bunch < 3564; ++bunch, ++p) {
532 unsigned char mask = *p;
533 for(
int i=0; i<8;i++) {
534 if( (mask>>i) & 0x1) bgV[i].addBunch(bunch);
538 if(blob.size() == 2 * 3564) {
539 for (
size_t bunch = 0; bunch < 3564; ++bunch, ++p) {
540 unsigned char mask = *p;
541 for(
int i=0; i<8;i++)
542 if( (mask>>i) & 0x1) bgV[8+i].addBunch(bunch);
549pair< vector<string>, map<unsigned int,unsigned char> >
551 vector<string> names;
552 names.push_back(
al[
"BunchGroup0"].data<cool::String255>());
553 names.push_back(
al[
"BunchGroup1"].data<cool::String255>());
554 names.push_back(
al[
"BunchGroup2"].data<cool::String255>());
555 names.push_back(
al[
"BunchGroup3"].data<cool::String255>());
556 names.push_back(
al[
"BunchGroup4"].data<cool::String255>());
557 names.push_back(
al[
"BunchGroup5"].data<cool::String255>());
558 names.push_back(
al[
"BunchGroup6"].data<cool::String255>());
559 names.push_back(
al[
"BunchGroup7"].data<cool::String255>());
561 names.push_back(
al[
"BunchGroup8"].data<cool::String255>());
562 names.push_back(
al[
"BunchGroup9"].data<cool::String255>());
563 names.push_back(
al[
"BunchGroup10"].data<cool::String255>());
564 names.push_back(
al[
"BunchGroup11"].data<cool::String255>());
565 names.push_back(
al[
"BunchGroup12"].data<cool::String255>());
566 names.push_back(
al[
"BunchGroup13"].data<cool::String255>());
567 names.push_back(
al[
"BunchGroup14"].data<cool::String255>());
568 names.push_back(
al[
"BunchGroup15"].data<cool::String255>());
570 catch(
const coral::AttributeListException &) {}
572 std::map<unsigned int,unsigned char> codes;
573 const coral::Blob& blob =
al[
"ItemToBunchGroupMap"].data<coral::Blob>();
577 if(blob.size() != 256 && blob.size() != 512)
578 throw runtime_error(
"Read BLOB for ItemToBunchGroupMap of unexpected size!");
580 const unsigned char* p =
static_cast<const unsigned char*
>(blob.startingAddress());
581 for (
long i = 0; i < blob.size(); ++i,++p) {
582 unsigned char mask = (*p);
583 codes.insert( make_pair(i,mask) );
585 return make_pair(names,codes);
591 unsigned int & lvl1PrescaleKey )
593 lvl1PrescaleKey =
al[
"Lvl1PrescaleConfigurationKey"].data<cool::UInt32>();
600 if (
al[
"Lvl1Prescale"].specification().
type() ==
typeid(cool::Int32) )
601 prescaleValue =
al[
"Lvl1Prescale"].data<cool::Int32>();
603 prescaleValue =
al[
"Lvl1Prescale"].data<cool::Int64>();
610 if (
al[
"Lvl1Prescale"].specification().
type() ==
typeid(cool::Int32) )
611 prescaleValue =
al[
"Lvl1Prescale"].data<cool::Int32>();
613 prescaleValue =
al[
"Lvl1Prescale"].data<cool::Int64>();
620 return al[
"Lvl1BunchGroupConfigurationKey"].data<cool::UInt32>();
629 pit->
setCtpinSlot(
static_cast<uint16_t
>(
al[
"CtpinSlot"].data<cool::UChar>()) );
631 pit->
setThresholdBit(
static_cast<uint16_t
>(
al[
"ThresholdBit"].data<cool::UChar>()) );
632 pit->
setCableBit(
static_cast<uint16_t
>(
al[
"CableBit"].data<cool::UChar>()) );
644 tip->
setSlot(
static_cast<uint16_t
>(
al[
"CtpinSlot"].data<cool::UChar>()) );
645 tip->
setConnector(
static_cast<uint16_t
>(
al[
"CtpinConnector"].data<cool::UChar>()) );
646 tip->
setThresholdBit(
static_cast<uint16_t
>(
al[
"ThresholdBit"].data<cool::UChar>()) );
647 tip->
setCableBit(
static_cast<uint16_t
>(
al[
"CableBit"].data<cool::UChar>()) );
654std::vector<TrigConf::ThresholdMonitor*>
657 vector<ThresholdMonitor*>
vec;
658 vector<string> names =
split(payload[
"ThresholdName"].data<cool::String255>(),
":");
659 vector<string> slots =
split(payload[
"CtpinSlot"].data<cool::String255>(),
":");
660 vector<string> cons =
split(payload[
"CtpinConnector"].data<cool::String255>(),
":");
661 vector<string> mults =
split(payload[
"Multiplicity"].data<cool::String255>(),
":");
662 vector<string> starts =
split(payload[
"ThresholdBitStart"].data<cool::String255>(),
":");
663 vector<string> ends =
split(payload[
"ThresholdBitEnd"].data<cool::String255>(),
":");
664 vector<string> actives =
split(payload[
"ThresholdActive"].data<cool::String255>(),
":");
666 string monname = payload[
"CounterName"].data<cool::String255>();
667 string type = payload[
"CounterType"].data<cool::String255>();
669 unsigned char bgId = payload[
"BunchGroupId"].data<cool::UChar>();
673 names.size() != slots.size() ||
674 names.size() != cons.size() ||
675 names.size() != mults.size() ||
676 names.size() != starts.size() ||
677 names.size() != ends.size() ||
678 names.size() != actives.size()
680 throw std::runtime_error(
"Inconsistent mon vector sizes!");
682 for(
size_t i = 0 ; i < names.size(); ++i) {
685 mon->setName(monname);
686 mon->setBunchGroupId(
static_cast<int>(bgId) );
687 mon->setCounterType(
type);
689 mon->setThresholdName(names[i]);
690 mon->setCtpinSlot(
static_cast<uint16_t
>(std::stoul(slots[i])) );
691 mon->setCtpinConnector(
static_cast<uint16_t
>(std::stoul(cons[i])) );
692 mon->setThresholdStartBit( std::stoi(starts[i]) );
693 mon->setThresholdEndBit( std::stoi(ends[i]) );
694 mon->setMultiplicity( std::stoi(mults[i]) );
695 bool active = (actives[i]==
"ENABLED");
696 mon->setThresholdActive( active );
void tolower(std::string &s)
std::vector< size_t > vec
const std::vector< BunchGroup > & bunchGroups() const
void setHadIsolation(float v)
void setEmIsolation(float v)
float emIsolation() const
float hadIsolation() const
static std::string & typeAsString(TriggerType tt)
int xsSigmaOffset() const
void setCtpinConnector(const uint16_t &id)
void setThresholdActive(const bool &a)
void setCableBit(const uint16_t &num)
void setThresholdBit(const uint16_t &num)
void setThresholdName(const std::string &name)
void setCtpinSlot(const uint16_t &id)
void setThresholdMapping(const int16_t &m)
uint16_t connector() const
void setThresholdName(const std::string &name)
void setThresholdMapping(const int16_t &m)
void setConnector(const uint16_t &id)
const std::string & thresholdName() const
void setThresholdActive(const bool &a)
void setSlot(const uint16_t &id)
uint16_t thresholdBit() const
void setThresholdBit(const uint16_t &num)
uint16_t cableBit() const
void setCableBit(const uint16_t &num)
int16_t thresholdMapping() const
bool thresholdActive() const
unsigned int ctpVersion() const
static const long mBGContentBlobSize
void setName(const std::string &name)
const std::string & name() const
void setVersion(unsigned int version)
unsigned int version() const
void getAllBunchGroups(std::vector< bool > &) const
void buildLogic(std::string &logic, std::vector< std::string > &conditionList) const
void setCondition(const std::string &logic, const std::vector< std::string > &conditions, const std::vector< TrigConf::TriggerThreshold * > &thrs)
void setEtaMax(int value)
void setWindow(int value)
void setPriority(float prio)
void setType(const std::string &type)
void setPhiMin(int value)
void setPhiMax(int value)
void setEtaMin(int value)
unsigned int window() const
const std::string & type() const
static TriggerThresholdValue * createThresholdValue(const std::string &type)
std::vector< TrigConf::ThresholdMonitor * > readLvl1MonMap(const cool::IRecord &payload)
Build a LVL1 mon counter object from COOL payload.
cool::Record createLvl1MonMapPayload(cool::IFolderPtr, const std::string &type, const uint16_t &bgId, const std::string &threshName, const std::string &slot, const std::string &con, const std::string &mult, const std::string &start, const std::string &end, const std::string &active, const std::string &monName=std::string(""), const std::string &CounterLogic=std::string(""))
build a COOL db record from a monitoring-mapping string value
cool::Record createLvl1METSigPayload(cool::IFolderPtr, const METSigParam &metSigParams)
build a COOL db record from a L1 MET significance global parameters
cool::Record createLvl1ConfigKeyPayload(cool::IFolderPtr, unsigned int lvl1PrescaleKey)
build a COOL db record from a LVL1 configuration key
std::pair< std::vector< std::string >, std::map< unsigned int, unsigned char > > readLvl1BGDesc(const coral::AttributeList &al)
build the LVL1 Bunchgroup descriptions from a coral::AttributeList
cool::Record createLvl1BGKeyPayload(cool::IFolderPtr, unsigned int lvl1BunchgroupKey)
build a COOL db record from a LVL1 bunch group key
cool::Record createLvl1MenuPayload(cool::IFolderPtr, const TrigConf::TriggerItem &item)
build a COOL db record from a LVL1 TriggerItem (the item name and version)
cool::Record createLvl1PrescalesPayload(cool::IFolderPtr, int prescale)
build a COOL db record from a LVL1 prescale value
TrigConf::PIT * readLvl1InputMap(const coral::AttributeList &al)
Build a LVL1 PIT object from COOL payload.
TrigConf::TIP * readLvl1TIPMap(const coral::AttributeList &al)
void readLvl1Prescale(const coral::AttributeList &al, int &ps)
build the LVL1 prescale value from a coral::AttributeList
cool::Record createLvl1BGDescPayload(cool::IFolderPtr fld, const TrigConf::BunchGroupSet &bgs, const TrigConf::Menu &lvl1Menu)
build a COOL db record from a bunch group description
cool::Record createLvl1BGContentPayload(cool::IFolderPtr fld, const TrigConf::BunchGroupSet &bgs)
build a COOL db record from a bunch group definition value
cool::Record createLvl1ItemDefPayload(cool::IFolderPtr, const TrigConf::TriggerItem &item)
build a COOL db record from a LVL1 TriggerItem (the conditions)
void readLvl1ConfigKey(const coral::AttributeList &al, unsigned int &lvl1PrescaleKey)
build the LVL1 configuration key from a coral::AttributeList
std::vector< TrigConf::BunchGroup > readLvl1BGContent(const coral::AttributeList &al)
build the LVL1 Bunchgroup code
TriggerItem * createLvl1TriggerItem(const coral::AttributeList &al)
build a LVL1 TriggerItem from a COOL db record
cool::Record createLvl1InputMapPayload(cool::IFolderPtr, const TrigConf::TIP &tip)
build a COOL db record from a PIT-mapping string value
cool::Record createLvl1ThresholdPayload(cool::IFolderPtr, const TrigConf::TriggerThreshold &thr)
build a COOL db record from a LVL1 TriggerItem
void addThresholdsToTriggerItem(const coral::AttributeList &al, TriggerItem *item, const std::vector< TrigConf::TriggerThreshold * > &thrs)
build a TriggerThreshold definition from a COOL db record and add to the corresponding item
TriggerThreshold * createLvl1Threshold(const coral::AttributeList &al)
build a LVL1 TriggerThreshold from a COOL db record
cool::Record createLvl1JetWeightPayload(cool::IFolderPtr, const std::vector< int > &jetweights)
build a COOL db record from a L1 Jet Weights vector
int readLvl1BGKey(const coral::AttributeList &al)
build the LVL1 Bunchgroup key value
Forward iterator to traverse the main components of the trigger configuration.
std::vector< std::string > split(const std::string &line, const std::string &del=" ")