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 DataID{
18  public:
19  DataID():lumi_id(0),trg_id(0),hlt_id(0){}
20  public:
21  unsigned long long lumi_id;
22  unsigned long long trg_id;
23  unsigned long long hlt_id;
24  };
25  class Entry{
26  public:
28  unsigned long long revision_id;
29  unsigned long long entry_id;
30  unsigned long long data_id;
32  };
33  class LumiEntry : public Entry{
34  public:
35  LumiEntry():source(""),runnumber(0),bgev(0.0){}
37  unsigned int runnumber;
38  float bgev;
39  unsigned int ncollidingbunches;
40  };
41  class TrgEntry : public Entry{
42  public:
45  unsigned int runnumber;
48  };
49  class HltEntry : public Entry{
50  public:
53  unsigned int runnumber;
54  unsigned int npath;
56  };
57 
61  unsigned long long branchIdByName(coral::ISchema& schema,const std::string& branchName);
62 
66  unsigned long long getEntryInBranchByName(coral::ISchema& schema,
67  const std::string& datatableName,
68  const std::string& entryname,
69  const std::string& branchname);
73  void bookNewEntry(coral::ISchema& schema,
74  const std::string& datatableName,
75  Entry& entry);
79  void bookNewRevision(coral::ISchema& schema,
80  const std::string& datatableName,
81  Entry& revision);
90  void addEntry(coral::ISchema& schema,const std::string& datatableName,const Entry& entry,unsigned long long branch_id,const std::string& branchname );
97  void addRevision(coral::ISchema& schema,const std::string& datatableName,const Entry& revision,unsigned long long branch_id,std::string& branchname );
98  void insertLumiRunData(coral::ISchema& schema,const LumiEntry& lumientry);
99  void insertTrgRunData(coral::ISchema& schema,const TrgEntry& trgentry);
100  void insertHltRunData(coral::ISchema& schema,const HltEntry& hltentry);
101 
102  unsigned long long currentHFDataTagId(coral::ISchema& schema);
103  unsigned long long HFDataTagIdByName(coral::ISchema& schema,
104  const std::string& datatagname);
105  unsigned long long addRunToCurrentHFDataTag(coral::ISchema& schema,
106  unsigned int runnum,
107  unsigned long long lumiid,
108  unsigned long long trgid,
109  unsigned long long hltid,
110  const std::string& patchcomment);
111  DataID dataIDForRun(coral::ISchema& schema,
112  unsigned int runnum,
113  unsigned long long tagid);
114 
115  };
116 }//ns lumi
117 #endif
datatagname
check datatag
Definition: lumiCalc2.py:320
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:64
unsigned long long hlt_id
Definition: RevisionDML.h:23
tuple lumi
Definition: fjr2json.py:35
DataID dataIDForRun(coral::ISchema &schema, unsigned int runnum, unsigned long long tagid)
Definition: RevisionDML.cc:272
void insertLumiRunData(coral::ISchema &schema, const LumiEntry &lumientry)
Definition: RevisionDML.cc:126
unsigned long long data_id
Definition: RevisionDML.h:30
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:17
unsigned long long HFDataTagIdByName(coral::ISchema &schema, const std::string &datatagname)
Definition: RevisionDML.cc:214
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:239
unsigned long long revision_id
Definition: RevisionDML.h:28
void insertTrgRunData(coral::ISchema &schema, const TrgEntry &trgentry)
Definition: RevisionDML.cc:147
unsigned long long entry_id
Definition: RevisionDML.h:29
void bookNewEntry(coral::ISchema &schema, const std::string &datatableName, Entry &entry)
Definition: RevisionDML.cc:46
void insertHltRunData(coral::ISchema &schema, const HltEntry &hltentry)
Definition: RevisionDML.cc:168
unsigned int ncollidingbunches
Definition: RevisionDML.h:39
tuple runnum
Definition: summaryLumi.py:210
void addRevision(coral::ISchema &schema, const std::string &datatableName, const Entry &revision, unsigned long long branch_id, std::string &branchname)
Definition: RevisionDML.cc:102
unsigned long long currentHFDataTagId(coral::ISchema &schema)
Definition: RevisionDML.cc:190
unsigned long long lumi_id
Definition: RevisionDML.h:21
unsigned long long trg_id
Definition: RevisionDML.h:22
void bookNewRevision(coral::ISchema &schema, const std::string &datatableName, Entry &revision)
Definition: RevisionDML.cc:56