CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  table( GLOBAL_TAG ) {
14 
19  column( SNAPSHOT_TIME, boost::posix_time::ptime );
20  column( INSERTION_TIME, boost::posix_time::ptime );
21 
22  class Table : public IGTTable {
23  public:
24  explicit Table( coral::ISchema& schema );
25  virtual ~Table(){}
26  bool exists();
27  bool select( const std::string& name);
28  bool select( const std::string& name, cond::Time_t& validity, boost::posix_time::ptime& snapshotTime );
29  bool select( const std::string& name, cond::Time_t& validity, std::string& description,
30  std::string& release, boost::posix_time::ptime& snapshotTime );
31  void insert( const std::string& name, cond::Time_t validity, const std::string& description, const std::string& release,
32  const boost::posix_time::ptime& snapshotTime, const boost::posix_time::ptime& insertionTime );
33  void update( const std::string& name, cond::Time_t validity, const std::string& description, const std::string& release,
34  const boost::posix_time::ptime& snapshotTime, const boost::posix_time::ptime& insertionTime );
35  private:
36  coral::ISchema& m_schema;
37  };
38  }
39 
40  table ( GLOBAL_TAG_MAP ) {
41 
42  static constexpr unsigned int PAYLOAD_HASH_SIZE = 40;
43 
45  // to be changed to RECORD_NAME!
47  // to be changed to RECORD_LABEL!
50 
51  class Table : public IGTMapTable {
52  public:
53  explicit Table( coral::ISchema& schema );
54  virtual ~Table(){}
55  bool exists();
56  bool select( const std::string& gtName, std::vector<std::tuple<std::string,std::string,std::string> >& tags );
57  bool select( const std::string& gtName, const std::string& preFix, const std::string& postFix,
58  std::vector<std::tuple<std::string,std::string,std::string> >& tags );
59  void insert( const std::string& gtName, const std::vector<std::tuple<std::string,std::string,std::string> >& tags );
60  private:
61  coral::ISchema& m_schema;
62  };
63  }
64 
65  class GTSchema : public IGTSchema {
66  public:
67  explicit GTSchema( coral::ISchema& schema );
68  virtual ~GTSchema(){}
69  bool exists();
72  private:
75  };
76 
77  }
78 }
79 #endif
GLOBAL_TAG::Table & gtTable()
Definition: GTSchema.cc:124
GLOBAL_TAG::Table m_gtTable
Definition: GTSchema.h:73
#define constexpr
GTSchema(coral::ISchema &schema)
Definition: GTSchema.cc:113
unsigned long long Time_t
Definition: Time.h:16
GLOBAL_TAG_MAP::Table & gtMapTable()
Definition: GTSchema.cc:128
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
tuple tags
Definition: o2o.py:248
tuple description
Definition: idDealer.py:66
#define table(NAME)
Definition: DbCore.h:49
#define column(...)
Definition: DbCore.h:74
static unsigned int PAYLOAD_HASH_SIZE
Definition: GTSchema.h:42
#define update(a, b)
GLOBAL_TAG_MAP::Table m_gtMapTable
Definition: GTSchema.h:74