CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 Entry{
18  public:
20  unsigned long long revision_id;
21  unsigned long long entry_id;
22  unsigned long long data_id;
23  std::string entry_name;
24  };
25  class LumiEntry : public Entry{
26  public:
27  LumiEntry():source(""),runnumber(0),bgev(0.0){}
28  std::string source;
29  unsigned int runnumber;
30  float bgev;
31  unsigned int ncollidingbunches;
32  };
33  class TrgEntry : public Entry{
34  public:
36  std::string source;
37  unsigned int runnumber;
38  std::string bitzeroname;
39  std::string bitnames;
40  };
41  class HltEntry : public Entry{
42  public:
44  std::string source;
45  unsigned int runnumber;
46  unsigned int npath;
47  std::string pathnames;
48  };
49 
53  unsigned long long branchIdByName(coral::ISchema& schema,const std::string& branchName);
54 
58  unsigned long long getEntryInBranchByName(coral::ISchema& schema,
59  const std::string& datatableName,
60  const std::string& entryname,
61  const std::string& branchname);
65  void bookNewEntry(coral::ISchema& schema,
66  const std::string& datatableName,
67  Entry& entry);
71  void bookNewRevision(coral::ISchema& schema,
72  const std::string& datatableName,
73  Entry& revision);
82  void addEntry(coral::ISchema& schema,const std::string& datatableName,const Entry& entry,unsigned long long branch_id,const std::string& branchname );
89  void addRevision(coral::ISchema& schema,const std::string& datatableName,const Entry& revision,unsigned long long branch_id,std::string& branchname );
90  void insertLumiRunData(coral::ISchema& schema,const LumiEntry& lumientry);
91  void insertTrgRunData(coral::ISchema& schema,const TrgEntry& trgentry);
92  void insertHltRunData(coral::ISchema& schema,const HltEntry& hltentry);
93  };
94 
95 }//ns lumi
96 #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:61
tuple lumi
Definition: fjr2json.py:35
void insertLumiRunData(coral::ISchema &schema, const LumiEntry &lumientry)
Definition: RevisionDML.cc:123
unsigned long long data_id
Definition: RevisionDML.h:22
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
unsigned long long getEntryInBranchByName(coral::ISchema &schema, const std::string &datatableName, const std::string &entryname, const std::string &branchname)
Definition: RevisionDML.cc:14
unsigned long long revision_id
Definition: RevisionDML.h:20
void insertTrgRunData(coral::ISchema &schema, const TrgEntry &trgentry)
Definition: RevisionDML.cc:144
unsigned long long entry_id
Definition: RevisionDML.h:21
void bookNewEntry(coral::ISchema &schema, const std::string &datatableName, Entry &entry)
Definition: RevisionDML.cc:43
void insertHltRunData(coral::ISchema &schema, const HltEntry &hltentry)
Definition: RevisionDML.cc:165
unsigned int ncollidingbunches
Definition: RevisionDML.h:31
void addRevision(coral::ISchema &schema, const std::string &datatableName, const Entry &revision, unsigned long long branch_id, std::string &branchname)
Definition: RevisionDML.cc:99
void bookNewRevision(coral::ISchema &schema, const std::string &datatableName, Entry &revision)
Definition: RevisionDML.cc:53