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
unsigned long long hlt_id
Definition: RevisionDML.h:24
unsigned long long data_id
Definition: RevisionDML.h:31
Definition: Binary.h:9
unsigned long long revision_id
Definition: RevisionDML.h:29
unsigned long long entry_id
Definition: RevisionDML.h:30
unsigned int ncollidingbunches
Definition: RevisionDML.h:40
unsigned long long lumi_id
Definition: RevisionDML.h:22
static std::string const source
Definition: EdmProvDump.cc:47
unsigned long long trg_id
Definition: RevisionDML.h:23