Go to the documentation of this file.00001 #ifndef RecoLuminosity_LumiProducer_RevisionDML_H
00002 #define RecoLuminosity_LumiProducer_RevisionDML_H
00003 #include <string>
00004 #include <vector>
00005 namespace coral{
00006 class ISchema;
00007 }
00008 namespace lumi{
00009 class RevisionDML{
00010 public:
00011
00012
00013
00014
00015
00016
00017 class Entry{
00018 public:
00019 Entry():revision_id(0),entry_id(0),data_id(0),entry_name(""){}
00020 unsigned long long revision_id;
00021 unsigned long long entry_id;
00022 unsigned long long data_id;
00023 std::string entry_name;
00024 };
00025 class LumiEntry : public Entry{
00026 public:
00027 LumiEntry():source(""),runnumber(0),bgev(0.0){}
00028 std::string source;
00029 unsigned int runnumber;
00030 float bgev;
00031 unsigned int ncollidingbunches;
00032 };
00033 class TrgEntry : public Entry{
00034 public:
00035 TrgEntry():source(""),runnumber(0),bitzeroname(""){}
00036 std::string source;
00037 unsigned int runnumber;
00038 std::string bitzeroname;
00039 std::string bitnames;
00040 };
00041 class HltEntry : public Entry{
00042 public:
00043 HltEntry():source(""),runnumber(0),npath(0){}
00044 std::string source;
00045 unsigned int runnumber;
00046 unsigned int npath;
00047 std::string pathnames;
00048 };
00049
00053 unsigned long long branchIdByName(coral::ISchema& schema,const std::string& branchName);
00054
00058 unsigned long long getEntryInBranchByName(coral::ISchema& schema,
00059 const std::string& datatableName,
00060 const std::string& entryname,
00061 const std::string& branchname);
00065 void bookNewEntry(coral::ISchema& schema,
00066 const std::string& datatableName,
00067 Entry& entry);
00071 void bookNewRevision(coral::ISchema& schema,
00072 const std::string& datatableName,
00073 Entry& revision);
00082 void addEntry(coral::ISchema& schema,const std::string& datatableName,const Entry& entry,unsigned long long branch_id,const std::string& branchname );
00089 void addRevision(coral::ISchema& schema,const std::string& datatableName,const Entry& revision,unsigned long long branch_id,std::string& branchname );
00090 void insertLumiRunData(coral::ISchema& schema,const LumiEntry& lumientry);
00091 void insertTrgRunData(coral::ISchema& schema,const TrgEntry& trgentry);
00092 void insertHltRunData(coral::ISchema& schema,const HltEntry& hltentry);
00093 };
00094
00095 }
00096 #endif