CMS 3D CMS Logo

SiStripLorentzAngleReader.cc
Go to the documentation of this file.
3 
5 
6 #include <iostream>
7 #include <cstdio>
8 #include <sys/time.h>
9 
10 
11 using namespace cms;
12 
14  printdebug_(iConfig.getUntrackedParameter<uint32_t>("printDebug",5)),
15  label_(iConfig.getUntrackedParameter<std::string>("label","")){}
17 
19 
20  edm::ESHandle<SiStripLorentzAngle> SiStripLorentzAngle_;
21  iSetup.get<SiStripLorentzAngleRcd>().get(label_,SiStripLorentzAngle_);
22  edm::LogInfo("SiStripLorentzAngleReader") << "[SiStripLorentzAngleReader::analyze] End Reading SiStripLorentzAngle with label " << label_<< std::endl;
23 
24  std::map<unsigned int,float> detid_la= SiStripLorentzAngle_->getLorentzAngles();
25  std::map<unsigned int,float>::const_iterator it;
26  size_t count=0;
27  for (it=detid_la.begin();it!=detid_la.end() && count<printdebug_;it++)
28  {
29  edm::LogInfo("SiStripLorentzAngleReader") << "detid " << it->first << " \t"
30  << " Lorentz angle " << it->second;
31  count++;
32  }
33 }
34 
const std::map< unsigned int, float > & getLorentzAngles() const
void analyze(const edm::Event &, const edm::EventSetup &) override
const T & get() const
Definition: EventSetup.h:55
SiStripLorentzAngleReader(const edm::ParameterSet &)