28 using coral::AttributeList;
38 using namespace edm::es;
90 std::vector<std::string> resultColumns = helper.getColumnList();
91 resultColumns.push_back(
"CMSSW_VERSION");
94 m_omdsReader.basicQuery(
100 "GMT_SOFTWARE_CONFIG",
102 "GMT_SOFTWARE_CONFIG.KEY",
104 m_omdsReader.singleAttribute(objectKey) );
106 if(resultLines.numberRows() == 1) {
107 const AttributeList& resultRecord = resultLines.
attributeLists().front();
108 checkCMSSWVersion(resultRecord);
109 helper.extractRecord(resultRecord, *ptrResult);
113 throw cond::Exception(
"Couldn't find GMT_SOFTWARE_CONFIG record for GMT key `" + objectKey +
"'") ;
118 const coral::Attribute&
version = configRecord[
"CMSSW_VERSION"];
121 if(version.isNull()) {
122 edm::LogInfo(
"No CMSSW version set in database, accepting " PROJECT_VERSION);
127 const std::string& versionString = version.data<
string>();
130 if(versionString != PROJECT_VERSION) {
131 std::string errMsg =
"CMSSW version mismatch: Configuration requires " +
132 versionString +
", but this is " PROJECT_VERSION
"!";
134 if(ignoreVersionMismatch_) {
135 edm::LogWarning(errMsg +
" (will continue because ignoreVersionMismatch is set)");
T getParameter(std::string const &) const
~L1MuGMTParametersOnlineProducer()
bool ignoreVersionMismatch_
#define RH_ASSIGN_GROUP(TOutput, TGroup)
const std::vector< coral::AttributeList > & attributeLists() const
#define ADD_FIELD(HELPER, OUTPUT_NAME, FIELD_NAME)
L1MuGMTParametersOnlineProducer(const edm::ParameterSet &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void checkCMSSWVersion(const coral::AttributeList &configRecord)