CMS 3D CMS Logo

RPCStripNoisesRcdRead.cc
Go to the documentation of this file.
1 #include <string>
2 #include <map>
3 #include <vector>
4 
13 
15 public:
17  ~RPCStripNoisesRcdRead() override;
18  void analyze(const edm::Event& evt, const edm::EventSetup& evtSetup) override;
19 
20 private:
22 };
23 
25 
27 
28 void RPCStripNoisesRcdRead::analyze(const edm::Event& evt, const edm::EventSetup& evtSetup) {
29  const RPCStripNoises* noiseRcd = &evtSetup.getData(noise_RcdToken_);
30  edm::LogInfo("RPCStripNoisesReader") << "[RPCStripNoisesReader::analyze] End Reading RPCStripNoises" << std::endl;
31  std::vector<RPCStripNoises::NoiseItem> vnoise = noiseRcd->getVNoise();
32  std::vector<float> vcls = noiseRcd->getCls();
33 
34  for (unsigned int n = 0; n < vcls.size(); ++n) {
35  std::cout << "Cls Value: " << vcls[n] << std::endl;
36  }
37 
38  int i = 1;
39  for (std::vector<RPCStripNoises::NoiseItem>::iterator it = vnoise.begin(); it != vnoise.end(); ++it) {
40  if (i % 96 == 0)
41  std::cout << "DetId: " << it->dpid << " " << it->time << " " << std::endl;
42  std::cout << " Noise Value: " << (it->noise) << " " << (it->eff) << std::endl;
43  i++;
44  }
45 }
46 
47 //define this as a plug-in
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
std::vector< NoiseItem > const & getVNoise() const
RPCStripNoisesRcdRead(const edm::ParameterSet &iConfig)
std::vector< float > const & getCls() const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool getData(T &iHolder) const
Definition: EventSetup.h:122
Log< level::Info, false > LogInfo
edm::ESGetToken< RPCStripNoises, RPCStripNoisesRcd > noise_RcdToken_