|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef TrigConf_TrigConfCoolWriter
6 #define TrigConf_TrigConfCoolWriter
8 #include "CoolApplication/Application.h"
9 #include "CoolKernel/DatabaseId.h"
10 #include "CoolKernel/Exception.h"
11 #include "CoolKernel/IDatabaseSvc.h"
12 #include "CoolKernel/IDatabase.h"
21 class ThresholdConfig;
32 class TriggerThreshold;
33 class ThresholdMonitor;
36 typedef std::pair<unsigned int,unsigned int>
RunRange;
43 bool infiniteRange = (
run & 0x80000000) != 0;
45 m_range.first = cool::ValidityKeyMin;
46 m_range.second = cool::ValidityKeyMax;
65 int firstRN =
rr.first;
66 int lastRN =
rr.second;
68 bool infiniteRange = (firstRN & 0x80000000) != 0;
70 m_range.first = cool::ValidityKeyMin;
71 m_range.second = cool::ValidityKeyMax;
80 std::pair<cool::ValidityKey,cool::ValidityKey>
m_range;
135 const std::string& configSource);
155 unsigned int masterConfigKey,
156 unsigned int hltPrescaleKey,
161 const std::string & configSource);
163 unsigned int masterConfigKey,
164 unsigned int hltPrescaleKey,
169 const std::string & configSource);
210 const Menu& lvl1Menu,
224 unsigned int lumiblockNumber,
229 cool::ValidityKey
until,
241 unsigned int lumiblockNumber,
242 unsigned int lvl1PrescaleKey,
245 unsigned int lvl1PrescaleKey,
248 cool::ValidityKey
until,
249 unsigned int lvl1PrescaleKey,
264 unsigned int & masterConfigKey,
265 unsigned int & hltPrescaleKey,
266 std::string & configSource );
282 unsigned int lumiblockNumber,
294 unsigned int lumiblockNumber,
305 std::pair<std::vector<std::string>, std::map<unsigned int,unsigned char> >
317 unsigned int lumiblockNumber,
318 unsigned int& lvl1PrescaleKey,
327 std::vector<TrigConf::PIT*>& pits,
328 std::vector<TrigConf::TIP*>& tips);
337 std::vector<TrigConf::ThresholdMonitor*>& mons);
346 std::vector<TrigConf::TriggerItem*>&
items);
355 std::vector<TrigConf::TriggerThreshold*>& thrs);
366 const std::vector<TrigConf::TriggerItem*>&
items,
367 const std::vector<TrigConf::TriggerThreshold*>& thrs);
376 std::vector<std::string>
checkPayloadSize(
unsigned int run,
unsigned int lb,
int displayMode,
bool openend,
unsigned int lbend);
410 cool::IDatabasePtr
openDb(
bool readOnly =
true );
ValidityRange(unsigned int run, unsigned int lb)
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.
~TrigConfCoolWriter()
destructor
ValidityRange(unsigned int run)
std::pair< std::vector< std::string >, std::map< unsigned int, unsigned char > > readL1BunchGroupRunPayload(unsigned int runNumber)
Reading bunch group configuration information from COOL database.
void readHLTPayload(unsigned int run, HLTFrame &hltFrame)
std::vector< RunRange > RunRangeVec
void rangeInfo(const std::string &content, cool::ValidityKey since, cool::ValidityKey until)
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.
std::vector< std::string > checkPayloadSize(unsigned int run, unsigned int lb, int displayMode, bool openend, unsigned int lbend)
void readL1MonMapPayload(unsigned int runNumber, std::vector< TrigConf::ThresholdMonitor * > &mons)
Read run-wise LVL1 monitoring configuration from COOL database.
int run(int argc, char *argv[])
cool::IDatabasePtr recreateDb()
create a new COOL database with prior deletion of the old one
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.
cool::ValidityKey & until()
void readL1PrescalePayload(unsigned int runNumber, unsigned int lumiblockNumber, unsigned int &lvl1PrescaleKey, TrigConf::PrescaleSet &prescale)
Reading luminosityblock-wise configuration information the COOL database.
AutoDBOpen(TrigConfCoolWriter *writer, bool readOnly)
void readL1Items(unsigned int runNumber, std::vector< TrigConf::TriggerItem * > &items)
Read run-wise L1 item vector from COOL database.
void printSchema(std::ostream &o)
Prints the schema in the COOL database.
void writeL1MenuPayload(ValidityRange vr, const TrigConf::Menu &lvl1Menu)
Writing L1 run-wise configuration information to the COOL database.
void writeMCKPayload(ValidityRange vr, unsigned int mck, std::string &release, std::string &info)
void recreateSchema(int schemaVersion=0)
Create a new schema in the COOL database with prior deletion of the old one.
void readHltPrescalePayload(unsigned int runNumber, unsigned int lumiblockNumber, TrigConf::HLTPrescaleSet &pss)
Reading luminosityblock-wise configuration information the COOL database.
std::pair< unsigned int, unsigned int > RunRange
unsigned int verbosityLevel() const
Forward iterator to traverse the main components of the trigger configuration.
TrigConfCoolWriter(const TrigConfCoolWriter &orig)
copy constructor
cool::IDatabasePtr m_dbPtr
COOL database pointer.
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.
bool dbIsOpen()
check if db is open
void writeHltPrescalePayload(cool::ValidityKey since, cool::ValidityKey until, const TrigConf::HLTPrescaleSet &pss)
void addWriteFolder(const std::string &fname)
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 dropDb()
delete the COOL database
void writeL1BunchGroupLBPayload(const RunRangeVec &runRanges, unsigned int bgKey, const BunchGroupSet &bgs)
Writing LB-wise L1 bunch group definition to the COOL database.
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.
ValidityRange(cool::ValidityKey since, cool::ValidityKey until)
void readL1InputMapPayload(unsigned int runNumber, std::vector< TrigConf::PIT * > &pits, std::vector< TrigConf::TIP * > &tips)
Read run-wise PIT configuration from COOL database.
void readL1BunchGroupLBPayload(unsigned int runNumber, unsigned int lumiblockNumber, int &bgKey, TrigConf::BunchGroupSet &bgs)
Reading lb-wise bunch group configuration information from COOL database.
cool::ValidityKey & since()
HLT chain configuration information.
void writeL1Payload(ValidityRange vr, const CTPConfig &ctpConfig)
void setVerbosityLevel(unsigned int level)
void writeHltPrescalePayload(unsigned int runNumber, unsigned int lumiblockNumber, const TrigConf::HLTPrescaleSet &pss)
Writing luminosityblock-wise configuration information the COOL database.
cool::Application m_coolApp
COOL application.
std::vector< std::string > m_writeFolderList
list of folders to which writing is restricted
TrigConfCoolWriter()
default constructor
void readL1Payload(unsigned int run, CTPConfig &ctpc)
cool::IDatabasePtr createDb()
create a new COOL database
std::ostream & m_ostream
output stream for all messages
bool checkDbConnection(bool readonly)
Reading/Writing of trigger configuration data from/to COOL.
void writeHLTPayload(ValidityRange vr, const HLTFrame &hltFrame, const std::string &configSource)
TrigConfCoolWriter * m_writer
std::pair< cool::ValidityKey, cool::ValidityKey > m_range
cool::IDatabasePtr openDb(bool readOnly=true)
open COOL db connection
const boost::regex rr(r_r)
ValidityRange(const RunRange &rr)
void printSchemaVersion(std::ostream &o)
Prints the schema in the COOL database.
writer
show summary of content
TrigConfCoolWriter(const std::string &dbId, std::ostream &o=std::cout)
constructor
void createSchema(int schemaVersion=0)
Create a new schema in the COOL database.
void writeL1PrescalePayload(unsigned int runNumber, unsigned int lumiblockNumber, unsigned int lvl1PrescaleKey, const TrigConf::PrescaleSet &prescale)
Writing luminosityblock-wise configuration information the COOL database.
bool HLTPrescaleFolderExists()
void writeL1CTPCoreInputMapping(ValidityRange vr, const Menu &lvl1Menu)