CMS 3D CMS Logo

RevisionDML.h
Go to the documentation of this file.
1 #ifndef RecoLuminosity_LumiProducer_RevisionDML_H
2 #define RecoLuminosity_LumiProducer_RevisionDML_H
3 #include <string>
4 #include <vector>
5 namespace coral {
6  class ISchema;
7 }
8 namespace lumi {
9  class RevisionDML {
10  public:
11  //class Revision{
12  //public:
13  // Revision():revision_id(0),data_id(0){}
14  // unsigned long long revision_id;
15  // unsigned long long data_id;
16  //};
17  class DataID {
18  public:
19  DataID() : lumi_id(0), trg_id(0), hlt_id(0) {}
20 
21  public:
22  unsigned long long lumi_id;
23  unsigned long long trg_id;
24  unsigned long long hlt_id;
25  };
26  class Entry {
27  public:
28  Entry() : revision_id(0), entry_id(0), data_id(0), entry_name("") {}
29  unsigned long long revision_id;
30  unsigned long long entry_id;
31  unsigned long long data_id;
33  };
34  class LumiEntry : public Entry {
35  public:
36  LumiEntry() : source(""), runnumber(0), bgev(0.0) {}
38  unsigned int runnumber;
39  float bgev;
40  unsigned int ncollidingbunches;
41  };
42  class TrgEntry : public Entry {
43  public:
44  TrgEntry() : source(""), runnumber(0), bitzeroname("") {}
46  unsigned int runnumber;
49  };
50  class HltEntry : public Entry {
51  public:
52  HltEntry() : source(""), runnumber(0), npath(0) {}
54  unsigned int runnumber;
55  unsigned int npath;
57  };
58 
62  unsigned long long branchIdByName(coral::ISchema& schema, const std::string& branchName);
63 
67  unsigned long long getEntryInBranchByName(coral::ISchema& schema,
68  const std::string& datatableName,
69  const std::string& entryname,
70  const std::string& branchname);
74  void bookNewEntry(coral::ISchema& schema, const std::string& datatableName, Entry& entry);
78  void bookNewRevision(coral::ISchema& schema, const std::string& datatableName, Entry& revision);
87  void addEntry(coral::ISchema& schema,
88  const std::string& datatableName,
89  const Entry& entry,
90  unsigned long long branch_id,
91  const std::string& branchname);
98  void addRevision(coral::ISchema& schema,
99  const std::string& datatableName,
100  const Entry& revision,
101  unsigned long long branch_id,
102  std::string& branchname);
103  void insertLumiRunData(coral::ISchema& schema, const LumiEntry& lumientry);
104  void insertTrgRunData(coral::ISchema& schema, const TrgEntry& trgentry);
105  void insertHltRunData(coral::ISchema& schema, const HltEntry& hltentry);
106 
107  unsigned long long currentHFDataTagId(coral::ISchema& schema);
108  unsigned long long HFDataTagIdByName(coral::ISchema& schema, const std::string& datatagname);
109  unsigned long long addRunToCurrentHFDataTag(coral::ISchema& schema,
110  unsigned int runnum,
111  unsigned long long lumiid,
112  unsigned long long trgid,
113  unsigned long long hltid,
114  const std::string& patchcomment);
115  DataID dataIDForRun(coral::ISchema& schema, unsigned int runnum, unsigned long long tagid);
116  };
117 } // namespace lumi
118 #endif
cond::lumiid
Definition: Time.h:19
lumi::RevisionDML::HltEntry::HltEntry
HltEntry()
Definition: RevisionDML.h:52
lumi::RevisionDML::TrgEntry::TrgEntry
TrgEntry()
Definition: RevisionDML.h:44
lumi::RevisionDML::DataID::lumi_id
unsigned long long lumi_id
Definition: RevisionDML.h:22
lumi::RevisionDML::branchIdByName
unsigned long long branchIdByName(coral::ISchema &schema, const std::string &branchName)
electrons_cff.branchName
branchName
Definition: electrons_cff.py:520
mps_splice.entry
entry
Definition: mps_splice.py:68
lumi::RevisionDML::Entry::revision_id
unsigned long long revision_id
Definition: RevisionDML.h:29
lumi::RevisionDML::addRunToCurrentHFDataTag
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)
Definition: RevisionDML.cc:224
lumi::RevisionDML::DataID::hlt_id
unsigned long long hlt_id
Definition: RevisionDML.h:24
lumi::RevisionDML::TrgEntry::source
std::string source
Definition: RevisionDML.h:45
lumi::RevisionDML::LumiEntry::ncollidingbunches
unsigned int ncollidingbunches
Definition: RevisionDML.h:40
lumi::RevisionDML::Entry::entry_id
unsigned long long entry_id
Definition: RevisionDML.h:30
lumi::RevisionDML::addRevision
void addRevision(coral::ISchema &schema, const std::string &datatableName, const Entry &revision, unsigned long long branch_id, std::string &branchname)
Definition: RevisionDML.cc:97
lumi::RevisionDML::DataID::DataID
DataID()
Definition: RevisionDML.h:19
lumi::RevisionDML::LumiEntry::LumiEntry
LumiEntry()
Definition: RevisionDML.h:36
lumi::RevisionDML::LumiEntry::source
std::string source
Definition: RevisionDML.h:37
lumi::RevisionDML::Entry::entry_name
std::string entry_name
Definition: RevisionDML.h:32
lumi::RevisionDML::DataID::trg_id
unsigned long long trg_id
Definition: RevisionDML.h:23
coral
Definition: Binary.h:9
lumi::RevisionDML
Definition: RevisionDML.h:9
lumi::RevisionDML::TrgEntry::bitzeroname
std::string bitzeroname
Definition: RevisionDML.h:47
lumi::RevisionDML::DataID
Definition: RevisionDML.h:17
lumi::RevisionDML::Entry
Definition: RevisionDML.h:26
lumi::RevisionDML::TrgEntry::bitnames
std::string bitnames
Definition: RevisionDML.h:48
lumi::RevisionDML::HltEntry::npath
unsigned int npath
Definition: RevisionDML.h:55
lumi::RevisionDML::Entry::Entry
Entry()
Definition: RevisionDML.h:28
lumi::RevisionDML::TrgEntry
Definition: RevisionDML.h:42
lumi::RevisionDML::HltEntry::source
std::string source
Definition: RevisionDML.h:53
lumi::RevisionDML::HltEntry
Definition: RevisionDML.h:50
lumi::RevisionDML::bookNewRevision
void bookNewRevision(coral::ISchema &schema, const std::string &datatableName, Entry &revision)
Definition: RevisionDML.cc:53
lumi::RevisionDML::currentHFDataTagId
unsigned long long currentHFDataTagId(coral::ISchema &schema)
Definition: RevisionDML.cc:178
lumi::RevisionDML::bookNewEntry
void bookNewEntry(coral::ISchema &schema, const std::string &datatableName, Entry &entry)
Definition: RevisionDML.cc:44
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
lumi::RevisionDML::HFDataTagIdByName
unsigned long long HFDataTagIdByName(coral::ISchema &schema, const std::string &datatagname)
Definition: RevisionDML.cc:201
lumi::RevisionDML::LumiEntry::bgev
float bgev
Definition: RevisionDML.h:39
lumi::RevisionDML::dataIDForRun
DataID dataIDForRun(coral::ISchema &schema, unsigned int runnum, unsigned long long tagid)
Definition: RevisionDML.cc:255
lumi::RevisionDML::LumiEntry
Definition: RevisionDML.h:34
lumi::RevisionDML::insertTrgRunData
void insertTrgRunData(coral::ISchema &schema, const TrgEntry &trgentry)
Definition: RevisionDML.cc:139
lumi::RevisionDML::addEntry
void addEntry(coral::ISchema &schema, const std::string &datatableName, const Entry &entry, unsigned long long branch_id, const std::string &branchname)
Definition: RevisionDML.cc:60
lumi::RevisionDML::TrgEntry::runnumber
unsigned int runnumber
Definition: RevisionDML.h:46
lumi::RevisionDML::insertHltRunData
void insertHltRunData(coral::ISchema &schema, const HltEntry &hltentry)
Definition: RevisionDML.cc:158
lumi::RevisionDML::insertLumiRunData
void insertLumiRunData(coral::ISchema &schema, const LumiEntry &lumientry)
Definition: RevisionDML.cc:120
lumi::RevisionDML::HltEntry::pathnames
std::string pathnames
Definition: RevisionDML.h:56
lumi
Definition: LumiSectionData.h:20
lumi::RevisionDML::HltEntry::runnumber
unsigned int runnumber
Definition: RevisionDML.h:54
lumi::RevisionDML::LumiEntry::runnumber
unsigned int runnumber
Definition: RevisionDML.h:38
lumi::RevisionDML::Entry::data_id
unsigned long long data_id
Definition: RevisionDML.h:31
lumi::RevisionDML::getEntryInBranchByName
unsigned long long getEntryInBranchByName(coral::ISchema &schema, const std::string &datatableName, const std::string &entryname, const std::string &branchname)
Definition: RevisionDML.cc:16