26 using coral::AttributeList;
86 auto ptrResult = std::make_shared<L1MuGMTParameters>();
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) );
105 const AttributeList& resultRecord = resultLines.
attributeLists().front();
106 checkCMSSWVersion(resultRecord);
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
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)
L1MuGMTParametersOnlineProducer(const edm::ParameterSet &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
virtual std::vector< std::string > getColumnList()
void checkCMSSWVersion(const coral::AttributeList &configRecord)