CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
L1MuGMTParametersOnlineProducer Class Reference

#include <L1MuGMTParametersOnlineProducer.h>

Inheritance diagram for L1MuGMTParametersOnlineProducer:
L1ConfigOnlineProdBase< L1MuGMTParametersRcd, L1MuGMTParameters > edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 L1MuGMTParametersOnlineProducer (const edm::ParameterSet &)
 
std::unique_ptr< L1MuGMTParametersnewObject (const std::string &objectKey) override
 The method that actually implements the production of the parameter objects. More...
 
 ~L1MuGMTParametersOnlineProducer () override
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1MuGMTParametersRcd, L1MuGMTParameters >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
virtual std::unique_ptr< L1MuGMTParametersproduce (const L1MuGMTParametersRcd &iRecord)
 
 ~L1ConfigOnlineProdBase () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Protected Member Functions

void checkCMSSWVersion (const coral::AttributeList &configRecord)
 
- Protected Member Functions inherited from L1ConfigOnlineProdBase< L1MuGMTParametersRcd, L1MuGMTParameters >
bool getObjectKey (const L1MuGMTParametersRcd &record, std::string &objectKey)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Private Member Functions

std::string lookupSoftwareConfigKey (const std::string &globalKey)
 

Private Attributes

bool ignoreVersionMismatch_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Attributes inherited from L1ConfigOnlineProdBase< L1MuGMTParametersRcd, L1MuGMTParameters >
bool m_copyFromCondDB
 
cond::persistency::Session m_dbSession
 
bool m_forceGeneration
 
l1t::OMDSReader m_omdsReader
 

Detailed Description

Definition at line 29 of file L1MuGMTParametersOnlineProducer.h.

Constructor & Destructor Documentation

◆ L1MuGMTParametersOnlineProducer()

L1MuGMTParametersOnlineProducer::L1MuGMTParametersOnlineProducer ( const edm::ParameterSet ps)

◆ ~L1MuGMTParametersOnlineProducer()

L1MuGMTParametersOnlineProducer::~L1MuGMTParametersOnlineProducer ( )
override

Definition at line 140 of file L1MuGMTParametersOnlineProducer.cc.

140 {}

Member Function Documentation

◆ checkCMSSWVersion()

void L1MuGMTParametersOnlineProducer::checkCMSSWVersion ( const coral::AttributeList &  configRecord)
protected

Definition at line 110 of file L1MuGMTParametersOnlineProducer.cc.

110  {
111  const coral::Attribute& version = configRecord["CMSSW_VERSION"];
112 
113  /* If the DB field is unset, take any. */
114  if (version.isNull()) {
115  edm::LogInfo("No CMSSW version set in database, accepting " PROJECT_VERSION);
116  return;
117  }
118 
119  /* Else make sure we have the correct version. */
120  const std::string& versionString = version.data<string>();
121 
122  /* PROJECT_VERSION is passed as a -D #define from scramv1 (eg CMSSW_2_1_0) */
123  if (versionString != PROJECT_VERSION) {
124  std::string errMsg =
125  "CMSSW version mismatch: Configuration requires " + versionString + ", but this is " + PROJECT_VERSION + "!";
126 
128  edm::LogWarning(errMsg + " (will continue because ignoreVersionMismatch is set)");
129  } else {
130  throw cond::Exception(errMsg);
131  }
132  }
133 }

References AlCaHLTBitMon_QueryRunRegistry::string, and BeamSplash_cfg::version.

◆ lookupSoftwareConfigKey()

std::string L1MuGMTParametersOnlineProducer::lookupSoftwareConfigKey ( const std::string &  globalKey)
private

◆ newObject()

std::unique_ptr< L1MuGMTParameters > L1MuGMTParametersOnlineProducer::newObject ( const std::string &  objectKey)
overridevirtual

The method that actually implements the production of the parameter objects.

---------— method called to produce the data ---------— Query the CMS_GMT.GMT_SOFTWARE_CONFIG table with a key determined by the "master" config table and return the matching record.

Implements L1ConfigOnlineProdBase< L1MuGMTParametersRcd, L1MuGMTParameters >.

Definition at line 34 of file L1MuGMTParametersOnlineProducer.cc.

