10 #include "RelationalAccess/ITransaction.h"
11 #include "RelationalAccess/ISessionProxy.h"
12 #include "RelationalAccess/ISchema.h"
13 #include "RelationalAccess/ITable.h"
14 #include "RelationalAccess/TableDescription.h"
15 #include "CoralBase/Attribute.h"
16 #include "CoralBase/AttributeList.h"
17 #include "CoralBase/TimeStamp.h"
35 m_configMapDb( iConfig.getParameter< std::
string >(
"configMapDatabase") ){
45 coral::TableDescription mapTable;
46 mapTable.setName(
"STRIP_CONFIG_TO_PAYLOAD_MAP");
47 mapTable.insertColumn(
"CONFIG_HASH", coral::AttributeSpecification::typeNameForType<std::string>());
48 mapTable.insertColumn(
"PAYLOAD_HASH", coral::AttributeSpecification::typeNameForType<std::string>());
49 mapTable.insertColumn(
"PAYLOAD_TYPE", coral::AttributeSpecification::typeNameForType<std::string>());
50 mapTable.insertColumn(
"CONFIG_STRING", coral::AttributeSpecification::typeNameForType<std::string>());
51 mapTable.insertColumn(
"INSERTION_TIME", coral::AttributeSpecification::typeNameForType<coral::TimeStamp>());
52 mapTable.setPrimaryKey(
"CONFIG_HASH");
53 mapTable.setNotNullConstraint(
"CONFIG_HASH");
54 mapTable.setNotNullConstraint(
"PAYLOAD_HASH");
55 mapTable.setNotNullConstraint(
"PAYLOAD_TYPE");
56 mapTable.setNotNullConstraint(
"CONFIG_STRING");
57 mapTable.setNotNullConstraint(
"INSERTION_TIME");
59 cmDbSession->transaction().start(
false );
60 cmDbSession->nominalSchema().createTable(mapTable);
61 cmDbSession->transaction().commit();
std::string m_configMapDb
T getParameter(std::string const &) const
cond::persistency::ConnectionPool m_connectionPool
boost::shared_ptr< coral::ISessionProxy > createCoralSession(const std::string &connectionString, bool writeCapable=false)
#define DEFINE_FWK_MODULE(type)
virtual ~SiStripPayloadMapTableCreator()
virtual void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup)
void setParameters(const edm::ParameterSet &connectionPset)
SiStripPayloadMapTableCreator(const edm::ParameterSet &iConfig)