CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
L1TMuonOverlapParamsESProducer Class Reference

#include <L1TMuonOverlapParamsESProducer.h>

Inheritance diagram for L1TMuonOverlapParamsESProducer:
edm::ESProducer edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Types

using ReturnType = std::unique_ptr< L1TMuonOverlapParams >
 

Public Member Functions

 L1TMuonOverlapParamsESProducer (const edm::ParameterSet &)
 
ReturnType produceParams (const L1TMuonOverlapParamsRcd &)
 
ReturnType producePatterns (const L1TMuonOverlapParamsRcd &)
 
 ~L1TMuonOverlapParamsESProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 

Private Member Functions

bool readConnectionsXML (const XMLConfigReader &aReader)
 Read Connections from single XML file. More...
 
bool readPatternsXML (XMLConfigReader &aReader)
 

Private Attributes

L1TMuonOverlapParams params
 
L1TMuonOverlapParams patterns
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *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 TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProductResolverFactoryProducer
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::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 16 of file L1TMuonOverlapParamsESProducer.h.

Member Typedef Documentation

◆ ReturnType

Definition at line 21 of file L1TMuonOverlapParamsESProducer.h.

Constructor & Destructor Documentation

◆ L1TMuonOverlapParamsESProducer()

L1TMuonOverlapParamsESProducer::L1TMuonOverlapParamsESProducer ( const edm::ParameterSet theConfig)

WARNING: filling the CondFormats objects works only for a single XML patterns file.

Definition at line 17 of file L1TMuonOverlapParamsESProducer.cc.

References edm::ParameterSet::exists(), LaserDQM_cfg::fileNames, fileCollector2::fName, contentValuesFiles::fullPath, edm::FileInPath::fullPath(), amcDumpToRaw_cfi::fwVersion, L1TMuonOverlapParams::fwVersion(), edm::ParameterSet::getParameter(), XMLConfigReader::getPatternsVersion(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, params, fakeOmtfFwVersion_cff::patternsVersion, produceParams(), readConnectionsXML(), readPatternsXML(), XMLConfigReader::setConfigFile(), L1TMuonOverlapParams::setFwVersion(), XMLConfigReader::setPatternsFile(), edm::ESProducer::setWhatProduced(), and AlCaHLTBitMon_QueryRunRegistry::string.

17  {
18  //the following line is needed to tell the framework what
19  // data is being produced
21 
22  if (!theConfig.exists("configXMLFile"))
23  return;
24  std::string fName = theConfig.getParameter<edm::FileInPath>("configXMLFile").fullPath();
25 
27  if (!theConfig.exists("patternsXMLFiles"))
28  return;
29  std::vector<std::string> fileNames;
30  for (const auto& it : theConfig.getParameter<std::vector<edm::ParameterSet> >("patternsXMLFiles")) {
31  fileNames.push_back(it.getParameter<edm::FileInPath>("patternsXMLFile").fullPath());
32  }
33 
34  XMLConfigReader myReader;
35  myReader.setConfigFile(fName);
36  readConnectionsXML(myReader);
37 
38  for (const auto& it : fileNames) {
39  myReader.setPatternsFile(it);
40  readPatternsXML(myReader);
41  }
42 
43  unsigned int patternsVersion = myReader.getPatternsVersion();
44  unsigned int fwVersion = params.fwVersion();
45 
47 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::string fullPath() const
Definition: FileInPath.cc:161
unsigned int getPatternsVersion() const
bool exists(std::string const &parameterName) const
checks if a parameter exists
ReturnType produceParams(const L1TMuonOverlapParamsRcd &)
bool readPatternsXML(XMLConfigReader &aReader)
bool readConnectionsXML(const XMLConfigReader &aReader)
Read Connections from single XML file.
unsigned fwVersion() const
void setPatternsFile(const std::string &fName)
void setConfigFile(const std::string &fName)
void setFwVersion(unsigned fwVersion)

◆ ~L1TMuonOverlapParamsESProducer()

L1TMuonOverlapParamsESProducer::~L1TMuonOverlapParamsESProducer ( )
override

Definition at line 50 of file L1TMuonOverlapParamsESProducer.cc.

50 {}

Member Function Documentation

◆ produceParams()

L1TMuonOverlapParamsESProducer::ReturnType L1TMuonOverlapParamsESProducer::produceParams ( const L1TMuonOverlapParamsRcd iRecord)

Definition at line 81 of file L1TMuonOverlapParamsESProducer.cc.

References params.

Referenced by L1TMuonOverlapParamsESProducer().

82  {
83  return std::make_unique<L1TMuonOverlapParams>(params);
84 }

◆ producePatterns()

ReturnType L1TMuonOverlapParamsESProducer::producePatterns ( const L1TMuonOverlapParamsRcd )

◆ readConnectionsXML()

bool L1TMuonOverlapParamsESProducer::readConnectionsXML ( const XMLConfigReader aReader)
private

Read Connections from single XML file.

Definition at line 53 of file L1TMuonOverlapParamsESProducer.cc.

References params, and XMLConfigReader::readConfig().

Referenced by L1TMuonOverlapParamsESProducer().

53  {
54  aReader.readConfig(&params);
55 
56  return true;
57 }
void readConfig(const std::string fName)

◆ readPatternsXML()

bool L1TMuonOverlapParamsESProducer::readPatternsXML ( XMLConfigReader aReader)
private

Read Golden Patters from single XML file. XMLConfigReader state is modified, as it hold cache of the Golden Patters read from XML file.

Definition at line 60 of file L1TMuonOverlapParamsESProducer.cc.

References Phase2L1GMT::etaLUT, params, Phase2L1GMT::ptLUT, XMLConfigReader::readLUTs(), L1TMuonOverlapParams::setChargeLUT(), L1TMuonOverlapParams::setEtaLUT(), L1TMuonOverlapParams::setMeanDistPhiLUT(), L1TMuonOverlapParams::setPdfLUT(), and L1TMuonOverlapParams::setPtLUT().

Referenced by L1TMuonOverlapParamsESProducer().

60  {
61  l1t::LUT chargeLUT;
64  l1t::LUT meanDistPhiLUT;
65  l1t::LUT pdfLUT;
66 
67  std::vector<l1t::LUT*> luts = {&chargeLUT, &etaLUT, &ptLUT, &meanDistPhiLUT, &pdfLUT};
68  std::vector<std::string> types = {"iCharge", "iEta", "iPt", "meanDistPhi", "pdf"};
69  aReader.readLUTs(luts, params, types);
70 
71  params.setChargeLUT(chargeLUT);
74  params.setMeanDistPhiLUT(meanDistPhiLUT);
75  params.setPdfLUT(pdfLUT);
76 
77  return true;
78 }
void setMeanDistPhiLUT(const l1t::LUT &lut)
void setEtaLUT(const l1t::LUT &lut)
void setChargeLUT(const l1t::LUT &lut)
void readLUTs(std::vector< l1t::LUT *> luts, const L1TMuonOverlapParams &aConfig, const std::vector< std::string > &types)
void setPtLUT(const l1t::LUT &lut)
Definition: LUT.h:29
const ap_uint< BITSPT > ptLUT[1858]
Definition: Constants.h:18
void setPdfLUT(const l1t::LUT &lut)
const uint etaLUT[4082]
Definition: Constants.h:121

Member Data Documentation

◆ params

L1TMuonOverlapParams L1TMuonOverlapParamsESProducer::params
private

◆ patterns

L1TMuonOverlapParams L1TMuonOverlapParamsESProducer::patterns
private

Definition at line 37 of file L1TMuonOverlapParamsESProducer.h.