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

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

References dataDML::branchid, lumi::RevisionDML::Entry::data_id, lumi::RevisionDML::Entry::entry_id, lumi::RevisionDML::Entry::entry_name, lumi::LumiNames::entryTableName(), nameDealer::entryTableName(), cmsPerfSuiteHarvest::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().

68  {
69  coral::AttributeList revdata;
70  revdata.extend("REVISION_ID",typeid(unsigned long long));
71  revdata.extend("BRANCH_ID",typeid(unsigned long long));
72  revdata.extend("BRANCH_NAME",typeid(std::string));
73  revdata.extend("CTIME",typeid(coral::TimeStamp));
74  revdata["REVISION_ID"].data<unsigned long long>()=entry.revision_id;
75  revdata["BRANCH_ID"].data<unsigned long long>()=branchid;
76  revdata["BRANCH_NAME"].data<std::string>()=branchname;
77  revdata["CTIME"].data<coral::TimeStamp>()=coral::TimeStamp::now();
79  schema.tableHandle(revTableName).dataEditor().insertRow(revdata);
80 
81  coral::AttributeList entrydata;
82  entrydata.extend("REVISION_ID",typeid(unsigned long long));
83  entrydata.extend("ENTRY_ID",typeid(unsigned long long));
84  entrydata.extend("NAME",typeid(std::string));
85  entrydata["REVISION_ID"].data<unsigned long long>()=entry.revision_id;
86  entrydata["ENTRY_ID"].data<unsigned long long>()=entry.entry_id;
87  entrydata["NAME"].data<std::string>()=entry.entry_name;
89  schema.tableHandle(entryTableName).dataEditor().insertRow(entrydata);
90 
91  coral::AttributeList revmapdata;
92  revmapdata.extend("REVISION_ID",typeid(unsigned long long));
93  revmapdata.extend("DATA_ID",typeid(unsigned long long));
94 
95  revmapdata["REVISION_ID"].data<unsigned long long>()=entry.revision_id;
96  revmapdata["DATA_ID"].data<unsigned long long>()=entry.data_id;
97 
99  schema.tableHandle(revmapTableName).dataEditor().insertRow(revmapdata);
100 }
def entryTableName(dataTableName)
Definition: nameDealer.py:103
static const std::string revmapTableName(const std::string &datatablename)
Definition: LumiNames.cc:80
static const std::string entryTableName(const std::string &datatablename)
Definition: LumiNames.cc:83
def revmapTableName(dataTableName)
Definition: nameDealer.py:100
static const std::string revisionTableName()
Definition: LumiNames.cc:77
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 dataDML::branchid, lumi::RevisionDML::Entry::data_id, cmsPerfSuiteHarvest::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().

106  {
107  coral::AttributeList revdata;
108  revdata.extend("REVISION_ID",typeid(unsigned long long));
109  revdata.extend("BRANCH_ID",typeid(unsigned long long));
110  revdata.extend("BRANCH_NAME",typeid(std::string));
111  revdata.extend("CTIME",typeid(coral::TimeStamp));
112  revdata["REVISION_ID"].data<unsigned long long>()=revision.revision_id;
113  revdata["BRANCH_ID"].data<unsigned long long>()=branchid;
114  revdata["BRANCH_NAME"].data<std::string>()=branchname;
115  revdata["CTIME"].data<coral::TimeStamp>()=coral::TimeStamp::now();
116  schema.tableHandle(lumi::LumiNames::revisionTableName()).dataEditor().insertRow(revdata);
117  coral::AttributeList revmapdata;
118  revmapdata.extend("REVISION_ID",typeid(unsigned long long));
119  revmapdata.extend("DATA_ID",typeid(unsigned long long));
120  revmapdata["REVISION_ID"].data<unsigned long long>()=revision.revision_id;
121  revmapdata["DATA_ID"].data<unsigned long long>()=revision.data_id;
123  schema.tableHandle(revmapTableName).dataEditor().insertRow(revmapdata);
124 }
static const std::string revmapTableName(const std::string &datatablename)
Definition: LumiNames.cc:80
def revmapTableName(dataTableName)
Definition: nameDealer.py:100
static const std::string revisionTableName()
Definition: LumiNames.cc:77
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 currentHFDataTagId(), cmsPerfSuiteHarvest::now, AlCaHLTBitMon_QueryRunRegistry::string, and lumi::LumiNames::tagRunsTableName().

