CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
unsigned long long branchIdByName(coral::ISchema &schema, const std::string &branchName)
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
unsigned long long hlt_id
Definition: RevisionDML.h:24
DataID dataIDForRun(coral::ISchema &schema, unsigned int runnum, unsigned long long tagid)
Definition: RevisionDML.cc:255
void insertLumiRunData(coral::ISchema &schema, const LumiEntry &lumientry)
Definition: RevisionDML.cc:120
unsigned long long data_id
Definition: RevisionDML.h:31
unsigned long long getEntryInBranchByName(coral::ISchema &schema, const std::string &datatableName, const std::string &entryname, const std::string &branchname)
Definition: RevisionDML.cc:16
unsigned long long HFDataTagIdByName(coral::ISchema &schema, const std::string &datatagname)
Definition: RevisionDML.cc:201
list lumi
Definition: dqmdumpme.py:53
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
unsigned long long revision_id
Definition: RevisionDML.h:29
void insertTrgRunData(coral::ISchema &schema, const TrgEntry &trgentry)
Definition: RevisionDML.cc:139
unsigned long long entry_id
Definition: RevisionDML.h:30
void bookNewEntry(coral::ISchema &schema, const std::string &datatableName, Entry &entry)
Definition: RevisionDML.cc:44
void insertHltRunData(coral::ISchema &schema, const HltEntry &hltentry)
Definition: RevisionDML.cc:158
unsigned int ncollidingbunches
Definition: RevisionDML.h:40
list entry
Definition: mps_splice.py:68
void addRevision(coral::ISchema &schema, const std::string &datatableName, const Entry &revision, unsigned long long branch_id, std::string &branchname)
Definition: RevisionDML.cc:97
unsigned long long currentHFDataTagId(coral::ISchema &schema)
Definition: RevisionDML.cc:178
unsigned long long lumi_id
Definition: RevisionDML.h:22
unsigned long long trg_id
Definition: RevisionDML.h:23
void bookNewRevision(coral::ISchema &schema, const std::string &datatableName, Entry &revision)
Definition: RevisionDML.cc:53