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  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:
27  Entry():revision_id(0),entry_id(0),data_id(0),entry_name(""){}
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:
43  TrgEntry():source(""),runnumber(0),bitzeroname(""){}
45  unsigned int runnumber;
48  };
49  class HltEntry : public Entry{
50  public:
51  HltEntry():source(""),runnumber(0),npath(0){}
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 hlt_id
Definition: RevisionDML.h:23
def addEntry(schema, datatableName, entryinfo, branchinfo)
Definition: revisionDML.py:342
unsigned long long data_id
Definition: RevisionDML.h:30
def bookNewRevision(schema, datatableName)
Definition: revisionDML.py:330
Definition: Binary.h:9
def bookNewEntry(schema, datatableName)
Definition: revisionDML.py:316
unsigned long long revision_id
Definition: RevisionDML.h:28
def addRevision(schema, datatableName, revisioninfo, branchinfo)
Definition: revisionDML.py:394
unsigned long long entry_id
Definition: RevisionDML.h:29
unsigned int ncollidingbunches
Definition: RevisionDML.h:39
unsigned long long lumi_id
Definition: RevisionDML.h:21
static std::string const source
Definition: EdmProvDump.cc:43
unsigned long long trg_id
Definition: RevisionDML.h:22