245 {
246  unsigned long long currenttagid=currentHFDataTagId(schema);
247  coral::AttributeList tagrundata;
248  tagrundata.extend("TAGID",typeid(unsigned long long));
249  tagrundata.extend("RUNNUM",typeid(unsigned int));
250  tagrundata.extend("LUMIDATAID",typeid(unsigned long long));
251  tagrundata.extend("TRGDATAID",typeid(unsigned long long));
252  tagrundata.extend("HLTDATAID",typeid(unsigned long long));
253  tagrundata.extend("CREATIONTIME",typeid(coral::TimeStamp));
254  tagrundata.extend("COMMENT",typeid(std::string));
255  tagrundata["TAGID"].data<unsigned long long>()=currenttagid;
256  tagrundata["RUNNUM"].data<unsigned int>()=runnum;
257  tagrundata["LUMIDATAID"].data<unsigned long long>()=lumiid;
258  tagrundata["TRGDATAID"].data<unsigned long long>()=trgid;
259  tagrundata["HLTDATAID"].data<unsigned long long>()=hltid;
260  tagrundata["CREATIONTIME"].data<coral::TimeStamp>()=coral::TimeStamp::now();
261  tagrundata["COMMENT"].data<std::string>()=patchcomment;
262  const std::string tagrunTableName=lumi::LumiNames::tagRunsTableName();
263  try{
264  schema.tableHandle(lumi::LumiNames::tagRunsTableName()).dataEditor().insertRow(tagrundata);
265  }catch(const coral::DuplicateEntryInUniqueKeyException& er){
266  throw lumi::duplicateRunInDataTagException("","addRunToCurrentHFDataTag","RevisionDML");
267  }
268  return currenttagid;
269 }
static const std::string tagRunsTableName()
Definition: LumiNames.cc:47
unsigned long long currentHFDataTagId(coral::ISchema &schema)
Definition: RevisionDML.cc:190
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().

48  {
50  const std::string entrytableName=lumi::LumiNames::entryTableName(datatableName);
51  entry.revision_id=idg.generateNextIDForTable(lumi::LumiNames::revisionTableName());
52  entry.data_id=idg.generateNextIDForTable(datatableName);
53  entry.entry_id=idg.generateNextIDForTable(entrytableName);
54 }
static const std::string entryTableName(const std::string &datatablename)
Definition: LumiNames.cc:83
static const std::string revisionTableName()
Definition: LumiNames.cc:77
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().

58  {
60  revision.revision_id=idg.generateNextIDForTable(lumi::LumiNames::revisionTableName());
61  revision.data_id=idg.generateNextIDForTable(datatableName);
62 }
static const std::string revisionTableName()
Definition: LumiNames.cc:77
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 addRunToCurrentHFDataTag(), and LumiCorrectionSource::fillparamcache().

190  {
191  unsigned long long currentdatatagid=0;
192  std::vector<unsigned long long> alltagids;
193  coral::IQuery* qHandle=schema.newQuery();
194  qHandle->addToTableList( lumi::LumiNames::tagsTableName());
195  qHandle->addToOutputList("TAGID");
196  coral::AttributeList qResult;
197  qResult.extend("TAGID",typeid(unsigned long long));
198  qHandle->defineOutput(qResult);
199  coral::ICursor& cursor=qHandle->execute();
200  while(cursor.next()){
201  if(!cursor.currentRow()["TAGID"].isNull()){
202  alltagids.push_back(cursor.currentRow()["TAGID"].data<unsigned long long>());
203  }
204  }
205  delete qHandle;
206  if(!alltagids.empty()){
207  std::vector<unsigned long long>::iterator currentdatatagidIt=std::max_element(alltagids.begin(),alltagids.end());
208  currentdatatagid=*currentdatatagidIt;
209  }
210  return currentdatatagid;
211 }
static const std::string tagsTableName()
Definition: LumiNames.cc:50
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().

