Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Reading/Writing of trigger configuration data from/to COOL.
More...
#include <TrigConfCoolWriter.h>
|
| TrigConfCoolWriter (const std::string &dbId, std::ostream &o=std::cout) |
| constructor More...
|
|
| ~TrigConfCoolWriter () |
| destructor More...
|
|
void | createSchema (int schemaVersion=0) |
| Create a new schema in the COOL database. More...
|
|
void | recreateSchema (int schemaVersion=0) |
| Create a new schema in the COOL database with prior deletion of the old one. More...
|
|
void | printSchema (std::ostream &o) |
| Prints the schema in the COOL database. More...
|
|
void | printSchemaVersion (std::ostream &o) |
| Prints the schema in the COOL database. More...
|
|
void | writeL1Payload (ValidityRange vr, const CTPConfig &ctpConfig) |
|
void | writeHLTPayload (ValidityRange vr, const HLTFrame &hltFrame, const std::string &configSource) |
|
void | writeMCKPayload (ValidityRange vr, unsigned int mck, std::string &release, std::string &info) |
|
void | writeRunPayload (unsigned int runNumber, unsigned int masterConfigKey, unsigned int hltPrescaleKey, const TrigConf::ThresholdConfig &lvl1Thr, const TrigConf::CTPConfig &ctpConfig, const TrigConf::CaloInfo &caloInfo, const TrigConf::HLTFrame &hltFrame, const std::string &configSource) |
| Writing run-wise configuration information the COOL database. More...
|
|
void | writeRunPayload (const RunRangeVec &runRanges, unsigned int masterConfigKey, unsigned int hltPrescaleKey, const TrigConf::ThresholdConfig &lvl1Thr, const TrigConf::CTPConfig &ctpConfig, const TrigConf::CaloInfo &caloInfo, const TrigConf::HLTFrame &hltFrame, const std::string &configSource) |
|
void | writeL1MenuPayload (ValidityRange vr, const TrigConf::Menu &lvl1Menu) |
| Writing L1 run-wise configuration information to the COOL database. More...
|
|
void | writeL1MenuPayload (const RunRangeVec &runRanges, const TrigConf::Menu &lvl1Menu) |
|
void | writeL1CTPCoreInputMapping (ValidityRange vr, const Menu &lvl1Menu) |
|
void | writeL1MonPayload (unsigned int runNumber, const TrigConf::Menu *lvl1Menu) |
| Writing L1 run-wise monitoring configuration to COOL. More...
|
|
void | writeL1MonPayload (const RunRangeVec &runRanges, const TrigConf::Menu *lvl1Menu) |
|
void | writeL1BunchGroupLBPayload (const RunRangeVec &runRanges, unsigned int bgKey, const BunchGroupSet &bgs) |
| Writing LB-wise L1 bunch group definition to the COOL database. More...
|
|
void | writeL1BunchGroupLBPayload (ValidityRange vr, unsigned int bgKey, const BunchGroupSet &bgs) |
|
void | writeL1BunchGroupRunPayload (ValidityRange vr, const Menu &lvl1Menu, const BunchGroupSet &bgs) |
| Writing run-wise L1 bunch group names and item to bunch group mapping to COOL. More...
|
|
void | writeL1BunchGroupRunPayload (const RunRangeVec &runRanges, const TrigConf::Menu &lvl1Menu, const TrigConf::BunchGroupSet &bgs) |
|
void | writeHltPrescalePayload (unsigned int runNumber, unsigned int lumiblockNumber, const TrigConf::HLTPrescaleSet &pss) |
| Writing luminosityblock-wise configuration information the COOL database. More...
|
|
void | writeHltPrescalePayload (const RunRangeVec &runRanges, const TrigConf::HLTPrescaleSet &pss) |
|
void | writeHltPrescalePayload (cool::ValidityKey since, cool::ValidityKey until, const TrigConf::HLTPrescaleSet &pss) |
|
void | writeL1PrescalePayload (unsigned int runNumber, unsigned int lumiblockNumber, unsigned int lvl1PrescaleKey, const TrigConf::PrescaleSet &prescale) |
| Writing luminosityblock-wise configuration information the COOL database. More...
|
|
void | writeL1PrescalePayload (const RunRangeVec &runRanges, unsigned int lvl1PrescaleKey, const TrigConf::PrescaleSet &prescale) |
|
void | writeL1PrescalePayload (cool::ValidityKey since, cool::ValidityKey until, unsigned int lvl1PrescaleKey, const TrigConf::PrescaleSet &prescaleSet) |
|
void | readRunPayload (unsigned int runNumber, TrigConf::HLTFrame &hltFrame, unsigned int &masterConfigKey, unsigned int &hltPrescaleKey, std::string &configSource) |
| Reading run-wise configuration information from COOL database. More...
|
|
void | readHLTPayload (unsigned int run, HLTFrame &hltFrame) |
|
void | readL1Payload (unsigned int run, CTPConfig &ctpc) |
|
void | readHltPrescalePayload (unsigned int runNumber, unsigned int lumiblockNumber, TrigConf::HLTPrescaleSet &pss) |
| Reading luminosityblock-wise configuration information the COOL database. More...
|
|
void | readL1BunchGroupLBPayload (unsigned int runNumber, unsigned int lumiblockNumber, int &bgKey, TrigConf::BunchGroupSet &bgs) |
| Reading lb-wise bunch group configuration information from COOL database. More...
|
|
std::pair< std::vector< std::string >, std::map< unsigned int, unsigned char > > | readL1BunchGroupRunPayload (unsigned int runNumber) |
| Reading bunch group configuration information from COOL database. More...
|
|
void | readL1PrescalePayload (unsigned int runNumber, unsigned int lumiblockNumber, unsigned int &lvl1PrescaleKey, TrigConf::PrescaleSet &prescale) |
| Reading luminosityblock-wise configuration information the COOL database. More...
|
|
void | readL1InputMapPayload (unsigned int runNumber, std::vector< TrigConf::PIT * > &pits, std::vector< TrigConf::TIP * > &tips) |
| Read run-wise PIT configuration from COOL database. More...
|
|
void | readL1MonMapPayload (unsigned int runNumber, std::vector< TrigConf::ThresholdMonitor * > &mons) |
| Read run-wise LVL1 monitoring configuration from COOL database. More...
|
|
void | readL1Items (unsigned int runNumber, std::vector< TrigConf::TriggerItem * > &items) |
| Read run-wise L1 item vector from COOL database. More...
|
|
void | readL1Thresholds (unsigned int runNumber, std::vector< TrigConf::TriggerThreshold * > &thrs) |
| Read run-wise L1 threshold vector from COOL database. More...
|
|
void | readL1ItemDef (unsigned int runNumber, const std::vector< TrigConf::TriggerItem * > &items, const std::vector< TrigConf::TriggerThreshold * > &thrs) |
| Read run-wise L1 item defintions (conditions) from COOL database. More...
|
|
void | readL1Menu (unsigned int runNumber, CTPConfig &ctpc) |
| Read L1 menu from COOL database. More...
|
|
std::vector< std::string > | checkPayloadSize (unsigned int run, unsigned int lb, int displayMode, bool openend, unsigned int lbend) |
|
void | addWriteFolder (const std::string &fname) |
|
void | setVerbosityLevel (unsigned int level) |
|
unsigned int | verbosityLevel () const |
|
bool | checkDbConnection (bool readonly) |
|
bool | HLTPrescaleFolderExists () |
|
void | clearWriteFolder () |
|
Reading/Writing of trigger configuration data from/to COOL.
Definition at line 95 of file TrigConfCoolWriter.h.
◆ TrigConfCoolWriter() [1/3]
TrigConf::TrigConfCoolWriter::TrigConfCoolWriter |
( |
const std::string & |
dbId, |
|
|
std::ostream & |
o = std::cout |
|
) |
| |
|
inline |
constructor
- Parameters
-
dbId | database connection string |
o | output stream for all messages (defaults to cout) |
Definition at line 103 of file TrigConfCoolWriter.h.
104 m_dbId(cool::DatabaseId(dbId)),
◆ ~TrigConfCoolWriter()
TrigConf::TrigConfCoolWriter::~TrigConfCoolWriter |
( |
| ) |
|
|
inline |
◆ TrigConfCoolWriter() [2/3]
TrigConf::TrigConfCoolWriter::TrigConfCoolWriter |
( |
| ) |
|
|
inlineprivate |
◆ TrigConfCoolWriter() [3/3]
◆ addWriteFolder()
void TrigConf::TrigConfCoolWriter::addWriteFolder |
( |
const std::string & |
fname | ) |
|
|
inline |
◆ checkDbConnection()
bool TrigConf::TrigConfCoolWriter::checkDbConnection |
( |
bool |
readonly | ) |
|
◆ checkPayloadSize()
vector< string > TrigConf::TrigConfCoolWriter::checkPayloadSize |
( |
unsigned int |
run, |
|
|
unsigned int |
lb, |
|
|
int |
displayMode, |
|
|
bool |
openend, |
|
|
unsigned int |
lbend |
|
) |
| |
Definition at line 1704 of file TrigConfCoolWriter.cxx.
1717 m_ostream <<
"Checking for run " <<
run <<
" and lb range " << (
vr.since() & 0xFFFFFFFF) <<
" - " << ( (
vr.until()-1) & 0xFFFFFFFF) << endl
1719 <<
" Folder Payload Size" << endl
1720 <<
"================================================================================" << endl;
1722 vector<string> foldersToFix;
1725 "/TRIGGER/LVL1/Menu",
1726 "/TRIGGER/LVL1/ItemDef",
1727 "/TRIGGER/LVL1/Thresholds",
1728 "/TRIGGER/LVL1/CTPCoreInputMapping",
1729 "/TRIGGER/LVL1/Lvl1ConfigKey",
1730 "/TRIGGER/LVL1/Prescales",
1731 "/TRIGGER/LVL1/BunchGroupKey",
1732 "/TRIGGER/LVL1/BunchGroupContent",
1733 "/TRIGGER/LVL1/BunchGroupDescription",
1734 "/TRIGGER/HLT/HltConfigKeys",
1735 "/TRIGGER/HLT/Menu",
1736 "/TRIGGER/HLT/Groups",
1737 "/TRIGGER/HLT/PrescaleKey",
1738 "/TRIGGER/HLT/Prescales"
1743 unsigned int size =
folder->countObjects(
vr.since(),
vr.until()-1, ChannelSelection() );
1744 bool isSingleVersion =
folder->versioningMode()==FolderVersioning::SINGLE_VERSION;
1745 bool needsFixing = (
size == 0);
1747 bool displayFixing =
false;
1748 if(displayMode==1) {
1749 displayFixing = (
size == 0);
1750 }
else if(displayMode==2) {
1751 displayFixing = (
size == 0) || !isSingleVersion;
1754 string fn =
folderName + (isSingleVersion ?
" (sv)" :
" (mv)");
1756 m_ostream << setw(2) << foldersToFix.size()+1 <<
") ";
1761 m_ostream << left << setw(40) <<
fn << right << setw(15) <<
size <<
" " << ( needsFixing ?
"NEEDS FIX" :
" OK") << endl;
1764 return foldersToFix;
◆ clearWriteFolder()
void TrigConf::TrigConfCoolWriter::clearWriteFolder |
( |
| ) |
|
|
inline |
◆ closeDb() [1/2]
void TrigConf::TrigConfCoolWriter::closeDb |
( |
| ) |
|
|
private |
◆ closeDb() [2/2]
void TrigConf::TrigConfCoolWriter::closeDb |
( |
cool::IDatabasePtr & |
db | ) |
|
|
private |
close the COOL database
Definition at line 140 of file TrigConfCoolWriter.cxx.
142 if(
db.use_count()>0 &&
db->isOpen()) {
144 db->closeDatabase( );
147 m_ostream <<
"*** COOL exception caught: " <<
e.what() << endl
148 <<
"Couldn't close conditions database: " <<
m_dbId << endl;
◆ createDb()
cool::IDatabasePtr TrigConf::TrigConfCoolWriter::createDb |
( |
| ) |
|
|
private |
◆ createSchema()
void TrigConf::TrigConfCoolWriter::createSchema |
( |
int |
schemaVersion = 0 | ) |
|
Create a new schema in the COOL database.
Definition at line 175 of file TrigConfCoolWriter.cxx.
181 catch(cool::DatabaseDoesNotExist&
e) {
187 catch(cool::Exception&
e) {
188 m_ostream <<
"*** COOL exception caught: " <<
e.what() << endl;
196 m_ostream <<
"Creating schema '" <<
m_dbId <<
"' with version " << schemaVersion
200 catch(cool::Exception&
e) {
201 m_ostream <<
"*** COOL exception caught: " <<
e.what() << endl;
◆ databaseService()
cool::IDatabaseSvc & TrigConfCoolWriter::databaseService |
( |
| ) |
|
|
private |
◆ dbIsOpen()
bool TrigConf::TrigConfCoolWriter::dbIsOpen |
( |
| ) |
|
|
private |
◆ dropDb()
void TrigConf::TrigConfCoolWriter::dropDb |
( |
| ) |
|
|
private |
◆ HLTPrescaleFolderExists()
bool TrigConf::TrigConfCoolWriter::HLTPrescaleFolderExists |
( |
| ) |
|
◆ openDb()
cool::IDatabasePtr TrigConf::TrigConfCoolWriter::openDb |
( |
bool |
readOnly = true | ) |
|
|
private |
open COOL db connection
- Parameters
-
readOnly | if true the db is opened in readonly mode |
Definition at line 109 of file TrigConfCoolWriter.cxx.
113 m_ostream <<
"Opening database '" <<
m_dbId <<
"' in " << (readOnly?
"read-only":
"read-write") <<
" mode" << endl;
118 }
catch(cool::DatabaseDoesNotExist&
e) {
120 m_ostream <<
"Database '" <<
m_dbId <<
"' does not exist. Can't create it since connection is read-only." << endl;
123 m_ostream <<
"Database '" <<
m_dbId <<
"' does not exist, will create it" << endl;
128 }
catch(Exception&
e) {
129 m_ostream <<
"*** COOL exception caught: " <<
e.what() << endl;
◆ printSchema()
void TrigConf::TrigConfCoolWriter::printSchema |
( |
std::ostream & |
o | ) |
|
◆ printSchemaVersion()
void TrigConf::TrigConfCoolWriter::printSchemaVersion |
( |
std::ostream & |
o | ) |
|
Prints the schema in the COOL database.
- Parameters
-
Definition at line 224 of file TrigConfCoolWriter.cxx.
227 o <<
"Schema version is " << schemaVersion
◆ rangeInfo()
void TrigConfCoolWriter::rangeInfo |
( |
const std::string & |
content, |
|
|
cool::ValidityKey |
since, |
|
|
cool::ValidityKey |
until |
|
) |
| |
|
private |
Definition at line 265 of file TrigConfCoolWriter.cxx.
270 if(
since==ValidityKeyMin &&
until==ValidityKeyMax) {
275 unsigned long long run[2];
276 unsigned long long lb[2];
280 run[0] &= 0x7FFFFFFF;
282 run[1] &= 0x7FFFFFFF;
284 if(
lb[0]==0 &&
lb[1]==0) {
286 unsigned int last =
run[1]-1;
290 m_ostream <<
"IOV Info: writing " <<
content <<
" for run range [" <<
first <<
"," << last <<
"]" << endl;
295 m_ostream <<
"IOV Info: writing " <<
content <<
" for run " <<
run[0] <<
" and LB " <<
lb[0] << endl;
297 m_ostream <<
"IOV Info: writing " <<
content <<
" for run " <<
run[0] <<
" and LB range [" <<
lb[0] <<
"," <<
lb[1]-1 <<
"]" << endl;
299 m_ostream <<
"IOV Info: writing " <<
content <<
" for range [" <<
run[0] <<
"/" <<
lb[0] <<
"," <<
run[1] <<
"/" <<
lb[1] <<
"[" << endl;
◆ readHLTPayload()
void TrigConfCoolWriter::readHLTPayload |
( |
unsigned int |
run, |
|
|
HLTFrame & |
hltFrame |
|
) |
| |
Definition at line 1252 of file TrigConfCoolWriter.cxx.
1260 IObjectIteratorPtr
objects = hltMenuFolder->findObjects(
pointInTime, ChannelSelection() );
1261 while (
objects->goToNext() ) {
1271 while (
objects->goToNext() ) {
1279 IObjectPtr
object = hltConfigKeyFolder->findObject(
pointInTime, (ChannelId) 0 );
1280 const IRecord &
payload =
object->payload();
1281 unsigned int smk, hltPrescaleKey;
1282 string configSource;
1287 catch(
const cool::ObjectNotFound& o) {
1288 m_ostream <<
"<readHLTPayload> No entry found in HLT keys folder for run " <<
run << endl;
◆ readHltPrescalePayload()
void TrigConfCoolWriter::readHltPrescalePayload |
( |
unsigned int |
runNumber, |
|
|
unsigned int |
lumiblockNumber, |
|
|
TrigConf::HLTPrescaleSet & |
pss |
|
) |
| |
Reading luminosityblock-wise configuration information the COOL database.
- Parameters
-
runNumber | run number |
lumiblockNumber | luminosity block number |
pss | HLT prescale configuration object |
Definition at line 1118 of file TrigConfCoolWriter.cxx.
1128 IObjectIteratorPtr
objects = hltpskFolder->browseObjects(
vr.since(),
vr.since()+1, 0 );
1141 cool::IObjectIteratorPtr
objects = hltpssFolder->browseObjects(
vr.since(),
vr.since()+1, cool::ChannelSelection());
1144 const cool::IObject&
obj =
objects->currentRef();
1149 const ChannelId&
ch =
obj.channelId();
◆ readL1BunchGroupLBPayload()
void TrigConfCoolWriter::readL1BunchGroupLBPayload |
( |
unsigned int |
runNumber, |
|
|
unsigned int |
lumiblockNumber, |
|
|
int & |
bgKey, |
|
|
TrigConf::BunchGroupSet & |
bgs |
|
) |
| |
Reading lb-wise bunch group configuration information from COOL database.
- Parameters
-
runNumber | run number |
lumiblockNumber | lb number |
bgKey | HLT bunch group set configuration key |
bgs | the bunchgroup set |
Definition at line 1579 of file TrigConfCoolWriter.cxx.
1584 vr.until() =
vr.since();
1588 IObjectIteratorPtr
objects = lvl1BGKeyFolder->browseObjects(
vr.since(),
vr.until(), 0 );
1591 const IRecord & payload1 =
obj.payload();
1596 IObjectIteratorPtr objects2 = lvl1BGContentFolder->browseObjects(
vr.since(),
vr.until(), 0);
1597 objects2->goToNext();
1598 const IObject&
obj2 = objects2->currentRef();
1599 const IRecord & payload2 =
obj2.payload();
1604 vector<string>
names = bg_pair.first;
1608 uint newBGSSize = bgV.size() <=
names.size() ? bgV.size() :
names.size();
1610 if(bgV.size() !=
names.size()) {
1611 cout <<
"WARNING Bunchgroup content vector is of size " << bgV.size()
1612 <<
", which is different from the size of the names vector: " <<
names.size()
1613 <<
". Using " << newBGSSize << endl;
1619 for(
unsigned int i=0;
i<newBGSSize;
i++) {
1620 string bgname =
names[
i];
1621 if(bgname==
"") bgname =
"NoName";
1622 bgV[
i].setName(bgname);
1623 bgV[
i].setInternalNumber(
i);
◆ readL1BunchGroupRunPayload()
pair< vector< string >, map< unsigned int, unsigned char > > TrigConf::TrigConfCoolWriter::readL1BunchGroupRunPayload |
( |
unsigned int |
runNumber | ) |
|
Reading bunch group configuration information from COOL database.
- Parameters
-
runNumber | run number |
lumiblockNumber | lb number |
bgKey | HLT bunch group set configuration key |
bgs | the bunchgroup set |
Definition at line 1557 of file TrigConfCoolWriter.cxx.
1562 IObjectIteratorPtr
objects =
folder->browseObjects(
vr.since(),
vr.until()-1, 0 );
◆ readL1InputMapPayload()
void TrigConfCoolWriter::readL1InputMapPayload |
( |
unsigned int |
runNumber, |
|
|
std::vector< TrigConf::PIT * > & |
pits, |
|
|
std::vector< TrigConf::TIP * > & |
tips |
|
) |
| |
Read run-wise PIT configuration from COOL database.
- Parameters
-
runNumber | run number |
pits | Vector of PIT object to be filled |
Definition at line 1319 of file TrigConfCoolWriter.cxx.
1327 vector<bool> foundTip(512,
false);
1330 if(
objects->size()==0)
continue;
1331 while (
objects->goToNext() ) {
1337 if(tipNumber > 511) {
1338 m_ostream <<
"TIP number " << tipNumber <<
" out of bounds!" << endl;
1339 throw runtime_error(
"TIP number ouf ot bounds!");
1341 if(foundTip[tipNumber]) {
1343 str <<
"TIP '" << tipNumber <<
"' had already been read!";
1344 throw runtime_error(
str.str());
1346 foundTip[tipNumber] =
true;
1350 pits.push_back(pit);
1351 tips.push_back(tip);
◆ readL1ItemDef()
Read run-wise L1 item defintions (conditions) from COOL database.
- Parameters
-
runNumber | run number |
items | Vector of Item object to be updated |
thrs | Vector of Thresholds from which some are added to the item |
Definition at line 1452 of file TrigConfCoolWriter.cxx.
1461 ChannelId itemChannel =
item->ctpId();
1462 IObjectIteratorPtr
objects = L1ItemDefFolder->browseObjects(
vr.since(),
vr.until()-1, itemChannel );
1463 while (
objects->goToNext() ) {
◆ readL1Items()
void TrigConfCoolWriter::readL1Items |
( |
unsigned int |
runNumber, |
|
|
std::vector< TrigConf::TriggerItem * > & |
items |
|
) |
| |
Read run-wise L1 item vector from COOL database.
- Parameters
-
runNumber | run number |
items | Vector of Item object to be filled |
Definition at line 1398 of file TrigConfCoolWriter.cxx.
1406 vector<bool> foundItem(512,
false);
1409 objects =
folder->browseObjects(
vr.since(),
vr.until()-1,cool::ChannelSelection());
1411 while (
objects->goToNext() ) {
1412 const cool::IObject&
obj =
objects->currentRef();
1413 const cool::IRecord &
payload =
obj.payload();
1417 m_ostream <<
"Item ctpid " << ctpId <<
" out of bounds!" << endl;
1418 throw runtime_error(
"Item ctpid ouf ot bounds!");
1420 if(foundItem[ctpId]) {
1422 str <<
"Item '" << ctpId <<
"' had already been read!";
1423 throw runtime_error(
str.str());
1425 foundItem[ctpId] =
true;
1426 item->setCtpId(ctpId);
◆ readL1Menu()
void TrigConfCoolWriter::readL1Menu |
( |
unsigned int |
runNumber, |
|
|
CTPConfig & |
ctpc |
|
) |
| |
Read L1 menu from COOL database.
- Parameters
-
- Returns
- L1 Menu pointer
a unpleasant hack so we can figure out if this Run1 (CTPVersion 3) or Run2 (CTPVersion 4)
we use the fact that in Run2 the cable names were different
Definition at line 1473 of file TrigConfCoolWriter.cxx.
1480 vector<TriggerThreshold*> thrs;
1490 if( thr->cableName()==
"EM1" || thr->cableName()==
"EM2" ||
1491 thr->cableName()==
"JET1" || thr->cableName()==
"JET2" ||
1492 thr->cableName()==
"TOPO1" || thr->cableName()==
"TOPO2" ||
1493 thr->cableName()==
"TAU1" || thr->cableName()==
"TAU2") {
1501 cout <<
"TrigConfCoolWriter::readL1Menu for run " <<
run <<
". Determined format " << (
isRun2 ?
"Run 2" :
"Run 1") << endl;
1504 vector<TriggerItem*>
items;
1516 if ( thr->name()==
"JetWeights" ) {
1518 for (
const string&
weights :
split( thr->cableName(),
",") )
1522 else if ( thr->name()==
"METSigParams" ) {
1523 vector<string> metvals =
split( thr->cableName(),
",");
1524 int XSSigmaScale = boost::lexical_cast<int, string>(metvals[0]);
1525 int XSSigmaOffset = boost::lexical_cast<int, string>(metvals[1]);
1526 int XEmin = boost::lexical_cast<int, string>(metvals[2]);
1527 int XEmax = boost::lexical_cast<int, string>(metvals[3]);
1528 int TESqrtMin = boost::lexical_cast<int, string>(metvals[4]);
1529 int TESqrtMax = boost::lexical_cast<int, string>(metvals[5]);
1531 XEmin, XEmax, TESqrtMin, TESqrtMax);
1535 menu.thresholdConfig().addTriggerThreshold(thr);
1538 menu.setCaloInfo(ci);
1544 for (
PIT* pit : pits) {
1545 if(pit->ctpinSlot()==10)
continue;
1548 for (
TIP* tip : tips) {
◆ readL1MonMapPayload()
Read run-wise LVL1 monitoring configuration from COOL database.
- Parameters
-
runNumber | run number |
mons | Vector of mon counter objects to be filled |
Definition at line 1358 of file TrigConfCoolWriter.cxx.
1366 vector<bool> foundCounter(768,
false);
1371 if(
objects->size()==0)
continue;
1372 while (
objects->goToNext() ) {
1376 int counterNumber =
obj.channelId();
1377 if(counterNumber > 768) {
1378 m_ostream <<
"Monitoring counter number " << counterNumber <<
" out of bounds!" << endl;
1379 throw runtime_error(
"Monitoring counter ouf of bounds!");
1381 if(foundCounter[counterNumber]) {
1383 str <<
"MonCounter '" << counterNumber <<
"' had already been read!";
1384 throw runtime_error(
str.str());
1386 foundCounter[counterNumber] =
true;
1387 for(
size_t i = 0 ;
i < counters.size(); ++
i) {
1388 counters[
i]->setInternalCounter(counterNumber);
1389 mons.push_back( counters[
i] );
◆ readL1Payload()
void TrigConfCoolWriter::readL1Payload |
( |
unsigned int |
run, |
|
|
CTPConfig & |
ctpc |
|
) |
| |
◆ readL1PrescalePayload()
void TrigConfCoolWriter::readL1PrescalePayload |
( |
unsigned int |
runNumber, |
|
|
unsigned int |
lumiblockNumber, |
|
|
unsigned int & |
lvl1PrescaleKey, |
|
|
TrigConf::PrescaleSet & |
prescale |
|
) |
| |
Reading luminosityblock-wise configuration information the COOL database.
- Parameters
-
runNumber | run number |
lumiblockNumber | luminosity block number |
lvl1PrescaleKey | L1 prescale configuration key |
prescale | L1 prescale configuration object |
Definition at line 1639 of file TrigConfCoolWriter.cxx.
1645 vr.until() =
vr.since()+1;
1648 IObjectIteratorPtr
objects = lvl1CkFolder->browseObjects(
vr.since(),
vr.since()+1, 0 );
1658 size_t nPrescales = lvl1PsFolder->listChannels().size();
1659 bool isRun2 = ( nPrescales == 512 );
1660 prescale.
resize( nPrescales );
1667 throw std::runtime_error(
"Lvl1 prescale access error: found empty prescale channel ");
1673 int64_t prescaleVal=0;
1681 prescale.
setId( lvl1PrescaleKey );
◆ readL1Thresholds()
Read run-wise L1 threshold vector from COOL database.
- Parameters
-
runNumber | run number |
items | Vector of Item object to be filled |
Definition at line 1436 of file TrigConfCoolWriter.cxx.
1442 IObjectIteratorPtr
objects = L1thrFolder->browseObjects(
vr.since(),
vr.until()-1, cool::ChannelSelection() );
1443 while (
objects->goToNext() ) {
◆ readRunPayload()
void TrigConfCoolWriter::readRunPayload |
( |
unsigned int |
runNumber, |
|
|
TrigConf::HLTFrame & |
hltFrame, |
|
|
unsigned int & |
masterConfigKey, |
|
|
unsigned int & |
hltPrescaleKey, |
|
|
std::string & |
configSource |
|
) |
| |
Reading run-wise configuration information from COOL database.
- Parameters
-
runNumber | run number |
hltFrame | HLT menu configuration object |
masterConfigKey | configuration super master key |
hltPrescaleKey | HLT prescale configuration key |
configSource | configuration source (DB connection string or XML file name(s)) |
Definition at line 1293 of file TrigConfCoolWriter.cxx.
1300 masterConfigKey = hltFrame.
smk();
◆ recreateDb()
cool::IDatabasePtr TrigConf::TrigConfCoolWriter::recreateDb |
( |
| ) |
|
|
private |
create a new COOL database with prior deletion of the old one
◆ recreateSchema()
void TrigConf::TrigConfCoolWriter::recreateSchema |
( |
int |
schemaVersion = 0 | ) |
|
Create a new schema in the COOL database with prior deletion of the old one.
Definition at line 235 of file TrigConfCoolWriter.cxx.
◆ setVerbosityLevel()
void TrigConf::TrigConfCoolWriter::setVerbosityLevel |
( |
unsigned int |
level | ) |
|
|
inline |
◆ shouldFolderBeUpdated()
bool TrigConf::TrigConfCoolWriter::shouldFolderBeUpdated |
( |
const std::string & |
foldername | ) |
|
|
inlineprivate |
◆ verbosityLevel()
unsigned int TrigConf::TrigConfCoolWriter::verbosityLevel |
( |
| ) |
const |
|
inline |
◆ writeHLTPayload()
Definition at line 326 of file TrigConfCoolWriter.cxx.
339 confkeyFolder->storeObject(
vr.since(),
vr.until(),
payload, 0);
342 m_ostream <<
"<writeHLTPayload> caught and re-throw exception: " <<
e.what() << endl
343 <<
"WARNING: Failed to write configuration keys to COOL" << endl;
366 ChannelId menuChannel(0);
370 hltMenuFolder->setupStorageBuffer();
371 hltGroupFolder->setupStorageBuffer();
377 hltMenuFolder->storeObject(
vr.since(),
vr.until(),
payload, menuChannel);
380 hltGroupFolder->storeObject(
vr.since(),
vr.until(), payloadGroups, menuChannel);
381 m_ostream <<
"Writing (to buffer) HLT chain " <<
chain->chain_name()
382 <<
"(id " <<
chain->chain_counter()
383 <<
" level "<<
chain->level()
384 <<
") to COOL channel " << menuChannel
385 <<
" [belongs to groups " << payloadGroups[
"Groups"].data<cool::String4k>() <<
"]" << endl;
388 m_ostream <<
"Flushing HLT menu buffer to /TRIGGER/HLT/Menu" << endl;
390 hltMenuFolder->flushStorageBuffer();
392 catch ( cool::Exception &
e) {
393 m_ostream <<
"WARNING: Flushing buffer to DB failed: " <<
e.what() << endl
394 <<
"warning will be ignored, job will continue" << endl;
398 m_ostream <<
"Flushing HLT group buffer to /TRIGGER/HLT/Groups" << endl;
400 hltGroupFolder->flushStorageBuffer();
402 catch ( cool::Exception &
e) {
403 m_ostream <<
"WARNING: Flushing buffer to DB failed: " <<
e.what() << endl
404 <<
"warning will be ignored, job will continue" << endl;
408 catch( cool::Exception &
e) {
409 m_ostream <<
"Caught cool::Exception: " <<
e.what() << endl;
410 m_ostream <<
"Failed to write HLT menu to COOL" << endl;
414 m_ostream <<
"<writeHLTPayload> Caught std::exception: " <<
e.what() << endl;
418 m_ostream <<
"List of HLT Chains is empty, nothing is written to COOL" << endl;
◆ writeHltPrescalePayload() [1/3]
◆ writeHltPrescalePayload() [2/3]
void TrigConf::TrigConfCoolWriter::writeHltPrescalePayload |
( |
cool::ValidityKey |
since, |
|
|
cool::ValidityKey |
until, |
|
|
const TrigConf::HLTPrescaleSet & |
pss |
|
) |
| |
◆ writeHltPrescalePayload() [3/3]
Writing luminosityblock-wise configuration information the COOL database.
- Parameters
-
runNumber | run number |
lumiblockNumber | luminosity block number |
hltPrescaleKey | HLT prescale configuration key |
prescale | HLT prescale configuration object |
Definition at line 1040 of file TrigConfCoolWriter.cxx.
◆ writeL1BunchGroupLBPayload() [1/2]
Writing LB-wise L1 bunch group definition to the COOL database.
- Parameters
-
Definition at line 979 of file TrigConfCoolWriter.cxx.
◆ writeL1BunchGroupLBPayload() [2/2]
Definition at line 991 of file TrigConfCoolWriter.cxx.
1002 m_ostream <<
"Store LVL1 BG key to /TRIGGER/LVL1/BunchGroupKey" << endl;
1003 lvl1BGKFolder->storeObject(
vr.since(),
vr.until(),
payload, 0);
1010 m_ostream <<
"Store LVL1 BG content to /TRIGGER/LVL1/BunchGroupContent" << endl;
1011 lvl1BGContentFolder->storeObject(
vr.since(),
vr.until(),
payload, 0);
1015 m_ostream <<
"<writeLVL1BGPayload> caugh and re-throw exception: " <<
e.what() << endl;
◆ writeL1BunchGroupRunPayload() [1/2]
◆ writeL1BunchGroupRunPayload() [2/2]
Writing run-wise L1 bunch group names and item to bunch group mapping to COOL.
- Parameters
-
Definition at line 945 of file TrigConfCoolWriter.cxx.
952 rangeInfo(
"LVL1 bunch group descriptions",
vr.since(),
vr.until());
956 m_ostream <<
"Store LVL1 BG description buffer to /TRIGGER/LVL1/BunchGroupDescription" << endl;
957 bgDescFolder->storeObject(
vr.since(),
vr.until(),
payload, 0);
960 m_ostream <<
"<writeL1BunchGroupRunPayload> caught and re-throw exception: " <<
e.what() << endl;
◆ writeL1CTPCoreInputMapping()
Definition at line 894 of file TrigConfCoolWriter.cxx.
906 tipFolder->setupStorageBuffer();
910 cool::ChannelId tipNum =
static_cast<cool::ChannelId
>(tip->tipNumber());
912 stringstream tipName;
913 tipName <<
"name:" << tip->thresholdName();
914 tipName <<
"|thresh bit:" << tip->thresholdBit();
915 tipName <<
"|pos:" << tip->thresholdMapping();
916 tipName <<
"|active:" << tip->thresholdActive();
917 tipName <<
"|ctpin slot:" << tip->slot();
918 tipName <<
"|con:" << tip->connector();
919 tipName <<
"|cable bit:" << tip->cableBit();
920 m_ostream <<
"Write TIP / channel " << tipNum <<
" : " << tipName.str() << endl;
923 tipFolder->storeObject(
vr.since(),
vr.until(),
payload, tipNum);
925 m_ostream <<
"Flushing LVL1 CTPInputMap buffer to /TRIGGER/LVL1/CTPCoreInputMapping" << endl;
926 tipFolder->flushStorageBuffer();
927 }
catch( cool::Exception &
e) {
928 m_ostream <<
"Caught cool::Exception: " <<
e.what() << endl;
929 m_ostream <<
"Failed to write LVL1 TIP mapping to COOL" << endl;
932 m_ostream <<
"<writeLVL1RunPayload> Caught std::exception: " <<
e.what() << endl;
◆ writeL1MenuPayload() [1/2]
◆ writeL1MenuPayload() [2/2]
Writing L1 run-wise configuration information to the COOL database.
- Parameters
-
runNumber | run number |
lvl1Menu | L1 Menu |
Definition at line 746 of file TrigConfCoolWriter.cxx.
764 lvl1ThresholdFolder->setupStorageBuffer();
767 cool::ChannelId thrChannel = 0;
770 m_ostream <<
"Writing (to buffer) LVL1 threshold " << thr->name()
771 <<
" (version " << thr->version() <<
") to channel "
772 << thrChannel << endl;
773 lvl1ThresholdFolder->storeObject(
vr.since(),
vr.until(), payloadThr, thrChannel++);
779 m_ostream <<
"Writing (to buffer) LVL1 threshold 'JetWeights':";
781 std::copy(jetweights.begin(), jetweights.end(), std::ostream_iterator<int>(
m_ostream,
", "));
784 lvl1ThresholdFolder->storeObject(
vr.since(),
vr.until(), payloadJW, thrChannel++);
787 m_ostream <<
"Writing (to buffer) LVL1 threshold 'MET Significance parameters':";
790 lvl1ThresholdFolder->storeObject(
vr.since(),
vr.until(), payloadMETSigParams, thrChannel++);
793 m_ostream <<
"Flushing LVL1 thresholds buffer to /TRIGGER/LVL1/Thresholds" << endl;
795 lvl1ThresholdFolder->flushStorageBuffer();
797 catch ( cool::Exception &
e) {
798 m_ostream <<
"WARNING: Flushing buffer to DB failed: " <<
e.what() << endl
799 <<
"warning will be ignored, job will continue" << endl;
802 }
catch( cool::Exception &
e) {
803 m_ostream <<
"Caught cool::Exception: " <<
e.what() << endl;
804 m_ostream <<
"Failed to write LVL1 menu to COOL" << endl;
807 m_ostream <<
"<writeLVL1RunPayload> Caught std::exception: " <<
e.what() << endl;
824 lvl1MenuFolder->setupStorageBuffer();
825 lvl1ItemDefFolder->setupStorageBuffer();
830 cool::ChannelId menuChannel =
static_cast<cool::ChannelId
>(
item->ctpId());
831 m_ostream <<
"Writing (to buffer) LVL1 item " <<
item->name()
832 <<
" (logic " << payloadItemDef[
"Logic"].data<cool::String255>()
833 <<
": [" << payloadItemDef[
"ConditionsList"].data<cool::String4k>() <<
"]) to channel "
834 << menuChannel << endl;
836 lvl1MenuFolder->storeObject(
vr.since(),
vr.until(), payloadMenu, menuChannel);
839 lvl1ItemDefFolder->storeObject(
vr.since(),
vr.until(), payloadItemDef, menuChannel);
843 m_ostream <<
"Flushing LVL1 menu buffer to /TRIGGER/LVL1/Menu" << endl;
845 lvl1MenuFolder->flushStorageBuffer();
847 catch ( cool::Exception &
e) {
848 m_ostream <<
"WARNING: Flushing buffer to DB failed: " <<
e.what() << endl
849 <<
"warning will be ignored, job will continue" << endl;
853 m_ostream <<
"Flushing LVL1 item buffer to /TRIGGER/LVL1/ItemDef" << endl;
855 lvl1ItemDefFolder->flushStorageBuffer();
857 catch ( cool::Exception &
e) {
858 m_ostream <<
"WARNING: Flushing buffer to DB failed: " <<
e.what() << endl
859 <<
"warning will be ignored, job will continue" << endl;
863 }
catch( cool::Exception &
e) {
864 m_ostream <<
"Caught cool::Exception: " <<
e.what() << endl;
865 m_ostream <<
"Failed to write LVL1 menu to COOL" << endl;
868 m_ostream <<
"<writeLVL1RunPayload> Caught std::exception: " <<
e.what() << endl;
◆ writeL1MonPayload() [1/2]
Definition at line 508 of file TrigConfCoolWriter.cxx.
511 if(lvl1Menu == 0)
throw std::runtime_error(
"L1 trigger menu ptr is NULL");
530 std::map<cool::ChannelId,std::string> monNames;
531 std::map<cool::ChannelId,std::string> thrNames;
532 std::map<cool::ChannelId,std::string> slots;
533 std::map<cool::ChannelId,std::string> cons;
534 std::map<cool::ChannelId,std::string> mults;
535 std::map<cool::ChannelId,std::string> starts;
536 std::map<cool::ChannelId,std::string> ends;
537 std::map<cool::ChannelId,std::string> actives;
540 std::map<cool::ChannelId,std::string> counterType;
541 std::map<cool::ChannelId,uint16_t> bgId;
542 const std::vector<TrigConf::ThresholdMonitor*>& monCounter = lvl1Menu->
moncountVector();
543 std::vector<TrigConf::ThresholdMonitor*>::const_iterator
mc = monCounter.begin();
544 for(;
mc != monCounter.end(); ++
mc) {
545 cool::ChannelId
index =
static_cast<cool::ChannelId
>((*mc)->internalCounter());
549 if((*mc)->counterType().find(
"CTPMON") != std::string::npos) {
554 std::stringstream strSlot; strSlot << (*mc)->ctpinSlot();
555 std::stringstream strCon; strCon << (*mc)->ctpinConnector();
556 std::stringstream strMult; strMult << (*mc)->multiplicity();
557 std::stringstream strStart; strStart << (*mc)->thresholdStartBit();
558 std::stringstream strEnd; strEnd << (*mc)->thresholdEndBit();
560 if((*mc)->thresholdActive())
active =
"ENABLED";
565 if( monNames.find(
index) == monNames.end() ){
572 if( thrNames.find(
index) == thrNames.end() ){
574 m_ostream <<
"PROBLEM counter " <<
index <<
" : no thrNames in previous entries, overwrite all with new one" << endl;
575 }
else if( slots.find(
index) == slots.end() ){
577 m_ostream <<
"PROBLEM counter " <<
index <<
" : no slots in previous entries, overwrite all with new one" << endl;
578 }
else if( cons.find(
index) == cons.end() ){
580 m_ostream <<
"PROBLEM counter " <<
index <<
" : no cons in previous entries, overwrite all with new one" << endl;
581 }
else if( mults.find(
index) == mults.end() ){
583 m_ostream <<
"PROBLEM counter " <<
index <<
" : no mults in previous entries, overwrite all with new one" << endl;
584 }
else if( starts.find(
index) == starts.end() ){
586 m_ostream <<
"PROBLEM counter " <<
index <<
" : no starts in previous entries, overwrite all with new one" << endl;
587 }
else if( ends.find(
index) == ends.end() ){
589 m_ostream <<
"PROBLEM counter " <<
index <<
" : no ends in previous entries, overwrite all with new one" << endl;
590 }
else if( actives.find(
index) == actives.end() ){
592 m_ostream <<
"PROBLEM counter " <<
index <<
" : no actives in previous entries, overwrite all with new one" << endl;
593 }
else if( counterType.find(
index) == counterType.end() ){
595 m_ostream <<
"PROBLEM counter " <<
index <<
" : no counterType in previous entries, overwrite all with new one" << endl;
596 }
else if( bgId.find(
index) == bgId.end() ){
598 m_ostream <<
"PROBLEM counter " <<
index <<
" : no bgId in previous entries, overwrite all with new one" << endl;
602 std::vector<std::string> thrNamesCheck =
split(thrNames[
index],
":");
603 std::vector<std::string> slotsCheck =
split(slots[
index],
":");
604 std::vector<std::string> consCheck =
split(cons[
index],
":");
605 std::vector<std::string> multsCheck =
split(mults[
index],
":");
606 std::vector<std::string> startsCheck =
split(starts[
index],
":");
607 std::vector<std::string> endsCheck =
split(ends[
index],
":");
608 std::vector<std::string> activesCheck =
split(actives[
index],
":");
609 if (thrNamesCheck.size() != slotsCheck.size()||
610 thrNamesCheck.size() != consCheck.size()||
611 thrNamesCheck.size() != multsCheck.size()||
612 thrNamesCheck.size() != startsCheck.size()||
613 thrNamesCheck.size() != endsCheck.size()||
614 thrNamesCheck.size() != activesCheck.size()){
616 m_ostream <<
"PROBLEM counter " <<
index <<
" : numbers of entries are different, overwrite all with new one" << endl;
618 for (
unsigned int i = 0;
i < thrNamesCheck.size();
i++){
619 if(thrNamesCheck[
i]==(*mc)->thresholdName()&&
620 slotsCheck[
i]==strSlot.str()&&
621 consCheck[
i]==strCon.str()&&
622 multsCheck[
i]==strMult.str()&&
623 startsCheck[
i]==strStart.str()&&
624 endsCheck[
i]==strEnd.str()&&
639 monNames[
index]=(*mc)->name();
640 thrNames[
index]=(*mc)->thresholdName();
641 slots[
index]=strSlot.str();
642 cons[
index]=strCon.str();
643 mults[
index]=strMult.str();
644 starts[
index]=strStart.str();
645 ends[
index]=strEnd.str();
647 counterType[
index]=(*mc)->counterType();
648 bgId[
index]=(*mc)->bunchGroupId();
652 if (monNames[
index]!=(*mc)->name()){
653 std::stringstream
str;
655 str <<
" : previous monitor name" << monNames[
index];
656 str <<
", current monitor name " << (*mc)->name() << endl;
660 if(counterType[
index] != (*mc)->counterType()) {
661 std::stringstream
str;
663 str <<
" : previous type " << counterType[
index];
664 str <<
", current type " << (*mc)->counterType() << endl;
668 if(bgId[
index] != (*mc)->bunchGroupId()) {
669 std::stringstream
str;
671 str <<
" : previous bunch-group id " << bgId[
index];
672 str <<
", current id " << (*mc)->bunchGroupId() << endl;
676 monNames[
index]=(*mc)->name();
677 counterType[
index]=(*mc)->counterType();
678 bgId[
index]=(*mc)->bunchGroupId();
680 thrNames[
index]+=
":";thrNames[
index]+=(*mc)->thresholdName();
681 slots[
index]+=
":";slots[
index]+=strSlot.str();
683 mults[
index]+=
":";mults[
index]+=strMult.str();
684 starts[
index]+=
":";starts[
index]+=strStart.str();
696 monFolder->setupStorageBuffer();
698 it != thrNames.end();++
it) {
715 <<
" monname '" << monNames[
channel] <<
"'"
716 <<
" type '" << counterType[
channel] <<
"'"
717 <<
" bgid '" << bgId[
channel] <<
"'"
718 <<
" thnames '" <<
it->second <<
"'"
719 <<
" slots '" << slots[
channel] <<
"'"
720 <<
" connectors '" << cons[
channel] <<
"'"
721 <<
" multiplicities '" << mults[
channel] <<
"'"
722 <<
" start bits '" << starts[
channel] <<
"'"
723 <<
" end bits '" << ends[
channel] <<
"'"
724 <<
" thresholds active '" << actives[
channel] <<
"'"
728 monFolder->flushStorageBuffer();
729 }
catch( cool::Exception &
e) {
730 m_ostream <<
"Caught cool::Exception: " <<
e.what() << endl;
731 m_ostream <<
"Failed to write LVL1 monitoring mapping to COOL" << endl;
734 m_ostream <<
"<writeLVL1MonPayload> Caught std::exception: " <<
e.what() << endl;
◆ writeL1MonPayload() [2/2]
void TrigConf::TrigConfCoolWriter::writeL1MonPayload |
( |
unsigned int |
runNumber, |
|
|
const TrigConf::Menu * |
lvl1Menu |
|
) |
| |
Writing L1 run-wise monitoring configuration to COOL.
- Parameters
-
runNumber | run number |
lvl1Menu | L1 Menu |
Definition at line 500 of file TrigConfCoolWriter.cxx.
◆ writeL1Payload()
◆ writeL1PrescalePayload() [1/3]
◆ writeL1PrescalePayload() [2/3]
void TrigConf::TrigConfCoolWriter::writeL1PrescalePayload |
( |
cool::ValidityKey |
since, |
|
|
cool::ValidityKey |
until, |
|
|
unsigned int |
lvl1PrescaleKey, |
|
|
const TrigConf::PrescaleSet & |
prescaleSet |
|
) |
| |
Definition at line 1198 of file TrigConfCoolWriter.cxx.
1203 prescaleSet.
print(
"",5);
1212 m_ostream <<
"Store LVL1 prescale key " << lvl1PrescaleKey <<
" to /TRIGGER/LVL1/Lvl1ConfigKey" << endl;
1219 vector<int32_t> prescaleV = prescaleSet.
cuts();
1221 vector<int32_t>::const_iterator psIt = prescaleV.begin();
1224 lvl1PsConfFolder->setupStorageBuffer();
1226 m_ostream <<
"Writing (to buffer) LVL1 prescales [(value/channel)]:" << endl;
1235 m_ostream <<
"Flushing LVL1 prescales buffer to /TRIGGER/LVL1/Prescales" << endl;
1236 lvl1PsConfFolder->flushStorageBuffer();
1240 m_ostream <<
"<writeL1PrescalePayload> caught and re-throw exception: " <<
e.what() << endl;
◆ writeL1PrescalePayload() [3/3]
void TrigConfCoolWriter::writeL1PrescalePayload |
( |
unsigned int |
runNumber, |
|
|
unsigned int |
lumiblockNumber, |
|
|
unsigned int |
lvl1PrescaleKey, |
|
|
const TrigConf::PrescaleSet & |
prescale |
|
) |
| |
Writing luminosityblock-wise configuration information the COOL database.
- Parameters
-
runNumber | run number |
lumiblockNumber | luminosity block number |
hltpsk | HLT prescale configuration key |
prescale | L1 prescale configuration object |
Definition at line 1187 of file TrigConfCoolWriter.cxx.
◆ writeMCKPayload()
void TrigConf::TrigConfCoolWriter::writeMCKPayload |
( |
ValidityRange |
vr, |
|
|
unsigned int |
mck, |
|
|
std::string & |
release, |
|
|
std::string & |
info |
|
) |
| |
Definition at line 428 of file TrigConfCoolWriter.cxx.
438 rangeInfo(
"Monitoring configuration key",
vr.since(),
vr.until());
442 monconfkeyFolder->storeObject(
vr.since(),
vr.until(),
payload, 0,
"MenuAwareMonConfigKey-"+
release);
445 m_ostream <<
"<writeMCKPayload> caught and re-throw exception: " <<
e.what() << endl
446 <<
"WARNING: Failed to write monitoring configuration key (MCK) to COOL" << endl;
◆ writeRunPayload() [1/2]
◆ writeRunPayload() [2/2]
Writing run-wise configuration information the COOL database.
- Parameters
-
runNumber | run number |
masterConfigKey | configuration super master key |
hltPrescaleKey | HLT prescale configuration key |
lvl1Thr | L1 threshold configuration object |
ctpConfig | L1 CTP configuration object |
caloInfo | L1 calorimeter configuration object |
hltFrame | HLT menu configuration object |
configSource | configuration source (DB connection string or XML file name(s)) |
Definition at line 458 of file TrigConfCoolWriter.cxx.
◆ AutoDBOpen
◆ m_coolApp
cool::Application TrigConf::TrigConfCoolWriter::m_coolApp |
|
private |
◆ m_dbId
cool::DatabaseId TrigConf::TrigConfCoolWriter::m_dbId |
|
private |
◆ m_dbPtr
cool::IDatabasePtr TrigConf::TrigConfCoolWriter::m_dbPtr |
|
private |
◆ m_ostream
std::ostream& TrigConf::TrigConfCoolWriter::m_ostream |
|
private |
◆ m_verbosityLevel
int TrigConf::TrigConfCoolWriter::m_verbosityLevel {0} |
|
private |
◆ m_writeFolderList
std::vector<std::string> TrigConf::TrigConfCoolWriter::m_writeFolderList |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
static void setMaxThresholdsFromL1Version(unsigned int l1version)
void readL1ItemDef(unsigned int runNumber, const std::vector< TrigConf::TriggerItem * > &items, const std::vector< TrigConf::TriggerThreshold * > &thrs)
Read run-wise L1 item defintions (conditions) from COOL database.
void writeL1MonPayload(unsigned int runNumber, const TrigConf::Menu *lvl1Menu)
Writing L1 run-wise monitoring configuration to COOL.
static cool::IFolderPtr getLvl1PrescalesFolder(cool::IDatabasePtr db)
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
std::pair< std::vector< std::string >, std::map< unsigned int, unsigned char > > readL1BunchGroupRunPayload(unsigned int runNumber)
Reading bunch group configuration information from COOL database.
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
void readHLTPayload(unsigned int run, HLTFrame &hltFrame)
cool::Record createLvl1PrescalesPayload(cool::IFolderPtr, int prescale)
build a COOL db record from a LVL1 prescale value
std::vector< RunRange > RunRangeVec
static cool::IFolderPtr getHltChainGroupFolder(cool::IDatabasePtr db)
cool::Record createLvl1ConfigKeyPayload(cool::IFolderPtr, unsigned int lvl1PrescaleKey)
build a COOL db record from a LVL1 configuration key
void rangeInfo(const std::string &content, cool::ValidityKey since, cool::ValidityKey until)
TrigConf::PIT * readLvl1InputMap(const coral::AttributeList &al)
Build a LVL1 PIT object from COOL payload.
virtual void print(const std::string &indent="", unsigned int detail=1) const override
void setValues(int XSSigmaScale, int XSSigmaOffset, int XEmin, int XEmax, int TESqrtMin, int TESqrtMax)
cool::DatabaseId m_dbId
db connection string
void readL1Thresholds(unsigned int runNumber, std::vector< TrigConf::TriggerThreshold * > &thrs)
Read run-wise L1 threshold vector from COOL database.
static cool::IFolderPtr getLvl1ConfKeyFolder(cool::IDatabasePtr db)
int readHltPrescaleKey(const coral::AttributeList &al)
build the HLT prescale key from a COOL db record
static cool::IFolderPtr getLvl1MenuFolder(cool::IDatabasePtr db)
static int getDefaultSchemaVersion()
access to the version
static cool::IFolderPtr getLvl1BGKeyFolder(cool::IDatabasePtr db)
const BunchGroupSet & bunchGroupSet() const
std::vector< TrigConf::BunchGroup > readLvl1BGContent(const coral::AttributeList &al)
build the LVL1 Bunchgroup code
static cool::IFolderSetPtr createFolderStructure(cool::IDatabasePtr db, int schemaVersion=0)
creates the folder structure in the COOL database
static cool::IFolderPtr getHltConfKeyFolder(cool::IDatabasePtr db)
int readLvl1BGKey(const coral::AttributeList &al)
build the LVL1 Bunchgroup key value
cool::Record createLvl1METSigPayload(cool::IFolderPtr, const METSigParam &metSigParams)
build a COOL db record from a L1 MET significance global parameters
bool shouldFolderBeUpdated(const std::string &foldername)
check if foldername is in list of writeable folders
void readL1Menu(unsigned int runNumber, CTPConfig &ctpc)
Read L1 menu from COOL database.
METSigParam & metSigParam()
static cool::IFolderSetPtr createMonFolderStructure(cool::IDatabasePtr db, int schemaVersion=0)
creates the folder structure in the monitoring COOL database
cool::Record createLvl1ThresholdPayload(cool::IFolderPtr, const TrigConf::TriggerThreshold &thr)
build a COOL db record from a LVL1 TriggerItem
TriggerThreshold * createLvl1Threshold(const coral::AttributeList &al)
build a LVL1 TriggerThreshold from a COOL db record
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
HLT chain configuration information.
void readL1Items(unsigned int runNumber, std::vector< TrigConf::TriggerItem * > &items)
Read run-wise L1 item vector from COOL database.
void setPitNumber(const uint16_t &pitnumber)
void writeL1MenuPayload(ValidityRange vr, const TrigConf::Menu &lvl1Menu)
Writing L1 run-wise configuration information to the COOL database.
cool::Record createHltChainGroupPayload(cool::IFolderPtr, const TrigConf::HLTChain &ch)
build a COOL db record from a HLT chain
static cool::IFolderPtr getHltPrescalesFolder(cool::IDatabasePtr db)
cool::Record createLvl1BGDescPayload(cool::IFolderPtr fld, const TrigConf::BunchGroupSet &bgs, const TrigConf::Menu &lvl1Menu)
build a COOL db record from a bunch group description
std::pair< unsigned int, unsigned int > RunRange
static cool::IFolderPtr getMonConfKeyFolder(cool::IDatabasePtr db)
HLTSequenceList & theHLTSequenceList()
accessor to the list of HLT sequences
HLTPrescale & setPassThrough(float pass_through)
HLTPrescale & thePrescale(unsigned int chain_counter, HLTLevel level)
void setClock(const int &clock)
cool::Record createLvl1ItemDefPayload(cool::IFolderPtr, const TrigConf::TriggerItem &item)
build a COOL db record from a LVL1 TriggerItem (the conditions)
static cool::IFolderPtr getHltMenuFolder(cool::IDatabasePtr db)
HLTChain * createHLTChain(const coral::AttributeList &al, TrigConf::HLTSequenceList *sequences=0)
build an HLT chain from a COOL db record
cool::IDatabasePtr m_dbPtr
COOL database pointer.
unsigned int l1Version() const
bool dbIsOpen()
check if db is open
void readLvl1ConfigKey(const coral::AttributeList &al, unsigned int &lvl1PrescaleKey)
build the LVL1 configuration key from a coral::AttributeList
std::list< cont > & sets()
void writeL1BunchGroupRunPayload(ValidityRange vr, const Menu &lvl1Menu, const BunchGroupSet &bgs)
Writing run-wise L1 bunch group names and item to bunch group mapping to COOL.
void readLvl1Prescale(const coral::AttributeList &al, int &ps)
build the LVL1 prescale value from a coral::AttributeList
void writeL1BunchGroupLBPayload(const RunRangeVec &runRanges, unsigned int bgKey, const BunchGroupSet &bgs)
Writing LB-wise L1 bunch group definition to the COOL database.
unsigned int l1Version() const
cool::IDatabaseSvc & databaseService()
get COOL db service
void writeRunPayload(unsigned int runNumber, unsigned int masterConfigKey, unsigned int hltPrescaleKey, const TrigConf::ThresholdConfig &lvl1Thr, const TrigConf::CTPConfig &ctpConfig, const TrigConf::CaloInfo &caloInfo, const TrigConf::HLTFrame &hltFrame, const std::string &configSource)
Writing run-wise configuration information the COOL database.
const std::vector< TriggerThreshold * > & thresholdVector(L1DataDef::TriggerType) const
void setPrescale(unsigned int num, int64_t prescaleValue) __attribute__((deprecated))
Set the prescale NUM from the int64 value prescaleValue.
cool::Record createHltMenuPayload(cool::IFolderPtr, const TrigConf::HLTChain &, const std::string &concise)
build a COOL db record from a HLT chain
static cool::IFolderPtr getLvl1BGDescFolder(cool::IDatabasePtr db)
const std::vector< int32_t > & cuts() const
TriggerItem * createLvl1TriggerItem(const coral::AttributeList &al)
build a LVL1 TriggerItem from a COOL db record
void addBunchGroup(const BunchGroup &)
const PrescaleSet & prescaleSet(unsigned int partition=0) const
cool::Record createHltConfigKeysPayload(cool::IFolderPtr, unsigned int masterKey, unsigned int hltPrescaleKey, const std::string &configSource)
build a COOL db record from a set of HLT configuration keys
cool::Record createLvl1JetWeightPayload(cool::IFolderPtr, const std::vector< int > &jetweights)
build a COOL db record from a L1 Jet Weights vector
void readL1InputMapPayload(unsigned int runNumber, std::vector< TrigConf::PIT * > &pits, std::vector< TrigConf::TIP * > &tips)
Read run-wise PIT configuration from COOL database.
void setId(unsigned int id)
HLT chain configuration information.
void writeL1Payload(ValidityRange vr, const CTPConfig &ctpConfig)
bool addHLTChain(HLTChain *ch)
adds an HLTChain to the menu
cool::Record createMonConfigKeyPayload(cool::IFolderPtr fld, uint MCK, std::string &info)
build a COOL db record from a HLT monitoring configuration key
void writeHltPrescalePayload(unsigned int runNumber, unsigned int lumiblockNumber, const TrigConf::HLTPrescaleSet &pss)
Writing luminosityblock-wise configuration information the COOL database.
void setCut(unsigned int num, int32_t cut)
cool::Record createLvl1BGKeyPayload(cool::IFolderPtr, unsigned int lvl1BunchgroupKey)
build a COOL db record from a LVL1 bunch group key
cool::Application m_coolApp
COOL application.
def isRun2(cursor, schemaname)
static std::set< std::string > allTEsProduced(const TrigConf::HLTFrame &frame)
std::vector< std::string > m_writeFolderList
list of folders to which writing is restricted
void setTipNumber(const uint16_t &tipnumber)
static int readSchemaVersion(cool::IDatabasePtr db)
get the version of the COOL database
HLTPrescale & setPrescale(float prescale)
static cool::IFolderPtr getLvl1ItemDefFolder(cool::IDatabasePtr db)
cool::IDatabasePtr createDb()
create a new COOL database
static std::string ChainCondenseDisplay(const HLTChain &chain, const HLTFrame &frame)
std::ostream & m_ostream
output stream for all messages
void addGroupsToHltChain(const coral::AttributeList &al, const TrigConf::HLTChainList &chl)
add the groups to and HLT chain from a AttributeList
cool::Record createLvl1BGContentPayload(cool::IFolderPtr fld, const TrigConf::BunchGroupSet &bgs)
build a COOL db record from a bunch group definition value
void setCTPVersion(unsigned int v)
std::vector< std::string > split(const std::string &line, const std::string &del=" ")
void writeHLTPayload(ValidityRange vr, const HLTFrame &hltFrame, const std::string &configSource)
const Menu & menu() const
void setL1Version(unsigned int v)
HLTPrescale & setRerunPrescale(const std::string &targetName, float ps)
cool::Record createLvl1MenuPayload(cool::IFolderPtr, const TrigConf::TriggerItem &item)
build a COOL db record from a LVL1 TriggerItem (the item name and version)
const HLTChainList & getHLTChainList() const
const accessor to the list of HLT chains
static cool::IFolderPtr getLvl1BGContentFolder(cool::IDatabasePtr db)
std::vector< TrigConf::ThresholdMonitor * > readLvl1MonMap(const cool::IRecord &payload)
Build a LVL1 mon counter object from COOL payload.
static void printFolderStructure(cool::IDatabasePtr db, std::ostream &o)
prints the folder structure that is in the COOL database
cool::Record createLvl1InputMapPayload(cool::IFolderPtr, const TrigConf::TIP &tip)
build a COOL db record from a PIT-mapping string value
const HLTPrescaleSetCollection & getPrescaleSetCollection() const
cool::IDatabasePtr openDb(bool readOnly=true)
open COOL db connection
void readHltPrescale(const coral::AttributeList &al, float &ps, float &pt, float &rrps)
build the HLT prescale value from a COOL db record
const boost::regex rr(r_r)
HLTChainList & theHLTChainList()
accessor to the list of HLT chains
static cool::IFolderPtr getLvl1MonMapFolder(cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1ThresholdFolder(cool::IDatabasePtr db)
static cool::IFolderPtr getHltPrescaleKeyFolder(cool::IDatabasePtr db)
const std::vector< int > & jetWeights() const
static cool::IFolderPtr getLvl1InputMapFolder(cool::IDatabasePtr db)
void readHltConfigKeys(const coral::AttributeList &al, unsigned int &masterConfigKey, unsigned int &hltPrescaleKey, std::string &configSource)
read the HLT configuration keys from a coral::AttributeList
virtual void print(const std::string &indent="", unsigned int detail=1) const
void setConfigSource(const std::string &src)
TrigConf::TIP * readLvl1TIPMap(const coral::AttributeList &al)
void setIOV(uint32_t start_run, uint32_t start_lb, uint32_t end_run, uint32_t end_lb)
sets the IOV of the prescale set
const std::string & configSource() const
void writeL1PrescalePayload(unsigned int runNumber, unsigned int lumiblockNumber, unsigned int lvl1PrescaleKey, const TrigConf::PrescaleSet &prescale)
Writing luminosityblock-wise configuration information the COOL database.
void writeL1CTPCoreInputMapping(ValidityRange vr, const Menu &lvl1Menu)