26 using coral::AttributeList;
36 using namespace edm::es;
88 std::vector<std::string> resultColumns = helper.getColumnList();
89 resultColumns.push_back(
"CMSSW_VERSION");
92 m_omdsReader.basicQuery(
98 "GMT_SOFTWARE_CONFIG",
100 "GMT_SOFTWARE_CONFIG.KEY",
102 m_omdsReader.singleAttribute(objectKey) );
104 if(resultLines.numberRows() == 1) {
105 const AttributeList& resultRecord = resultLines.
attributeLists().front();
106 checkCMSSWVersion(resultRecord);
107 helper.extractRecord(resultRecord, *ptrResult);
111 throw cond::Exception(
"Couldn't find GMT_SOFTWARE_CONFIG record for GMT key `" + objectKey +
"'") ;
116 const coral::Attribute&
version = configRecord[
"CMSSW_VERSION"];
119 if(version.isNull()) {
120 edm::LogInfo(
"No CMSSW version set in database, accepting " PROJECT_VERSION);
125 const std::string& versionString = version.data<
string>();
128 if(versionString != PROJECT_VERSION) {
129 std::string errMsg =
"CMSSW version mismatch: Configuration requires " +
130 versionString +
", but this is " PROJECT_VERSION
"!";
132 if(ignoreVersionMismatch_) {
133 edm::LogWarning(errMsg +
" (will continue because ignoreVersionMismatch is set)");
persistency::Exception Exception
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)