CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef boost::shared_ptr
< L1TMuonOverlapParams
ReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey,
edm::propagate_const
< std::shared_ptr< DataProxy > > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

 L1TMuonOverlapParamsESProducer (const edm::ParameterSet &)
 
ReturnType produce (const L1TMuonOverlapParamsRcd &)
 
 ~L1TMuonOverlapParamsESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Private Member Functions

bool readConnectionsXML (XMLConfigReader *aReader)
 Read Connections from single XML file. More...
 
bool readPatternsXML (XMLConfigReader *aReader)
 Read Golden Patters from single XML file. More...
 

Private Attributes

L1TMuonOverlapParams m_params
 
OMTFConfigurationmyOMTFConfig
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 16 of file L1TMuonOverlapParamsESProducer.h.

Member Typedef Documentation

Definition at line 22 of file L1TMuonOverlapParamsESProducer.h.

Constructor & Destructor Documentation

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

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

Have to fill OMTFConfiguration data to be able to read the Golden Patterns file, as there are some consistency checks during XML parsing.

Definition at line 17 of file L1TMuonOverlapParamsESProducer.cc.

References OMTFConfiguration::configure(), edm::ParameterSet::exists(), LaserDQM_cfg::fileNames, MainPageGenerator::fName, contentValuesFiles::fullPath, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), m_params, myOMTFConfig, readConnectionsXML(), readPatternsXML(), XMLConfigReader::setConfigFile(), 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
20  setWhatProduced(this);
21 
22  if (!theConfig.exists("configXMLFile") ) return;
23  std::string fName = theConfig.getParameter<edm::FileInPath>("configXMLFile").fullPath();
24 
26  if ( !theConfig.exists("patternsXMLFiles") ) return;
27  std::vector<std::string> fileNames;
28  for(auto it: theConfig.getParameter<std::vector<edm::ParameterSet> >("patternsXMLFiles")){
29  fileNames.push_back(it.getParameter<edm::FileInPath>("patternsXMLFile").fullPath());
30  }
31 
32 
33  XMLConfigReader myReader;
34  myReader.setConfigFile(fName);
35  readConnectionsXML(&myReader);
36 
39  myOMTFConfig = new OMTFConfiguration(theConfig);
40  std::shared_ptr<L1TMuonOverlapParams> aL1TMTFOverlapParams = std::shared_ptr<L1TMuonOverlapParams>(new L1TMuonOverlapParams(m_params));
41  myOMTFConfig->configure(aL1TMTFOverlapParams);
42 
43  for(auto it: fileNames){
44  myReader.setPatternsFile(it);
45  readPatternsXML(&myReader);
46  }
47 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void configure(XMLConfigReader *aReader)
void setPatternsFile(const std::string &fName)
void setConfigFile(const std::string &fName)
bool readConnectionsXML(XMLConfigReader *aReader)
Read Connections from single XML file.
tuple fileNames
Definition: LaserDQM_cfg.py:34
std::string fullPath() const
Definition: FileInPath.cc:184
bool readPatternsXML(XMLConfigReader *aReader)
Read Golden Patters from single XML file.
L1TMuonOverlapParamsESProducer::~L1TMuonOverlapParamsESProducer ( )

Definition at line 50 of file L1TMuonOverlapParamsESProducer.cc.

50 {}

Member Function Documentation

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

Definition at line 89 of file L1TMuonOverlapParamsESProducer.cc.

References m_params.

90 {
91  using namespace edm::es;
92  boost::shared_ptr<L1TMuonOverlapParams> aL1TMTFOverlapParams;
93 
94  aL1TMTFOverlapParams = boost::shared_ptr<L1TMuonOverlapParams>(new L1TMuonOverlapParams(m_params));
95  return aL1TMTFOverlapParams;
96 }
bool L1TMuonOverlapParamsESProducer::readConnectionsXML ( XMLConfigReader aReader)
private

Read Connections from single XML file.

Definition at line 53 of file L1TMuonOverlapParamsESProducer.cc.

References m_params, and XMLConfigReader::readConfig().

Referenced by L1TMuonOverlapParamsESProducer().

53  {
54 
55  aReader->readConfig(&m_params);
56 
57  return true;
58 
59 }
void readConfig(const std::string fName)
bool L1TMuonOverlapParamsESProducer::readPatternsXML ( XMLConfigReader aReader)
private

Read Golden Patters from single XML file.

Definition at line 62 of file L1TMuonOverlapParamsESProducer.cc.

References m_params, XMLConfigReader::readLUT(), L1TMuonOverlapParams::setChargeLUT(), L1TMuonOverlapParams::setEtaLUT(), L1TMuonOverlapParams::setMeanDistPhiLUT(), L1TMuonOverlapParams::setPdfLUT(), and L1TMuonOverlapParams::setPtLUT().

Referenced by L1TMuonOverlapParamsESProducer().

62  {
63 
64  l1t::LUT chargeLUT;
65  aReader->readLUT(&chargeLUT,"iCharge");
66  m_params.setChargeLUT(chargeLUT);
67 
68  l1t::LUT etaLUT;
69  aReader->readLUT(&etaLUT,"iEta");
70  m_params.setEtaLUT(etaLUT);
71 
72  l1t::LUT ptLUT;
73  aReader->readLUT(&ptLUT,"iPt");
74  m_params.setPtLUT(ptLUT);
75 
76  l1t::LUT meanDistPhiLUT;
77  aReader->readLUT(&meanDistPhiLUT,"meanDistPhi");
78  m_params.setMeanDistPhiLUT(meanDistPhiLUT);
79 
80  l1t::LUT pdfLUT;
81  aReader->readLUT(&pdfLUT,"pdf");
82  m_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 setPtLUT(const l1t::LUT &lut)
void readLUT(l1t::LUT *lut, const std::string &type)
Definition: LUT.h:29
void setPdfLUT(const l1t::LUT &lut)

Member Data Documentation

L1TMuonOverlapParams L1TMuonOverlapParamsESProducer::m_params
private
OMTFConfiguration* L1TMuonOverlapParamsESProducer::myOMTFConfig
private

Definition at line 36 of file L1TMuonOverlapParamsESProducer.h.

Referenced by L1TMuonOverlapParamsESProducer().