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 using namespace cms;
11 
13  : printdebug_(iConfig.getUntrackedParameter<uint32_t>("printDebug", 5)),
14  label_(iConfig.getUntrackedParameter<std::string>("label", "")) {}
16 
18  edm::ESHandle<SiStripLorentzAngle> SiStripLorentzAngle_;
19  iSetup.get<SiStripLorentzAngleRcd>().get(label_, SiStripLorentzAngle_);
20  edm::LogInfo("SiStripLorentzAngleReader")
21  << "[SiStripLorentzAngleReader::analyze] End Reading SiStripLorentzAngle with label " << label_ << std::endl;
22 
23  std::map<unsigned int, float> detid_la = SiStripLorentzAngle_->getLorentzAngles();
24  std::map<unsigned int, float>::const_iterator it;
25  size_t count = 0;
26  for (it = detid_la.begin(); it != detid_la.end() && count < printdebug_; it++) {
27  edm::LogInfo("SiStripLorentzAngleReader") << "detid " << it->first << " \t"
28  << " Lorentz angle " << it->second;
29  count++;
30  }
31 }
const std::map< unsigned int, float > & getLorentzAngles() const
void analyze(const edm::Event &, const edm::EventSetup &) override
Namespace of DDCMS conversion namespace.
T get() const
Definition: EventSetup.h:73
SiStripLorentzAngleReader(const edm::ParameterSet &)