26 using coral::AttributeList;
84 auto ptrResult = std::make_unique<L1MuGMTParameters>();
86 std::vector<std::string> resultColumns = helper.
getColumnList();
87 resultColumns.push_back(
"CMSSW_VERSION");
90 m_omdsReader.basicQuery(
96 "GMT_SOFTWARE_CONFIG",
98 "GMT_SOFTWARE_CONFIG.KEY",
100 m_omdsReader.singleAttribute(objectKey) );
103 const AttributeList& resultRecord = resultLines.
attributeLists().front();
104 checkCMSSWVersion(resultRecord);
109 throw cond::Exception(
"Couldn't find GMT_SOFTWARE_CONFIG record for GMT key `" + objectKey +
"'") ;
114 const coral::Attribute&
version = configRecord[
"CMSSW_VERSION"];
117 if(version.isNull()) {
118 edm::LogInfo(
"No CMSSW version set in database, accepting " PROJECT_VERSION);
123 const std::string& versionString = version.data<
string>();
126 if(versionString != PROJECT_VERSION) {
127 std::string errMsg =
"CMSSW version mismatch: Configuration requires " +
128 versionString +
", but this is " + PROJECT_VERSION +
"!";
130 if(ignoreVersionMismatch_) {
131 edm::LogWarning(errMsg +
" (will continue because ignoreVersionMismatch is set)");
persistency::Exception Exception
T getParameter(std::string const &) const
virtual void extractRecord(const AttributeList &source, TOutput &dest)
bool ignoreVersionMismatch_
~L1MuGMTParametersOnlineProducer() override
#define RH_ASSIGN_GROUP(TOutput, TGroup)
const std::vector< coral::AttributeList > & attributeLists() const
#define ADD_FIELD(HELPER, OUTPUT_NAME, FIELD_NAME)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
L1MuGMTParametersOnlineProducer(const edm::ParameterSet &)
virtual std::vector< std::string > getColumnList()
void checkCMSSWVersion(const coral::AttributeList &configRecord)