34  {
36 
37  // Copy data members from L1MuGMTParameters,
38  // and M-x replace-regexp RET .*m_\([a-z:_]*\) RET ADD_FIELD(helper, L1MuGMTParameters, \1) RET
39 
82 
83  auto ptrResult = std::make_unique<L1MuGMTParameters>();
84 
85  std::vector<std::string> resultColumns = helper.getColumnList();
86  resultColumns.push_back("CMSSW_VERSION");
87 
89  // SELECTed columns
90  resultColumns,
91  // schema name
92  "CMS_GMT",
93  // table name
94  "GMT_SOFTWARE_CONFIG",
95  // WHERE lhs
96  "GMT_SOFTWARE_CONFIG.KEY",
97  // WHERE rhs
98  m_omdsReader.singleAttribute(objectKey));
99 
100  if (resultLines.numberRows() == 1) {
101  const AttributeList& resultRecord = resultLines.attributeLists().front();
102  checkCMSSWVersion(resultRecord);
103  helper.extractRecord(resultRecord, *ptrResult);
104  return ptrResult;
105  }
106 
107  throw cond::Exception("Couldn't find GMT_SOFTWARE_CONFIG record for GMT key `" + objectKey + "'");
108 }

References ADD_FIELD, l1t::OMDSReader::QueryResults::attributeLists(), L1MuGMTParameters_cfi::CaloTrigger, L1MuGMTParameters_cfi::CDLConfigWordbRPCCSC, L1MuGMTParameters_cfi::CDLConfigWordCSCDT, L1MuGMTParameters_cfi::CDLConfigWordDTCSC, L1MuGMTParameters_cfi::CDLConfigWordfRPCDT, L1MuGMTParameters_cfi::DoOvlRpcAnd, L1MuGMTParameters_cfi::EtaPhiThreshold_barrel, L1MuGMTParameters_cfi::EtaPhiThreshold_COU, L1MuGMTParameters_cfi::EtaPhiThreshold_endcap, L1MuGMTParameters_cfi::EtaWeight_barrel, L1MuGMTParameters_cfi::EtaWeight_COU, L1MuGMTParameters_cfi::EtaWeight_endcap, L1MuGMTParameters_cfi::HaloOverwritesMatchedBrl, L1MuGMTParameters_cfi::HaloOverwritesMatchedFwd, L1MuGMTParameters_cfi::IsolationCellSizeEta, L1MuGMTParameters_cfi::IsolationCellSizePhi, L1MuGMTParameters_cfi::MergeMethodChargeBrl, L1MuGMTParameters_cfi::MergeMethodChargeFwd, L1MuGMTParameters_cfi::MergeMethodEtaBrl, L1MuGMTParameters_cfi::MergeMethodEtaFwd, L1MuGMTParameters_cfi::MergeMethodISOBrl, L1MuGMTParameters_cfi::MergeMethodISOFwd, L1MuGMTParameters_cfi::MergeMethodISOSpecialUseANDBrl, L1MuGMTParameters_cfi::MergeMethodISOSpecialUseANDFwd, L1MuGMTParameters_cfi::MergeMethodMIPBrl, L1MuGMTParameters_cfi::MergeMethodMIPFwd, L1MuGMTParameters_cfi::MergeMethodMIPSpecialUseANDBrl, L1MuGMTParameters_cfi::MergeMethodMIPSpecialUseANDFwd, L1MuGMTParameters_cfi::MergeMethodPhiBrl, L1MuGMTParameters_cfi::MergeMethodPhiFwd, L1MuGMTParameters_cfi::MergeMethodPtBrl, L1MuGMTParameters_cfi::MergeMethodPtFwd, L1MuGMTParameters_cfi::MergeMethodSRKBrl, L1MuGMTParameters_cfi::MergeMethodSRKFwd, l1t::OMDSReader::QueryResults::numberRows(), L1MuGMTParameters_cfi::PhiWeight_barrel, L1MuGMTParameters_cfi::PhiWeight_COU, L1MuGMTParameters_cfi::PhiWeight_endcap, L1MuGMTParameters_cfi::PropagatePhi, L1MuGMTParameters_cfi::SortRankOffsetBrl, L1MuGMTParameters_cfi::SortRankOffsetFwd, L1MuGMTParameters_cfi::VersionLUTs, and L1MuGMTParameters_cfi::VersionSortRankEtaQLUT.

Member Data Documentation

◆ ignoreVersionMismatch_

