Definition at line 22 of file HLTDummy2DB.cc.
◆ HLTDummy2DB()
lumi::HLTDummy2DB::HLTDummy2DB |
( |
const std::string & |
dest | ) |
|
◆ ~HLTDummy2DB()
lumi::HLTDummy2DB::~HLTDummy2DB |
( |
| ) |
|
|
override |
◆ dataType()
const std::string lumi::HLTDummy2DB::dataType |
( |
| ) |
const |
|
overridevirtual |
◆ retrieveData()
unsigned long long lumi::HLTDummy2DB::retrieveData |
( |
unsigned int |
runnum | ) |
|
|
overridevirtual |
Implements lumi::DataPipe.
Definition at line 34 of file HLTDummy2DB.cc.
38 coral::ConnectionService* svc =
new coral::ConnectionService;
43 coral::ISessionProxy* session = svc->connect(
m_dest, coral::Update);
45 unsigned int totalcmsls = 32;
46 session->transaction().start(
false);
47 coral::ISchema& schema = session->nominalSchema();
50 coral::AttributeList hltData;
51 hltData.extend<
unsigned long long>(
"HLT_ID");
52 hltData.extend<
unsigned int>(
"RUNNUM");
53 hltData.extend<
unsigned int>(
"CMSLSNUM");
55 hltData.extend<
unsigned long long>(
"INPUTCOUNT");
56 hltData.extend<
unsigned long long>(
"ACCEPTCOUNT");
57 hltData.extend<
unsigned int>(
"PRESCALE");
58 coral::IBulkOperation* hltInserter = hlttable.dataEditor().bulkInsert(hltData, totalcmsls * 260);
60 unsigned long long& hlt_id = hltData[
"HLT_ID"].data<
unsigned long long>();
61 unsigned int& hltrunnum = hltData[
"RUNNUM"].data<
unsigned int>();
62 unsigned int& cmslsnum = hltData[
"CMSLSNUM"].data<
unsigned int>();
64 unsigned long long& inputcount = hltData[
"INPUTCOUNT"].data<
unsigned long long>();
65 unsigned long long& acceptcount = hltData[
"ACCEPTCOUNT"].data<
unsigned long long>();
66 unsigned int&
prescale = hltData[
"PRESCALE"].data<
unsigned int>();
68 for (
unsigned int i = 1;
i <= totalcmsls; ++
i) {
69 for (
unsigned int j = 1;
j < 165; ++
j) {
74 ::sprintf(
c,
"%d",
j);
79 hltInserter->processNextIteration();
85 std::cout <<
"database problem " << er.what() << std::endl;
86 session->transaction().rollback();
92 session->transaction().commit();
References c, gather_cfg::cout, Exception, lumi::idDealer::generateNextIDForTable(), lumi::LumiNames::hltTableName(), mps_fire::i, dqmiolumiharvest::j, lumi::DataPipe::m_authpath, lumi::DataPipe::m_dest, BTVHLTOfflineSource_cfi::pathname, lumi::DBConfig::setAuthentication(), and AlCaHLTBitMon_QueryRunRegistry::string.
◆ sourceType()
const std::string lumi::HLTDummy2DB::sourceType |
( |
| ) |
const |
|
overridevirtual |