CMS 3D CMS Logo

List of all members | Classes | Public Member Functions
lumi::RevisionDML Class Reference

#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)
 

Detailed Description

Definition at line 9 of file RevisionDML.h.

Member Function Documentation

◆ addEntry()

void lumi::RevisionDML::addEntry ( coral::ISchema &  schema,
const std::string &  datatableName,
const Entry entry,
unsigned long long  branch_id,
const std::string &  branchname 
)
  1. allocate and insert a new revision in the revisions table
  2. allocate and insert a new entry into the entry table with the new revision
  3. insert into data_rev table new data_id,revision_id mapping insert into revisions(revision_id,branch_id,branch_name,comment,ctime) values() insert into datatablename_entries (entry_id,revision_id) values() insert into datatablename_rev(data_id,revision_id) values()

Definition at line 60 of file RevisionDML.cc.

References mps_splice::entry, lumi::LumiNames::entryTableName(), submitPVValidationJobs::now, lumi::LumiNames::revisionTableName(), lumi::LumiNames::revmapTableName(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by lumi::Lumi2DB::writeAllLumiDataToSchema2(), lumi::HLTV32DB::writeHltDataToSchema2(), and lumi::TRGScalers2DB::writeTrgDataToSchema2().

64  {
65  coral::AttributeList revdata;
66  revdata.extend("REVISION_ID", typeid(unsigned long long));
67  revdata.extend("BRANCH_ID", typeid(unsigned long long));
68  revdata.extend("BRANCH_NAME", typeid(std::string));
69  revdata.extend("CTIME", typeid(coral::TimeStamp));
70  revdata["REVISION_ID"].data<unsigned long long>() = entry.revision_id;
71  revdata["BRANCH_ID"].data<unsigned long long>() = branchid;
72  revdata["BRANCH_NAME"].data<std::string>() = branchname;
73  revdata["CTIME"].data<coral::TimeStamp>() = coral::TimeStamp::now();
74  const std::string revTableName = lumi::LumiNames::revisionTableName();
75  schema.tableHandle(revTableName).dataEditor().insertRow(revdata);
76 
77  coral::AttributeList entrydata;
78  entrydata.extend("REVISION_ID", typeid(unsigned long long));
79  entrydata.extend("ENTRY_ID", typeid(unsigned long long));
80  entrydata.extend("NAME", typeid(std::string));
81  entrydata["REVISION_ID"].data<unsigned long long>() = entry.revision_id;
82  entrydata["ENTRY_ID"].data<unsigned long long>() = entry.entry_id;
83  entrydata["NAME"].data<std::string>() = entry.entry_name;
84  const std::string entryTableName = lumi::LumiNames::entryTableName(datatableName);
85  schema.tableHandle(entryTableName).dataEditor().insertRow(entrydata);
86 
87  coral::AttributeList revmapdata;
88  revmapdata.extend("REVISION_ID", typeid(unsigned long long));
89  revmapdata.extend("DATA_ID", typeid(unsigned long long));
90 
91  revmapdata["REVISION_ID"].data<unsigned long long>() = entry.revision_id;
92  revmapdata["DATA_ID"].data<unsigned long long>() = entry.data_id;
93 
94  const std::string revmapTableName = lumi::LumiNames::revmapTableName(datatableName);
95  schema.tableHandle(revmapTableName).dataEditor().insertRow(revmapdata);
96 }
static const std::string revmapTableName(const std::string &datatablename)
Definition: LumiNames.cc:28
static const std::string entryTableName(const std::string &datatablename)
Definition: LumiNames.cc:29
static const std::string revisionTableName()
Definition: LumiNames.cc:27

◆ addRevision()

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 97 of file RevisionDML.cc.

References lumi::RevisionDML::Entry::data_id, submitPVValidationJobs::now, lumi::RevisionDML::Entry::revision_id, lumi::LumiNames::revisionTableName(), lumi::LumiNames::revmapTableName(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by lumi::Lumi2DB::writeAllLumiDataToSchema2(), lumi::HLTV32DB::writeHltDataToSchema2(), and lumi::TRGScalers2DB::writeTrgDataToSchema2().

101  {
102  coral::AttributeList revdata;
103  revdata.extend("REVISION_ID", typeid(unsigned long long));
104  revdata.extend("BRANCH_ID", typeid(unsigned long long));
105  revdata.extend("BRANCH_NAME", typeid(std::string));
106  revdata.extend("CTIME", typeid(coral::TimeStamp));
107  revdata["REVISION_ID"].data<unsigned long long>() = revision.revision_id;
108  revdata["BRANCH_ID"].data<unsigned long long>() = branchid;
109  revdata["BRANCH_NAME"].data<std::string>() = branchname;
110  revdata["CTIME"].data<coral::TimeStamp>() = coral::TimeStamp::now();
111  schema.tableHandle(lumi::LumiNames::revisionTableName()).dataEditor().insertRow(revdata);
112  coral::AttributeList revmapdata;
113  revmapdata.extend("REVISION_ID", typeid(unsigned long long));
114  revmapdata.extend("DATA_ID", typeid(unsigned long long));
115  revmapdata["REVISION_ID"].data<unsigned long long>() = revision.revision_id;
116  revmapdata["DATA_ID"].data<unsigned long long>() = revision.data_id;
117  const std::string revmapTableName = lumi::LumiNames::revmapTableName(datatableName);
118  schema.tableHandle(revmapTableName).dataEditor().insertRow(revmapdata);
119 }
static const std::string revmapTableName(const std::string &datatablename)
Definition: LumiNames.cc:28
static const std::string revisionTableName()
Definition: LumiNames.cc:27

◆ addRunToCurrentHFDataTag()

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 224 of file RevisionDML.cc.

References cond::lumiid, submitPVValidationJobs::now, runnum, AlCaHLTBitMon_QueryRunRegistry::string, and lumi::LumiNames::tagRunsTableName().

229  {
230  unsigned long long currenttagid = currentHFDataTagId(schema);
231  coral::AttributeList tagrundata;
232  tagrundata.extend("TAGID", typeid(unsigned long long));
233  tagrundata.extend("RUNNUM", typeid(unsigned int));
234  tagrundata.extend("LUMIDATAID", typeid(unsigned long long));
235  tagrundata.extend("TRGDATAID", typeid(unsigned long long));
236  tagrundata.extend("HLTDATAID", typeid(unsigned long long));
237  tagrundata.extend("CREATIONTIME", typeid(coral::TimeStamp));
238  tagrundata.extend("COMMENT", typeid(std::string));
239  tagrundata["TAGID"].data<unsigned long long>() = currenttagid;
240  tagrundata["RUNNUM"].data<unsigned int>() = runnum;
241  tagrundata["LUMIDATAID"].data<unsigned long long>() = lumiid;
242  tagrundata["TRGDATAID"].data<unsigned long long>() = trgid;
243  tagrundata["HLTDATAID"].data<unsigned long long>() = hltid;
244  tagrundata["CREATIONTIME"].data<coral::TimeStamp>() = coral::TimeStamp::now();
245  tagrundata["COMMENT"].data<std::string>() = patchcomment;
246  const std::string tagrunTableName = lumi::LumiNames::tagRunsTableName();
247  try {
248  schema.tableHandle(lumi::LumiNames::tagRunsTableName()).dataEditor().insertRow(tagrundata);
249  } catch (const coral::DuplicateEntryInUniqueKeyException& er) {
250  throw lumi::duplicateRunInDataTagException("", "addRunToCurrentHFDataTag", "RevisionDML");
251  }
252  return currenttagid;
253 }
int runnum
static const std::string tagRunsTableName()
Definition: LumiNames.cc:17
unsigned long long currentHFDataTagId(coral::ISchema &schema)
Definition: RevisionDML.cc:178

◆ bookNewEntry()

void lumi::RevisionDML::bookNewEntry ( coral::ISchema &  schema,
const std::string &  datatableName,
Entry entry 
)

allocate new revision_id,entry_id,data_id

Definition at line 44 of file RevisionDML.cc.

References mps_splice::entry, lumi::LumiNames::entryTableName(), lumi::idDealer::generateNextIDForTable(), lumi::LumiNames::revisionTableName(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by lumi::Lumi2DB::writeAllLumiDataToSchema2(), lumi::HLTV32DB::writeHltDataToSchema2(), and lumi::TRGScalers2DB::writeTrgDataToSchema2().

46  {
47  lumi::idDealer idg(schema);
48  const std::string entrytableName = lumi::LumiNames::entryTableName(datatableName);
49  entry.revision_id = idg.generateNextIDForTable(lumi::LumiNames::revisionTableName());
50  entry.data_id = idg.generateNextIDForTable(datatableName);
51  entry.entry_id = idg.generateNextIDForTable(entrytableName);
52 }
static const std::string entryTableName(const std::string &datatablename)
Definition: LumiNames.cc:29
static const std::string revisionTableName()
Definition: LumiNames.cc:27

◆ bookNewRevision()

void lumi::RevisionDML::bookNewRevision ( coral::ISchema &  schema,
const std::string &  datatableName,
Entry revision 
)

allocate new revision_id,data_id

Definition at line 53 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().

55  {
56  lumi::idDealer idg(schema);
57  revision.revision_id = idg.generateNextIDForTable(lumi::LumiNames::revisionTableName());
58  revision.data_id = idg.generateNextIDForTable(datatableName);
59 }
static const std::string revisionTableName()
Definition: LumiNames.cc:27

◆ branchIdByName()

unsigned long long lumi::RevisionDML::branchIdByName ( coral::ISchema &  schema,
const std::string &  branchName 
)

select revision_id from revisions where name=:branchName

◆ currentHFDataTagId()

unsigned long long lumi::RevisionDML::currentHFDataTagId ( coral::ISchema &  schema)

Definition at line 178 of file RevisionDML.cc.

References lumi::LumiNames::tagsTableName().

Referenced by LumiCorrectionSource::fillparamcache().

178  {
179  unsigned long long currentdatatagid = 0;
180  std::vector<unsigned long long> alltagids;
181  coral::IQuery* qHandle = schema.newQuery();
182  qHandle->addToTableList(lumi::LumiNames::tagsTableName());
183  qHandle->addToOutputList("TAGID");
184  coral::AttributeList qResult;
185  qResult.extend("TAGID", typeid(unsigned long long));
186  qHandle->defineOutput(qResult);
187  coral::ICursor& cursor = qHandle->execute();
188  while (cursor.next()) {
189  if (!cursor.currentRow()["TAGID"].isNull()) {
190  alltagids.push_back(cursor.currentRow()["TAGID"].data<unsigned long long>());
191  }
192  }
193  delete qHandle;
194  if (!alltagids.empty()) {
195  std::vector<unsigned long long>::iterator currentdatatagidIt = std::max_element(alltagids.begin(), alltagids.end());
196  currentdatatagid = *currentdatatagidIt;
197  }
198  return currentdatatagid;
199 }
static const std::string tagsTableName()
Definition: LumiNames.cc:18

◆ dataIDForRun()

lumi::RevisionDML::DataID lumi::RevisionDML::dataIDForRun ( coral::ISchema &  schema,
unsigned int  runnum,
unsigned long long  tagid 
)

Definition at line 255 of file RevisionDML.cc.

References cond::lumiid, mps_fire::result, runnum, AlCaHLTBitMon_QueryRunRegistry::string, and lumi::LumiNames::tagRunsTableName().

Referenced by LumiCorrectionSource::fillparamcache().

257  {
259  coral::IQuery* qHandle = schema.newQuery();
260  qHandle->addToTableList(lumi::LumiNames::tagRunsTableName());
261  qHandle->addToOutputList("LUMIDATAID");
262  qHandle->addToOutputList("TRGDATAID");
263  qHandle->addToOutputList("HLTDATAID");
264  coral::AttributeList qResult;
265  qResult.extend("LUMIDATAID", typeid(unsigned long long));
266  qResult.extend("TRGDATAID", typeid(unsigned long long));
267  qResult.extend("HLTDATAID", typeid(unsigned long long));
268  qHandle->defineOutput(qResult);
269  coral::AttributeList qCondition;
270  qCondition.extend("tagid", typeid(unsigned long long));
271  qCondition.extend("runnum", typeid(unsigned int));
272  qCondition["tagid"].data<unsigned long long>() = tagid;
273  qCondition["runnum"].data<unsigned int>() = runnum;
274  std::string qConditionStr("TAGID<=:tagid AND RUNNUM=:runnum");
275  qHandle->setCondition(qConditionStr, qCondition);
276  coral::ICursor& cursor = qHandle->execute();
277  unsigned long long minlumid = 0;
278  unsigned long long mintrgid = 0;
279  unsigned long long minhltid = 0;
280  while (cursor.next()) {
281  if (!cursor.currentRow()["LUMIDATAID"].isNull()) {
282  unsigned long long lumiid = cursor.currentRow()["LUMIDATAID"].data<unsigned long long>();
283  if (lumiid > minlumid) {
284  result.lumi_id = lumiid;
285  }
286  }
287  if (!cursor.currentRow()["TRGDATAID"].isNull()) {
288  unsigned long long trgid = cursor.currentRow()["TRGDATAID"].data<unsigned long long>();
289  if (trgid > mintrgid) {
290  result.trg_id = trgid;
291  }
292  }
293  if (!cursor.currentRow()["HLTDATAID"].isNull()) {
294  unsigned long long hltid = cursor.currentRow()["HLTDATAID"].data<unsigned long long>();
295  if (hltid > minhltid) {
296  result.hlt_id = hltid;
297  }
298  }
299  }
300  delete qHandle;
301  return result;
302 }
int runnum
static const std::string tagRunsTableName()
Definition: LumiNames.cc:17

◆ getEntryInBranchByName()

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 16 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().

19  {
20  unsigned long long entry_id = 0;
21  coral::IQuery* qHandle = schema.newQuery();
22  qHandle->addToTableList(lumi::LumiNames::entryTableName(datatableName), "e");
23  qHandle->addToTableList(lumi::LumiNames::revisionTableName(), "r");
24  qHandle->addToOutputList("e.ENTRY_ID", "entry_id");
25 
26  coral::AttributeList qCondition;
27  qCondition.extend("entryname", typeid(std::string));
28  qCondition.extend("branchname", typeid(std::string));
29  qCondition["entryname"].data<std::string>() = entryname;
30  qCondition["branchname"].data<std::string>() = branchname;
31  std::string qConditionStr("r.REVISION_ID=e.REVISION_ID and e.NAME=:entryname AND r.BRANCH_NAME=:branchname");
32 
33  coral::AttributeList qResult;
34  qResult.extend("entry_id", typeid(unsigned long long));
35  qHandle->defineOutput(qResult);
36  qHandle->setCondition(qConditionStr, qCondition);
37  coral::ICursor& cursor = qHandle->execute();
38  while (cursor.next()) {
39  entry_id = cursor.currentRow()["entry_id"].data<unsigned long long>();
40  }
41  delete qHandle;
42  return entry_id;
43 }
static const std::string entryTableName(const std::string &datatablename)
Definition: LumiNames.cc:29
static const std::string revisionTableName()
Definition: LumiNames.cc:27

◆ HFDataTagIdByName()

unsigned long long lumi::RevisionDML::HFDataTagIdByName ( coral::ISchema &  schema,
const std::string &  datatagname 
)

Definition at line 201 of file RevisionDML.cc.

References AlCaHLTBitMon_QueryRunRegistry::string, and lumi::LumiNames::tagsTableName().

Referenced by LumiCorrectionSource::fillparamcache().

201  {
202  unsigned long long datatagid = 0;
203  coral::IQuery* qHandle = schema.newQuery();
204  qHandle->addToTableList(lumi::LumiNames::tagsTableName());
205  const std::string conditionStr("TAGNAME=:tagname");
206  coral::AttributeList condition;
207  condition.extend("tagname", typeid(std::string));
208  condition["tagname"].data<std::string>() = datatagname;
209  qHandle->addToOutputList("TAGID");
210  coral::AttributeList qResult;
211  qResult.extend("TAGID", typeid(unsigned long long));
212  qHandle->setCondition(conditionStr, condition);
213  qHandle->defineOutput(qResult);
214  coral::ICursor& cursor = qHandle->execute();
215  while (cursor.next()) {
216  if (!cursor.currentRow()["TAGID"].isNull()) {
217  datatagid = cursor.currentRow()["TAGID"].data<unsigned long long>();
218  }
219  }
220  delete qHandle;
221  return datatagid;
222 }
static const std::string tagsTableName()
Definition: LumiNames.cc:18

◆ insertHltRunData()

void lumi::RevisionDML::insertHltRunData ( coral::ISchema &  schema,
const HltEntry hltentry 
)

Definition at line 158 of file RevisionDML.cc.

References lumi::RevisionDML::Entry::data_id, lumi::RevisionDML::Entry::entry_id, lumi::RevisionDML::Entry::entry_name, lumi::LumiNames::hltdataTableName(), 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().

158  {
159  coral::AttributeList hltrundata;
160  hltrundata.extend("DATA_ID", typeid(unsigned long long));
161  hltrundata.extend("ENTRY_ID", typeid(unsigned long long));
162  hltrundata.extend("ENTRY_NAME", typeid(std::string));
163  hltrundata.extend("RUNNUM", typeid(unsigned int));
164  hltrundata.extend("SOURCE", typeid(std::string));
165  hltrundata.extend("NPATH", typeid(unsigned int));
166  hltrundata.extend("PATHNAMECLOB", typeid(std::string));
167  hltrundata["DATA_ID"].data<unsigned long long>() = hltentry.data_id;
168  hltrundata["ENTRY_ID"].data<unsigned long long>() = hltentry.entry_id;
169  hltrundata["ENTRY_NAME"].data<std::string>() = hltentry.entry_name;
170  hltrundata["RUNNUM"].data<unsigned int>() = hltentry.runnumber;
171  hltrundata["SOURCE"].data<std::string>() = hltentry.source;
172  hltrundata["NPATH"].data<unsigned int>() = hltentry.npath;
173  hltrundata["PATHNAMECLOB"].data<std::string>() = hltentry.pathnames;
174  const std::string hltdataTableName = lumi::LumiNames::hltdataTableName();
175  schema.tableHandle(hltdataTableName).dataEditor().insertRow(hltrundata);
176 }
static const std::string hltdataTableName()
Definition: LumiNames.cc:15

◆ insertLumiRunData()

void lumi::RevisionDML::insertLumiRunData ( coral::ISchema &  schema,
const LumiEntry lumientry 
)

Definition at line 120 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(), lumi::RevisionDML::LumiEntry::ncollidingbunches, lumi::RevisionDML::LumiEntry::runnumber, lumi::RevisionDML::LumiEntry::source, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by lumi::Lumi2DB::writeAllLumiDataToSchema2().

120  {
121  coral::AttributeList lumirundata;
122  lumirundata.extend("DATA_ID", typeid(unsigned long long));
123  lumirundata.extend("ENTRY_ID", typeid(unsigned long long));
124  lumirundata.extend("ENTRY_NAME", typeid(std::string));
125  lumirundata.extend("RUNNUM", typeid(unsigned int));
126  lumirundata.extend("SOURCE", typeid(std::string));
127  lumirundata.extend("NOMINALEGEV", typeid(float));
128  lumirundata.extend("NCOLLIDINGBUNCHES", typeid(unsigned int));
129  lumirundata["DATA_ID"].data<unsigned long long>() = lumientry.data_id;
130  lumirundata["ENTRY_ID"].data<unsigned long long>() = lumientry.entry_id;
131  lumirundata["ENTRY_NAME"].data<std::string>() = lumientry.entry_name;
132  lumirundata["RUNNUM"].data<unsigned int>() = lumientry.runnumber;
133  lumirundata["SOURCE"].data<std::string>() = lumientry.source;
134  lumirundata["NOMINALEGEV"].data<float>() = lumientry.bgev;
135  lumirundata["NCOLLIDINGBUNCHES"].data<unsigned int>() = lumientry.ncollidingbunches;
136  const std::string lumidataTableName = lumi::LumiNames::lumidataTableName();
137  schema.tableHandle(lumidataTableName).dataEditor().insertRow(lumirundata);
138 }
static const std::string lumidataTableName()
Definition: LumiNames.cc:3

◆ insertTrgRunData()

void lumi::RevisionDML::insertTrgRunData ( coral::ISchema &  schema,
const TrgEntry trgentry 
)

Definition at line 139 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, and lumi::LumiNames::trgdataTableName().

Referenced by lumi::TRGScalers2DB::writeTrgDataToSchema2().

139  {
140  coral::AttributeList trgrundata;
141  trgrundata.extend("DATA_ID", typeid(unsigned long long));
142  trgrundata.extend("ENTRY_ID", typeid(unsigned long long));
143  trgrundata.extend("ENTRY_NAME", typeid(std::string));
144  trgrundata.extend("RUNNUM", typeid(unsigned int));
145  trgrundata.extend("SOURCE", typeid(std::string));
146  trgrundata.extend("BITZERONAME", typeid(std::string));
147  trgrundata.extend("BITNAMECLOB", typeid(std::string));
148  trgrundata["DATA_ID"].data<unsigned long long>() = trgentry.data_id;
149  trgrundata["ENTRY_ID"].data<unsigned long long>() = trgentry.entry_id;
150  trgrundata["ENTRY_NAME"].data<std::string>() = trgentry.entry_name;
151  trgrundata["RUNNUM"].data<unsigned int>() = trgentry.runnumber;
152  trgrundata["SOURCE"].data<std::string>() = trgentry.source;
153  trgrundata["BITZERONAME"].data<std::string>() = trgentry.bitzeroname;
154  trgrundata["BITNAMECLOB"].data<std::string>() = trgentry.bitnames;
155  const std::string trgdataTableName = lumi::LumiNames::trgdataTableName();
156  schema.tableHandle(trgdataTableName).dataEditor().insertRow(trgrundata);
157 }
static const std::string trgdataTableName()
Definition: LumiNames.cc:11