bool L1MuGMTParametersOnlineProducer::ignoreVersionMismatch_
private

Definition at line 42 of file L1MuGMTParametersOnlineProducer.h.

Referenced by L1MuGMTParametersOnlineProducer().

l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
L1MuGMTParameters_cfi.MergeMethodSRKFwd
MergeMethodSRKFwd
Definition: L1MuGMTParameters_cfi.py:36
L1MuGMTParameters_cfi.SortRankOffsetFwd
SortRankOffsetFwd
Definition: L1MuGMTParameters_cfi.py:40
L1MuGMTParameters_cfi.MergeMethodISOBrl
MergeMethodISOBrl
Definition: L1MuGMTParameters_cfi.py:31
L1MuGMTParameters_cfi.EtaPhiThreshold_endcap
EtaPhiThreshold_endcap
Definition: L1MuGMTParameters_cfi.py:9
L1ConfigOnlineProdBase< L1MuGMTParametersRcd, L1MuGMTParameters >::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ConfigOnlineProdBase.h:65
L1MuGMTParameters_cfi.PhiWeight_barrel
PhiWeight_barrel
Definition: L1MuGMTParameters_cfi.py:5
edm::LogInfo
Definition: MessageLogger.h:254
L1MuGMTParameters_cfi.MergeMethodChargeFwd
MergeMethodChargeFwd
Definition: L1MuGMTParameters_cfi.py:26
L1MuGMTParameters_cfi.SortRankOffsetBrl
SortRankOffsetBrl
Definition: L1MuGMTParameters_cfi.py:39
ADD_FIELD
#define ADD_FIELD(HELPER, OUTPUT_NAME, FIELD_NAME)
Definition: RecordHelper.h:192
L1MuGMTParameters_cfi.MergeMethodMIPBrl
MergeMethodMIPBrl
Definition: L1MuGMTParameters_cfi.py:27
l1t::OMDSReader::singleAttribute
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
L1ConfigOnlineProdBase< L1MuGMTParametersRcd, L1MuGMTParameters >
RecordHelper
Definition: RecordHelper.h:145
L1MuGMTParameters_cfi.MergeMethodISOFwd
MergeMethodISOFwd
Definition: L1MuGMTParameters_cfi.py:32
L1MuGMTParameters_cfi.CDLConfigWordfRPCDT
CDLConfigWordfRPCDT
Definition: L1MuGMTParameters_cfi.py:45
L1MuGMTParameters_cfi.MergeMethodISOSpecialUseANDBrl
MergeMethodISOSpecialUseANDBrl
Definition: L1MuGMTParameters_cfi.py:33
L1MuGMTParameters_cfi.MergeMethodPhiFwd
MergeMethodPhiFwd
Definition: L1MuGMTParameters_cfi.py:20
L1MuGMTParameters_cfi.MergeMethodEtaBrl
MergeMethodEtaBrl
Definition: L1MuGMTParameters_cfi.py:21
L1MuGMTParameters_cfi.CDLConfigWordDTCSC
CDLConfigWordDTCSC
Definition: L1MuGMTParameters_cfi.py:42
L1MuGMTParameters_cfi.EtaWeight_endcap
EtaWeight_endcap
Definition: L1MuGMTParameters_cfi.py:7
L1MuGMTParameters_cfi.MergeMethodSRKBrl
MergeMethodSRKBrl
Definition: L1MuGMTParameters_cfi.py:35
L1MuGMTParameters_cfi.CaloTrigger
CaloTrigger
Definition: L1MuGMTParameters_cfi.py:13
L1MuGMTParameters_cfi.MergeMethodMIPFwd
MergeMethodMIPFwd
Definition: L1MuGMTParameters_cfi.py:28
L1MuGMTParameters_cfi.PhiWeight_endcap
PhiWeight_endcap
Definition: L1MuGMTParameters_cfi.py:8
L1MuGMTParameters_cfi.MergeMethodPtBrl
MergeMethodPtBrl
Definition: L1MuGMTParameters_cfi.py:23
L1MuGMTParameters_cfi.PropagatePhi
PropagatePhi
Definition: L1MuGMTParameters_cfi.py:18
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1MuGMTParameters_cfi.CDLConfigWordCSCDT
CDLConfigWordCSCDT
Definition: L1MuGMTParameters_cfi.py:43
edm::LogWarning
Definition: MessageLogger.h:141
L1MuGMTParametersOnlineProducer::ignoreVersionMismatch_
bool ignoreVersionMismatch_
Definition: L1MuGMTParametersOnlineProducer.h:42
L1MuGMTParameters_cfi.EtaWeight_COU
EtaWeight_COU
Definition: L1MuGMTParameters_cfi.py:10
L1MuGMTParameters_cfi.MergeMethodEtaFwd
MergeMethodEtaFwd
Definition: L1MuGMTParameters_cfi.py:22
L1MuGMTParameters_cfi.VersionLUTs
VersionLUTs
Definition: L1MuGMTParameters_cfi.py:56
helper
Definition: helper.py:1
L1MuGMTParameters_cfi.MergeMethodPhiBrl
MergeMethodPhiBrl
Definition: L1MuGMTParameters_cfi.py:19
l1t::OMDSReader::QueryResults::numberRows
int numberRows() const
Definition: OMDSReader.h:60
cond::Exception
persistency::Exception Exception
Definition: Exception.h:25
L1MuGMTParameters_cfi.MergeMethodISOSpecialUseANDFwd
MergeMethodISOSpecialUseANDFwd
Definition: L1MuGMTParameters_cfi.py:34
L1MuGMTParameters_cfi.CDLConfigWordbRPCCSC
CDLConfigWordbRPCCSC
Definition: L1MuGMTParameters_cfi.py:44
l1t::OMDSReader::basicQuery
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
Definition: OMDSReader.cc:75
L1MuGMTParameters_cfi.MergeMethodChargeBrl
MergeMethodChargeBrl
Definition: L1MuGMTParameters_cfi.py:25
L1MuGMTParameters_cfi.HaloOverwritesMatchedBrl
HaloOverwritesMatchedBrl
Definition: L1MuGMTParameters_cfi.py:37
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
L1MuGMTParameters_cfi.EtaPhiThreshold_COU
EtaPhiThreshold_COU
Definition: L1MuGMTParameters_cfi.py:12
L1MuGMTParameters_cfi.EtaWeight_barrel
EtaWeight_barrel
Definition: L1MuGMTParameters_cfi.py:4
L1MuGMTParametersOnlineProducer::checkCMSSWVersion
void checkCMSSWVersion(const coral::AttributeList &configRecord)
Definition: L1MuGMTParametersOnlineProducer.cc:110
L1MuGMTParameters_cfi.EtaPhiThreshold_barrel
EtaPhiThreshold_barrel
Definition: L1MuGMTParameters_cfi.py:6
L1MuGMTParameters_cfi.VersionSortRankEtaQLUT
VersionSortRankEtaQLUT
Definition: L1MuGMTParameters_cfi.py:52
L1MuGMTParameters_cfi.MergeMethodMIPSpecialUseANDFwd
MergeMethodMIPSpecialUseANDFwd
Definition: L1MuGMTParameters_cfi.py:30
L1MuGMTParameters_cfi.HaloOverwritesMatchedFwd
HaloOverwritesMatchedFwd
Definition: L1MuGMTParameters_cfi.py:38
L1MuGMTParameters_cfi.MergeMethodPtFwd
MergeMethodPtFwd
Definition: L1MuGMTParameters_cfi.py:24
L1MuGMTParameters_cfi.MergeMethodMIPSpecialUseANDBrl
MergeMethodMIPSpecialUseANDBrl
Definition: L1MuGMTParameters_cfi.py:29
L1MuGMTParameters
Definition: L1MuGMTParameters.h:25
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
L1MuGMTParameters_cfi.IsolationCellSizePhi
IsolationCellSizePhi
Definition: L1MuGMTParameters_cfi.py:15
L1MuGMTParameters_cfi.DoOvlRpcAnd
DoOvlRpcAnd
Definition: L1MuGMTParameters_cfi.py:16
l1t::OMDSReader::QueryResults::attributeLists
const std::vector< coral::AttributeList > & attributeLists() const
Definition: OMDSReader.h:58
L1MuGMTParameters_cfi.IsolationCellSizeEta
IsolationCellSizeEta
Definition: L1MuGMTParameters_cfi.py:14
L1MuGMTParameters_cfi.PhiWeight_COU
PhiWeight_COU
Definition: L1MuGMTParameters_cfi.py:11