test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TMuonOverlapParamsESProducer.cc
Go to the documentation of this file.
1 #include "sstream"
2 
3 // user include files
8 
11 
14 
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 }
47 
48  aReader.readConfig(&params);
49 
50  return true;
51 }
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 }
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 }
93 
T getParameter(std::string const &) const
void setMeanDistPhiLUT(const l1t::LUT &lut)
void setEtaLUT(const l1t::LUT &lut)
bool exists(std::string const &parameterName) const
checks if a parameter exists
void setChargeLUT(const l1t::LUT &lut)
ReturnType produceParams(const L1TMuonOverlapParamsRcd &)
void readLUT(l1t::LUT *lut, const L1TMuonOverlapParams &aConfig, const std::string &type)
bool readPatternsXML(XMLConfigReader &aReader)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void setPtLUT(const l1t::LUT &lut)
bool readConnectionsXML(const XMLConfigReader &aReader)
Read Connections from single XML file.
void readConfig(const std::string fName)
void setPatternsFile(const std::string &fName)
void setConfigFile(const std::string &fName)
Definition: LUT.h:29
L1TMuonOverlapParamsESProducer(const edm::ParameterSet &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
boost::shared_ptr< L1TMuonOverlapParams > ReturnType
tuple fileNames
Definition: LaserDQM_cfg.py:34
std::string fullPath() const
Definition: FileInPath.cc:184
void setPdfLUT(const l1t::LUT &lut)