CMS 3D CMS Logo

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

#include <L1TMuonOverlapPhase1ParamsESProducer.h>

Inheritance diagram for L1TMuonOverlapPhase1ParamsESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::shared_ptr< L1TMuonOverlapParamsReturnType
 

Public Member Functions

 L1TMuonOverlapPhase1ParamsESProducer (const edm::ParameterSet &)
 
ReturnType produceParams (const L1TMuonOverlapParamsRcd &)
 
ReturnType producePatterns (const L1TMuonOverlapParamsRcd &)
 
 ~L1TMuonOverlapPhase1ParamsESProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
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)
 

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::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 Member Functions inherited from edm::ESProducer
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 TArg >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &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::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)
 

Detailed Description

Definition at line 17 of file L1TMuonOverlapPhase1ParamsESProducer.h.

Member Typedef Documentation

◆ ReturnType

Definition at line 22 of file L1TMuonOverlapPhase1ParamsESProducer.h.

Constructor & Destructor Documentation

◆ L1TMuonOverlapPhase1ParamsESProducer()

L1TMuonOverlapPhase1ParamsESProducer::L1TMuonOverlapPhase1ParamsESProducer ( const edm::ParameterSet theConfig)

Definition at line 17 of file L1TMuonOverlapPhase1ParamsESProducer.cc.

References edm::ParameterSet::exists(), LaserDQM_cfg::fileNames, MainPageGenerator::fName, contentValuesFiles::fullPath, amcDumpToRaw_cfi::fwVersion, L1TMuonOverlapParams::fwVersion(), edm::ParameterSet::getParameter(), XMLConfigReader::getPatternsVersion(), params, fakeOmtfFwVersion_cff::patternsVersion, produceParams(), readConnectionsXML(), readPatternsXML(), XMLConfigReader::setConfigFile(), L1TMuonOverlapParams::setFwVersion(), XMLConfigReader::setPatternsFiles(), 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 
26  edm::LogVerbatim("OMTFReconstruction") << "L1TMuonOverlapPhase1ParamsESProducer - reading config from file: " << fName
27  << std::endl;
28 
29  if (!theConfig.exists("patternsXMLFiles"))
30  return;
31  std::vector<std::string> fileNames;
32  for (const auto& it : theConfig.getParameter<std::vector<edm::ParameterSet> >("patternsXMLFiles")) {
33  std::string fName = it.getParameter<edm::FileInPath>("patternsXMLFile").fullPath();
34  fileNames.push_back(fName);
35  edm::LogVerbatim("OMTFReconstruction")
36  << "L1TMuonOverlapPhase1ParamsESProducer - reading patterns from file: " << fName << std::endl;
37  }
38 
39  XMLConfigReader myReader;
40  myReader.setConfigFile(fName);
41  readConnectionsXML(myReader);
42 
43  myReader.setPatternsFiles(fileNames);
44  readPatternsXML(myReader);
45 
46  unsigned int patternsVersion = myReader.getPatternsVersion();
47  unsigned int fwVersion = params.fwVersion();
48 
50 }
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void setPatternsFiles(std::vector< std::string > &fNames)
unsigned int getPatternsVersion() const
bool readConnectionsXML(const XMLConfigReader &aReader)
Read Connections from single XML file.
bool exists(std::string const &parameterName) const
checks if a parameter exists
ReturnType produceParams(const L1TMuonOverlapParamsRcd &)
unsigned fwVersion() const
void setConfigFile(const std::string &fName)
void setFwVersion(unsigned fwVersion)

◆ ~L1TMuonOverlapPhase1ParamsESProducer()

L1TMuonOverlapPhase1ParamsESProducer::~L1TMuonOverlapPhase1ParamsESProducer ( )
override

Definition at line 53 of file L1TMuonOverlapPhase1ParamsESProducer.cc.

53 {}

Member Function Documentation

◆ produceParams()

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

Definition at line 88 of file L1TMuonOverlapPhase1ParamsESProducer.cc.

References params.

Referenced by L1TMuonOverlapPhase1ParamsESProducer().

89  {
90  using namespace edm::es;
91 
92  return std::make_shared<L1TMuonOverlapParams>(params);
93 }

◆ producePatterns()

ReturnType L1TMuonOverlapPhase1ParamsESProducer::producePatterns ( const L1TMuonOverlapParamsRcd )

◆ readConnectionsXML()

bool L1TMuonOverlapPhase1ParamsESProducer::readConnectionsXML ( const XMLConfigReader aReader)
private

Read Connections from single XML file.

Definition at line 56 of file L1TMuonOverlapPhase1ParamsESProducer.cc.

References params, and XMLConfigReader::readConfig().

Referenced by L1TMuonOverlapPhase1ParamsESProducer().

56  {
57  aReader.readConfig(&params);
58 
59  return true;
60 }
void readConfig(const std::string fName)

◆ readPatternsXML()

bool L1TMuonOverlapPhase1ParamsESProducer::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 63 of file L1TMuonOverlapPhase1ParamsESProducer.cc.

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

Referenced by L1TMuonOverlapPhase1ParamsESProducer().

63  {
64  l1t::LUT chargeLUT;
67  l1t::LUT meanDistPhiLUT;
68  l1t::LUT selDistPhiShiftLUT;
69  l1t::LUT pdfLUT;
70 
71  std::vector<l1t::LUT*> luts = {&chargeLUT, &etaLUT, &ptLUT, &meanDistPhiLUT, &selDistPhiShiftLUT, &pdfLUT};
72  std::vector<std::string> types = {"iCharge", "iEta", "iPt", "meanDistPhi", "selDistPhiShift", "pdf"};
73 
74  //in the luts we want to have the empty patterns (pt == 0), because it is the way to have the info about the patterns grouping
75  aReader.readLUTs(luts, params, types);
76 
77  params.setChargeLUT(chargeLUT);
80  params.setMeanDistPhiLUT(meanDistPhiLUT);
81  params.setDistPhiShiftLUT(selDistPhiShiftLUT);
82  params.setPdfLUT(pdfLUT);
83 
84  return true;
85 }
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 setDistPhiShiftLUT(const l1t::LUT &lut)
void setPdfLUT(const l1t::LUT &lut)
const uint etaLUT[4082]
Definition: Constants.h:121

Member Data Documentation

◆ params

L1TMuonOverlapParams L1TMuonOverlapPhase1ParamsESProducer::params
private

◆ patterns

L1TMuonOverlapParams L1TMuonOverlapPhase1ParamsESProducer::patterns
private

Definition at line 38 of file L1TMuonOverlapPhase1ParamsESProducer.h.