CMS 3D CMS Logo

GTSchema.h
Go to the documentation of this file.
1 #ifndef CondCore_CondDB_GTSchema_h
2 #define CondCore_CondDB_GTSchema_h
3 
4 #include "DbCore.h"
5 #include "IDbSchema.h"
6 //
7 #include <boost/date_time/posix_time/posix_time.hpp>
8 
9 namespace cond {
10 
11  namespace persistency {
12 
13  conddb_table(GLOBAL_TAG) {
18  conddb_column(SNAPSHOT_TIME, boost::posix_time::ptime);
19  conddb_column(INSERTION_TIME, boost::posix_time::ptime);
20 
21  class Table : public IGTTable {
22  public:
23  explicit Table(coral::ISchema& schema);
24  ~Table() override {}
25  bool exists() override;
26  void create() override;
27  bool select(const std::string& name) override;
28  bool select(const std::string& name, cond::Time_t& validity, boost::posix_time::ptime& snapshotTime) override;
29  bool select(const std::string& name,
30  cond::Time_t& validity,
33  boost::posix_time::ptime& snapshotTime) override;
34  void insert(const std::string& name,
35  cond::Time_t validity,
36  const std::string& description,
37  const std::string& release,
38  const boost::posix_time::ptime& snapshotTime,
39  const boost::posix_time::ptime& insertionTime) override;
40  void update(const std::string& name,
41  cond::Time_t validity,
42  const std::string& description,
43  const std::string& release,
44  const boost::posix_time::ptime& snapshotTime,
45  const boost::posix_time::ptime& insertionTime) override;
46 
47  private:
48  coral::ISchema& m_schema;
49  };
50  }
51 
52  conddb_table(GLOBAL_TAG_MAP) {
53  static constexpr unsigned int PAYLOAD_HASH_SIZE = 40;
54 
56  // to be changed to RECORD_NAME!
58  // to be changed to RECORD_LABEL!
61 
62  class Table : public IGTMapTable {
63  public:
64  explicit Table(coral::ISchema& schema);
65  ~Table() override {}
66  bool exists() override;
67  void create() override;
68  bool select(const std::string& gtName,
69  std::vector<std::tuple<std::string, std::string, std::string> >& tags) override;
70  bool select(const std::string& gtName,
71  const std::string& preFix,
72  const std::string& postFix,
73  std::vector<std::tuple<std::string, std::string, std::string> >& tags) override;
74  void insert(const std::string& gtName,
75  const std::vector<std::tuple<std::string, std::string, std::string> >& tags) override;
76 
77  private:
78  coral::ISchema& m_schema;
79  };
80  }
81 
82  class GTSchema : public IGTSchema {
83  public:
84  explicit GTSchema(coral::ISchema& schema);
85  ~GTSchema() override {}
86  bool exists() override;
87  void create() override;
88  GLOBAL_TAG::Table& gtTable() override;
90 
91  private:
94  };
95 
96  } // namespace persistency
97 } // namespace cond
98 #endif
cond::persistency::IGTTable
Definition: IDbSchema.h:166
cond::persistency::GTSchema::create
void create() override
Definition: GTSchema.cc:131
cond::persistency::GLOBAL_TAG::VALIDITY
Definition: GTSchema.h:15
cond::persistency::GLOBAL_TAG_MAP::Table::m_schema
coral::ISchema & m_schema
Definition: GTSchema.h:78
cond::persistency::GLOBAL_TAG::DESCRIPTION
Definition: GTSchema.h:16
cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME
Definition: GTSchema.h:55
edmLumisInFiles.description
description
Definition: edmLumisInFiles.py:11
singleTopDQM_cfi.select
select
Definition: singleTopDQM_cfi.py:50
cond::persistency::IGTSchema
Definition: IDbSchema.h:207
loadRecoTauTagMVAsFromPrepDB_cfi.snapshotTime
snapshotTime
Definition: loadRecoTauTagMVAsFromPrepDB_cfi.py:10
cond::persistency::GLOBAL_TAG::RELEASE
Definition: GTSchema.h:17
cond::persistency::GTSchema::GTSchema
GTSchema(coral::ISchema &schema)
Definition: GTSchema.cc:121
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
cond::persistency::GLOBAL_TAG_MAP::RECORD
Definition: GTSchema.h:57
cond::persistency::IGTMapTable
Definition: IDbSchema.h:192
cond::persistency::GLOBAL_TAG::Table
Definition: GTSchema.h:21
cond::persistency::GTSchema::gtTable
GLOBAL_TAG::Table & gtTable() override
Definition: GTSchema.cc:136
cond::persistency::GTSchema::~GTSchema
~GTSchema() override
Definition: GTSchema.h:85
conddb_column
#define conddb_column(...)
Definition: DbCore.h:75
cond::persistency::GLOBAL_TAG_MAP::LABEL
Definition: GTSchema.h:59
cond::persistency::GTSchema::gtMapTable
GLOBAL_TAG_MAP::Table & gtMapTable() override
Definition: GTSchema.cc:138
cond::persistency::GLOBAL_TAG_MAP::TAG_NAME
Definition: GTSchema.h:60
cond::persistency::GTSchema::m_gtTable
GLOBAL_TAG::Table m_gtTable
Definition: GTSchema.h:92
cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME
Definition: GTSchema.h:18
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cond::persistency::GLOBAL_TAG::INSERTION_TIME
Definition: GTSchema.h:19
cond::persistency::GLOBAL_TAG::Table::m_schema
coral::ISchema & m_schema
Definition: GTSchema.h:48
cond
Definition: plugin.cc:23
fetchall_from_DQM_v2.release
release
Definition: fetchall_from_DQM_v2.py:92
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
DbCore.h
cond::persistency::GTSchema::m_gtMapTable
GLOBAL_TAG_MAP::Table m_gtMapTable
Definition: GTSchema.h:93
conddb_table
#define conddb_table(NAME)
Definition: DbCore.h:48
cond::persistency::GLOBAL_TAG::NAME
Definition: GTSchema.h:14
cond::persistency::GLOBAL_TAG::Table::~Table
~Table() override
Definition: GTSchema.h:24
cond::persistency::GLOBAL_TAG_MAP::PAYLOAD_HASH_SIZE
static constexpr unsigned int PAYLOAD_HASH_SIZE
Definition: GTSchema.h:53
cond::persistency::GLOBAL_TAG_MAP::Table
Definition: GTSchema.h:62
edm::eventsetup::heterocontainer::insert
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
cond::persistency::GTSchema::exists
bool exists() override
Definition: GTSchema.cc:123
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
IDbSchema.h
triggerMatcherToHLTDebug_cfi.tags
tags
Definition: triggerMatcherToHLTDebug_cfi.py:9
cond::persistency::GTSchema
Definition: GTSchema.h:82
update
#define update(a, b)
Definition: TrackClassifier.cc:10
cond::persistency::GLOBAL_TAG_MAP::Table::~Table
~Table() override
Definition: GTSchema.h:65