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 ) {
14 
19  conddb_column( SNAPSHOT_TIME, boost::posix_time::ptime );
20  conddb_column( INSERTION_TIME, boost::posix_time::ptime );
21 
22  class Table : public IGTTable {
23  public:
24  explicit Table( coral::ISchema& schema );
25  ~Table() override{}
26  bool exists() override;
27  void create() override;
28  bool select( const std::string& name) override;
29  bool select( const std::string& name, cond::Time_t& validity, boost::posix_time::ptime& snapshotTime ) override;
30  bool select( const std::string& name, cond::Time_t& validity, std::string& description,
31  std::string& release, boost::posix_time::ptime& snapshotTime ) override;
32  void insert( const std::string& name, cond::Time_t validity, const std::string& description, const std::string& release,
33  const boost::posix_time::ptime& snapshotTime, const boost::posix_time::ptime& insertionTime ) override;
34  void update( const std::string& name, cond::Time_t validity, const std::string& description, const std::string& release,
35  const boost::posix_time::ptime& snapshotTime, const boost::posix_time::ptime& insertionTime ) override;
36  private:
37  coral::ISchema& m_schema;
38  };
39  }
40 
41  conddb_table ( GLOBAL_TAG_MAP ) {
42 
43  static constexpr unsigned int PAYLOAD_HASH_SIZE = 40;
44 
46  // to be changed to RECORD_NAME!
48  // to be changed to RECORD_LABEL!
51 
52  class Table : public IGTMapTable {
53  public:
54  explicit Table( coral::ISchema& schema );
55  ~Table() override{}
56  bool exists() override;
57  void create() override;
58  bool select( const std::string& gtName, std::vector<std::tuple<std::string,std::string,std::string> >& tags ) override;
59  bool select( const std::string& gtName, const std::string& preFix, const std::string& postFix,
60  std::vector<std::tuple<std::string,std::string,std::string> >& tags ) override;
61  void insert( const std::string& gtName, const std::vector<std::tuple<std::string,std::string,std::string> >& tags ) override;
62  private:
63  coral::ISchema& m_schema;
64  };
65  }
66 
67  class GTSchema : public IGTSchema {
68  public:
69  explicit GTSchema( coral::ISchema& schema );
70  ~GTSchema() override{}
71  bool exists() override;
72  void create() override;
73  GLOBAL_TAG::Table& gtTable() override;
74  GLOBAL_TAG_MAP::Table& gtMapTable() override;
75  private:
78  };
79 
80  }
81 }
82 #endif
def create(alignables, pedeDump, additionalData, outputFile, config)
GLOBAL_TAG::Table m_gtTable
Definition: GTSchema.h:76
#define conddb_column(...)
Definition: DbCore.h:73
#define constexpr
unsigned long long Time_t
Definition: Time.h:16
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
static unsigned int PAYLOAD_HASH_SIZE
Definition: GTSchema.h:43
Definition: plugin.cc:24
#define update(a, b)
GLOBAL_TAG_MAP::Table m_gtMapTable
Definition: GTSchema.h:77
#define conddb_table(NAME)
Definition: DbCore.h:48