274  {
276  coral::IQuery* qHandle=schema.newQuery();
277  qHandle->addToTableList( lumi::LumiNames::tagRunsTableName());
278  qHandle->addToOutputList("LUMIDATAID");
279  qHandle->addToOutputList("TRGDATAID");
280  qHandle->addToOutputList("HLTDATAID");
281  coral::AttributeList qResult;
282  qResult.extend("LUMIDATAID",typeid(unsigned long long));
283  qResult.extend("TRGDATAID",typeid(unsigned long long));
284  qResult.extend("HLTDATAID",typeid(unsigned long long));
285  qHandle->defineOutput(qResult);
286  coral::AttributeList qCondition;
287  qCondition.extend("tagid",typeid(unsigned long long));
288  qCondition.extend("runnum",typeid(unsigned int));
289  qCondition["tagid"].data<unsigned long long>()=tagid;
290  qCondition["runnum"].data<unsigned int>()=runnum;
291  std::string qConditionStr("TAGID<=:tagid AND RUNNUM=:runnum");
292  qHandle->setCondition(qConditionStr,qCondition);
293  coral::ICursor& cursor=qHandle->execute();
294  unsigned long long minlumid=0;
295  unsigned long long mintrgid=0;
296  unsigned long long minhltid=0;
297  while(cursor.next()){
298  if(!cursor.currentRow()["LUMIDATAID"].isNull()){
299  unsigned long long lumiid=cursor.currentRow()["LUMIDATAID"].data<unsigned long long>();
300  if(lumiid>minlumid){
301  result.lumi_id=lumiid;
302  }
303 
304  }
305  if(!cursor.currentRow()["TRGDATAID"].isNull()){
306  unsigned long long trgid=cursor.currentRow()["TRGDATAID"].data<unsigned long long>();
307  if(trgid>mintrgid){
308  result.trg_id=trgid;
309  }
310  }
311  if(!cursor.currentRow()["HLTDATAID"].isNull()){
312  unsigned long long hltid=cursor.currentRow()["HLTDATAID"].data<unsigned long long>();
313  if(hltid>minhltid){
314  result.hlt_id=hltid;
315  }
316  }
317  }
318  delete qHandle;
319  return result;
320 }
unsigned long long hlt_id
Definition: RevisionDML.h:23
static const std::string tagRunsTableName()
Definition: LumiNames.cc:47
unsigned long long lumi_id
Definition: RevisionDML.h:21
unsigned long long trg_id
Definition: RevisionDML.h:22
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 revisionDML::entry_id, lumi::LumiNames::entryTableName(), lumi::LumiNames::revisionTableName(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

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

215  {
216  unsigned long long datatagid=0;
217  coral::IQuery* qHandle=schema.newQuery();
218  qHandle->addToTableList( lumi::LumiNames::tagsTableName());
219  const std::string conditionStr("TAGNAME=:tagname");
220  coral::AttributeList condition;
221  condition.extend("tagname",typeid(std::string));
222  condition["tagname"].data<std::string>()=datatagname;
223  qHandle->addToOutputList("TAGID");
224  coral::AttributeList qResult;
225  qResult.extend("TAGID",typeid(unsigned long long));
226  qHandle->setCondition(conditionStr,condition);
227  qHandle->defineOutput(qResult);
228  coral::ICursor& cursor=qHandle->execute();
229  while(cursor.next()){
230  if(!cursor.currentRow()["TAGID"].isNull()){
231  datatagid=cursor.currentRow()["TAGID"].data<unsigned long long>();
232  }
233  }
234  delete qHandle;
235  return datatagid;
236 }
datatagname
check datatag
Definition: lumiCalc2.py:320
static const std::string tagsTableName()
Definition: LumiNames.cc:50
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().

169  {
170  coral::AttributeList hltrundata;
171  hltrundata.extend("DATA_ID",typeid(unsigned long long));
172  hltrundata.extend("ENTRY_ID",typeid(unsigned long long));
173  hltrundata.extend("ENTRY_NAME",typeid(std::string));
174  hltrundata.extend("RUNNUM",typeid(unsigned int));
175  hltrundata.extend("SOURCE",typeid(std::string));
176  hltrundata.extend("NPATH",typeid(unsigned int));
177  hltrundata.extend("PATHNAMECLOB",typeid(std::string));
178  hltrundata["DATA_ID"].data<unsigned long long>()=hltentry.data_id;
179  hltrundata["ENTRY_ID"].data<unsigned long long>()=hltentry.entry_id;
180  hltrundata["ENTRY_NAME"].data<std::string>()=hltentry.entry_name;
181  hltrundata["RUNNUM"].data<unsigned int>()=hltentry.runnumber;
182  hltrundata["SOURCE"].data<std::string>()=hltentry.source;
183  hltrundata["NPATH"].data<unsigned int>()=hltentry.npath;
184  hltrundata["PATHNAMECLOB"].data<std::string>()=hltentry.pathnames;
186  schema.tableHandle(hltdataTableName).dataEditor().insertRow(hltrundata);
187 }
static const std::string hltdataTableName()
Definition: LumiNames.cc:41
hltrundata
Definition: dataDML.py:2372
def hltdataTableName()
Definition: nameDealer.py:58
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().

127  {
128  coral::AttributeList lumirundata;
129  lumirundata.extend("DATA_ID",typeid(unsigned long long));
130  lumirundata.extend("ENTRY_ID",typeid(unsigned long long));
131  lumirundata.extend("ENTRY_NAME",typeid(std::string));
132  lumirundata.extend("RUNNUM",typeid(unsigned int));
133  lumirundata.extend("SOURCE",typeid(std::string));
134  lumirundata.extend("NOMINALEGEV",typeid(float));
135  lumirundata.extend("NCOLLIDINGBUNCHES",typeid(unsigned int));
136  lumirundata["DATA_ID"].data<unsigned long long>()=lumientry.data_id;
137  lumirundata["ENTRY_ID"].data<unsigned long long>()=lumientry.entry_id;
138  lumirundata["ENTRY_NAME"].data<std::string>()=lumientry.entry_name;
139  lumirundata["RUNNUM"].data<unsigned int>()=lumientry.runnumber;
140  lumirundata["SOURCE"].data<std::string>()=lumientry.source;
141  lumirundata["NOMINALEGEV"].data<float>()=lumientry.bgev;
142  lumirundata["NCOLLIDINGBUNCHES"].data<unsigned int>()=lumientry.ncollidingbunches;
144  schema.tableHandle(lumidataTableName).dataEditor().insertRow(lumirundata);
145 }
static const std::string lumidataTableName()
Definition: LumiNames.cc:5
lumirundata
Definition: dataDML.py:2362
def lumidataTableName()
Definition: nameDealer.py:19
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().

148  {
149  coral::AttributeList trgrundata;
150  trgrundata.extend("DATA_ID",typeid(unsigned long long));
151  trgrundata.extend("ENTRY_ID",typeid(unsigned long long));
152  trgrundata.extend("ENTRY_NAME",typeid(std::string));
153  trgrundata.extend("RUNNUM",typeid(unsigned int));
154  trgrundata.extend("SOURCE",typeid(std::string));
155  trgrundata.extend("BITZERONAME",typeid(std::string));
156  trgrundata.extend("BITNAMECLOB",typeid(std::string));
157  trgrundata["DATA_ID"].data<unsigned long long>()=trgentry.data_id;
158  trgrundata["ENTRY_ID"].data<unsigned long long>()=trgentry.entry_id;
159  trgrundata["ENTRY_NAME"].data<std::string>()=trgentry.entry_name;
160  trgrundata["RUNNUM"].data<unsigned int>()=trgentry.runnumber;
161  trgrundata["SOURCE"].data<std::string>()=trgentry.source;
162  trgrundata["BITZERONAME"].data<std::string>()=trgentry.bitzeroname;
163  trgrundata["BITNAMECLOB"].data<std::string>()=trgentry.bitnames;
165  schema.tableHandle(trgdataTableName).dataEditor().insertRow(trgrundata);
166 }
static const std::string trgdataTableName()
Definition: LumiNames.cc:29
def trgdataTableName()
Definition: nameDealer.py:46
trgrundata
Definition: dataDML.py:2367