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 };
00032 class TrgEntry : public Entry{
00033 public:
00034 TrgEntry():source(""),runnumber(0),bitzeroname(""){}
00035 std::string source;
00036 unsigned int runnumber;
00037 std::string bitzeroname;
00038 std::string bitnames;
00039 };
00040 class HltEntry : public Entry{
00041 public:
00042 HltEntry():source(""),runnumber(0),npath(0){}
00043 std::string source;
00044 unsigned int runnumber;
00045 unsigned int npath;
00046 std::string pathnames;
00047 };
00048
00052 unsigned long long branchIdByName(coral::ISchema& schema,const std::string& branchName);
00053
00057 unsigned long long getEntryInBranchByName(coral::ISchema& schema,
00058 const std::string& datatableName,
00059 const std::string& entryname,
00060 const std::string& branchname);
00064 void bookNewEntry(coral::ISchema& schema,
00065 const std::string& datatableName,
00066 Entry& entry);
00070 void bookNewRevision(coral::ISchema& schema,
00071 const std::string& datatableName,
00072 Entry& revision);
00081 void addEntry(coral::ISchema& schema,const std::string& datatableName,const Entry& entry,unsigned long long branch_id,const std::string& branchname );
00088 void addRevision(coral::ISchema& schema,const std::string& datatableName,const Entry& revision,unsigned long long branch_id,std::string& branchname );
00089 void insertLumiRunData(coral::ISchema& schema,const LumiEntry& lumientry);
00090 void insertTrgRunData(coral::ISchema& schema,const TrgEntry& trgentry);
00091 void insertHltRunData(coral::ISchema& schema,const HltEntry& hltentry);
00092 };
00093
00094 }
00095 #endif