#include <RevisionDML.h>
Classes | |
class | DataID |
class | Entry |
class | HltEntry |
class | LumiEntry |
class | TrgEntry |
Public Member Functions | |
void | addEntry (coral::ISchema &schema, const std::string &datatableName, const Entry &entry, unsigned long long branch_id, const std::string &branchname) |
void | addRevision (coral::ISchema &schema, const std::string &datatableName, const Entry &revision, unsigned long long branch_id, std::string &branchname) |
unsigned long long | addRunToCurrentHFDataTag (coral::ISchema &schema, unsigned int runnum, unsigned long long lumiid, unsigned long long trgid, unsigned long long hltid, const std::string &patchcomment) |
void | bookNewEntry (coral::ISchema &schema, const std::string &datatableName, Entry &entry) |
void | bookNewRevision (coral::ISchema &schema, const std::string &datatableName, Entry &revision) |
unsigned long long | branchIdByName (coral::ISchema &schema, const std::string &branchName) |
unsigned long long | currentHFDataTagId (coral::ISchema &schema) |
DataID | dataIDForRun (coral::ISchema &schema, unsigned int runnum, unsigned long long tagid) |
unsigned long long | getEntryInBranchByName (coral::ISchema &schema, const std::string &datatableName, const std::string &entryname, const std::string &branchname) |
unsigned long long | HFDataTagIdByName (coral::ISchema &schema, const std::string &datatagname) |
void | insertHltRunData (coral::ISchema &schema, const HltEntry &hltentry) |
void | insertLumiRunData (coral::ISchema &schema, const LumiEntry &lumientry) |
void | insertTrgRunData (coral::ISchema &schema, const TrgEntry &trgentry) |
Definition at line 9 of file RevisionDML.h.
void lumi::RevisionDML::addEntry | ( | coral::ISchema & | schema, |
const std::string & | datatableName, | ||
const Entry & | entry, | ||
unsigned long long | branch_id, | ||
const std::string & | branchname | ||
) |
Definition at line 64 of file RevisionDML.cc.
References lumi::RevisionDML::Entry::data_id, lumi::RevisionDML::Entry::entry_id, lumi::RevisionDML::Entry::entry_name, lumi::LumiNames::entryTableName(), nameDealer::entryTableName(), fileCollector::now, lumi::RevisionDML::Entry::revision_id, lumi::LumiNames::revisionTableName(), lumi::LumiNames::revmapTableName(), nameDealer::revmapTableName(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by lumi::Lumi2DB::writeAllLumiDataToSchema2(), lumi::HLTV32DB::writeHltDataToSchema2(), and lumi::TRGScalers2DB::writeTrgDataToSchema2().
void lumi::RevisionDML::addRevision | ( | coral::ISchema & | schema, |
const std::string & | datatableName, | ||
const Entry & | revision, | ||
unsigned long long | branch_id, | ||
std::string & | branchname | ||
) |
1.insert a new revision into the revisions table 2.insert into data_id, revision_id pair to datatable_revmap insert into revisions(revision_id,branch_id,branch_name,ctime) values() insert into datatable_rev(data_id,revision_id) values())
Definition at line 102 of file RevisionDML.cc.
References lumi::RevisionDML::Entry::data_id, fileCollector::now, lumi::RevisionDML::Entry::revision_id, lumi::LumiNames::revisionTableName(), lumi::LumiNames::revmapTableName(), nameDealer::revmapTableName(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by lumi::Lumi2DB::writeAllLumiDataToSchema2(), lumi::HLTV32DB::writeHltDataToSchema2(), and lumi::TRGScalers2DB::writeTrgDataToSchema2().
unsigned long long lumi::RevisionDML::addRunToCurrentHFDataTag | ( | coral::ISchema & | schema, |
unsigned int | runnum, | ||
unsigned long long | lumiid, | ||
unsigned long long | trgid, | ||
unsigned long long | hltid, | ||
const std::string & | patchcomment | ||
) |
Definition at line 239 of file RevisionDML.cc.
References fileCollector::now, AlCaHLTBitMon_QueryRunRegistry::string, and lumi::LumiNames::tagRunsTableName().
void lumi::RevisionDML::bookNewEntry | ( | coral::ISchema & | schema, |
const std::string & | datatableName, | ||
Entry & | entry | ||
) |
allocate new revision_id,entry_id,data_id
Definition at line 46 of file RevisionDML.cc.
References lumi::RevisionDML::Entry::data_id, lumi::RevisionDML::Entry::entry_id, lumi::LumiNames::entryTableName(), lumi::idDealer::generateNextIDForTable(), lumi::RevisionDML::Entry::revision_id, lumi::LumiNames::revisionTableName(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by lumi::Lumi2DB::writeAllLumiDataToSchema2(), lumi::HLTV32DB::writeHltDataToSchema2(), and lumi::TRGScalers2DB::writeTrgDataToSchema2().
void lumi::RevisionDML::bookNewRevision | ( | coral::ISchema & | schema, |
const std::string & | datatableName, | ||
Entry & | revision | ||
) |
allocate new revision_id,data_id
Definition at line 56 of file RevisionDML.cc.
References lumi::RevisionDML::Entry::data_id, lumi::idDealer::generateNextIDForTable(), lumi::RevisionDML::Entry::revision_id, and lumi::LumiNames::revisionTableName().
Referenced by lumi::Lumi2DB::writeAllLumiDataToSchema2(), lumi::HLTV32DB::writeHltDataToSchema2(), and lumi::TRGScalers2DB::writeTrgDataToSchema2().
unsigned long long lumi::RevisionDML::branchIdByName | ( | coral::ISchema & | schema, |
const std::string & | branchName | ||
) |
select revision_id from revisions where name=:branchName
unsigned long long lumi::RevisionDML::currentHFDataTagId | ( | coral::ISchema & | schema | ) |
Definition at line 190 of file RevisionDML.cc.
References lumi::LumiNames::tagsTableName().
Referenced by LumiCorrectionSource::fillparamcache().
lumi::RevisionDML::DataID lumi::RevisionDML::dataIDForRun | ( | coral::ISchema & | schema, |
unsigned int | runnum, | ||
unsigned long long | tagid | ||
) |
Definition at line 272 of file RevisionDML.cc.
References lumi::RevisionDML::DataID::hlt_id, lumi::RevisionDML::DataID::lumi_id, cond::lumiid, mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, lumi::LumiNames::tagRunsTableName(), and lumi::RevisionDML::DataID::trg_id.
Referenced by LumiCorrectionSource::fillparamcache().
unsigned long long lumi::RevisionDML::getEntryInBranchByName | ( | coral::ISchema & | schema, |
const std::string & | datatableName, | ||
const std::string & | entryname, | ||
const std::string & | branchname | ||
) |
select e.entry_id from entrytabl e,revisiontable r where r.revision_id=e.revision_id and e.name=:entryname and r.branch_name=:branchname
Definition at line 17 of file RevisionDML.cc.
References lumi::LumiNames::entryTableName(), lumi::LumiNames::revisionTableName(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by lumi::Lumi2DB::writeAllLumiDataToSchema2(), lumi::HLTV32DB::writeHltDataToSchema2(), and lumi::TRGScalers2DB::writeTrgDataToSchema2().
unsigned long long lumi::RevisionDML::HFDataTagIdByName | ( | coral::ISchema & | schema, |
const std::string & | datatagname | ||
) |
Definition at line 214 of file RevisionDML.cc.
References lumiCalc2::datatagid, AlCaHLTBitMon_QueryRunRegistry::string, and lumi::LumiNames::tagsTableName().
Referenced by LumiCorrectionSource::fillparamcache().
void lumi::RevisionDML::insertHltRunData | ( | coral::ISchema & | schema, |
const HltEntry & | hltentry | ||
) |
Definition at line 168 of file RevisionDML.cc.
References lumi::RevisionDML::Entry::data_id, lumi::RevisionDML::Entry::entry_id, lumi::RevisionDML::Entry::entry_name, lumi::LumiNames::hltdataTableName(), nameDealer::hltdataTableName(), dataDML::hltrundata, lumi::RevisionDML::HltEntry::npath, lumi::RevisionDML::HltEntry::pathnames, lumi::RevisionDML::HltEntry::runnumber, lumi::RevisionDML::HltEntry::source, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by lumi::HLTV32DB::writeHltDataToSchema2().
void lumi::RevisionDML::insertLumiRunData | ( | coral::ISchema & | schema, |
const LumiEntry & | lumientry | ||
) |
Definition at line 126 of file RevisionDML.cc.
References lumi::RevisionDML::LumiEntry::bgev, lumi::RevisionDML::Entry::data_id, lumi::RevisionDML::Entry::entry_id, lumi::RevisionDML::Entry::entry_name, lumi::LumiNames::lumidataTableName(), nameDealer::lumidataTableName(), dataDML::lumirundata, lumi::RevisionDML::LumiEntry::ncollidingbunches, lumi::RevisionDML::LumiEntry::runnumber, lumi::RevisionDML::LumiEntry::source, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by lumi::Lumi2DB::writeAllLumiDataToSchema2().
void lumi::RevisionDML::insertTrgRunData | ( | coral::ISchema & | schema, |
const TrgEntry & | trgentry | ||
) |
Definition at line 147 of file RevisionDML.cc.
References lumi::RevisionDML::TrgEntry::bitnames, lumi::RevisionDML::TrgEntry::bitzeroname, lumi::RevisionDML::Entry::data_id, lumi::RevisionDML::Entry::entry_id, lumi::RevisionDML::Entry::entry_name, lumi::RevisionDML::TrgEntry::runnumber, lumi::RevisionDML::TrgEntry::source, AlCaHLTBitMon_QueryRunRegistry::string, lumi::LumiNames::trgdataTableName(), nameDealer::trgdataTableName(), and dataDML::trgrundata.
Referenced by lumi::TRGScalers2DB::writeTrgDataToSchema2().