test
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 produceParams (const L1TMuonOverlapParamsRcd &)
 
ReturnType producePatterns (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 (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 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.

Definition at line 17 of file L1TMuonOverlapParamsESProducer.cc.

References edm::ParameterSet::exists(), LaserDQM_cfg::fileNames, MainPageGenerator::fName, contentValuesFiles::fullPath, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), produceParams(), 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
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  XMLConfigReader myReader;
33  myReader.setConfigFile(fName);
34  readConnectionsXML(myReader);
35 
36  for(auto it: fileNames){
37  myReader.setPatternsFile(it);
38  readPatternsXML(myReader);
39  }
40 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
ReturnType produceParams(const L1TMuonOverlapParamsRcd &)
bool readPatternsXML(XMLConfigReader &aReader)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
bool readConnectionsXML(const XMLConfigReader &aReader)
Read Connections from single XML file.
void setPatternsFile(const std::string &fName)
void setConfigFile(const std::string &fName)
tuple fileNames
Definition: LaserDQM_cfg.py:34
std::string fullPath() const
Definition: FileInPath.cc:184
L1TMuonOverlapParamsESProducer::~L1TMuonOverlapParamsESProducer ( )

Definition at line 43 of file L1TMuonOverlapParamsESProducer.cc.

43 {}

Member Function Documentation

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

Definition at line 81 of file L1TMuonOverlapParamsESProducer.cc.

References params.

Referenced by L1TMuonOverlapParamsESProducer().

82 {
83  using namespace edm::es;
84  boost::shared_ptr<L1TMuonOverlapParams> aL1TMTFOverlapParams;
85 
86  aL1TMTFOverlapParams = boost::shared_ptr<L1TMuonOverlapParams>(new L1TMuonOverlapParams(params));
87  return aL1TMTFOverlapParams;
88 }
ReturnType L1TMuonOverlapParamsESProducer::producePatterns ( const L1TMuonOverlapParamsRcd )
bool L1TMuonOverlapParamsESProducer::readConnectionsXML ( const XMLConfigReader aReader)
private

Read Connections from single XML file.

Definition at line 46 of file L1TMuonOverlapParamsESProducer.cc.

References params, and XMLConfigReader::readConfig().

Referenced by L1TMuonOverlapParamsESProducer().

46  {
47 
48  aReader.readConfig(&params);
49 
50  return true;
51 }
void readConfig(const std::string fName)
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 54 of file L1TMuonOverlapParamsESProducer.cc.

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

Referenced by L1TMuonOverlapParamsESProducer().

54  {
55 
56  l1t::LUT chargeLUT;
57  aReader.readLUT(&chargeLUT,params,"iCharge");
58  params.setChargeLUT(chargeLUT);
59 
60  l1t::LUT etaLUT;
61  aReader.readLUT(&etaLUT,params, "iEta");
62  params.setEtaLUT(etaLUT);
63 
64  l1t::LUT ptLUT;
65  aReader.readLUT(&ptLUT,params, "iPt");
66  params.setPtLUT(ptLUT);
67 
68  l1t::LUT meanDistPhiLUT;
69  aReader.readLUT(&meanDistPhiLUT,params, "meanDistPhi");
70  params.setMeanDistPhiLUT(meanDistPhiLUT);
71 
72  l1t::LUT pdfLUT;
73  aReader.readLUT(&pdfLUT,params, "pdf");
74  params.setPdfLUT(pdfLUT);
75 
76  return true;
77 }
void setMeanDistPhiLUT(const l1t::LUT &lut)
void setEtaLUT(const l1t::LUT &lut)
void setChargeLUT(const l1t::LUT &lut)
void readLUT(l1t::LUT *lut, const L1TMuonOverlapParams &aConfig, const std::string &type)
void setPtLUT(const l1t::LUT &lut)
Definition: LUT.h:29
void setPdfLUT(const l1t::LUT &lut)

Member Data Documentation

L1TMuonOverlapParams L1TMuonOverlapParamsESProducer::params
private
L1TMuonOverlapParams L1TMuonOverlapParamsESProducer::patterns
private

Definition at line 39 of file L1TMuonOverlapParamsESProducer.h.