CMS 3D CMS Logo

RPCStripNoisesRcdRead.cc
Go to the documentation of this file.
1 #include <string>
2 #include <map>
3 #include <vector>
4 
14 
16 public:
18  ~RPCStripNoisesRcdRead() override;
19  void analyze(const edm::Event& evt, const edm::EventSetup& evtSetup) override;
20 };
21 
23 
25 
26 void RPCStripNoisesRcdRead::analyze(const edm::Event& evt, const edm::EventSetup& evtSetup) {
28  evtSetup.get<RPCStripNoisesRcd>().get(noiseRcd);
29  edm::LogInfo("RPCStripNoisesReader") << "[RPCStripNoisesReader::analyze] End Reading RPCStripNoises" << std::endl;
30 
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
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
RPCStripNoisesRcdRead(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::vector< NoiseItem > const & getVNoise() const
std::vector< float > const & getCls() const
T get() const
Definition: EventSetup.h:73