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
RPCStripNoises::getVNoise
std::vector< NoiseItem > const & getVNoise() const
Definition: RPCStripNoises.h:24
mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
ESHandle.h
RPCDBSimSetUp.h
RPCStripNoisesRcdRead::analyze
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
Definition: RPCStripNoisesRcdRead.cc:26
RPCStripNoisesRcd
Definition: RPCStripNoisesRcd.h:24
gather_cfg.cout
cout
Definition: gather_cfg.py:144
RPCStripNoisesRcd.h
EDAnalyzer.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MakerMacros.h
RPCStripNoisesRcdRead
Definition: RPCStripNoisesRcdRead.cc:15
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ESHandle
Definition: DTSurvey.h:22
RPCDetId.h
RPCStripNoises::getCls
std::vector< float > const & getCls() const
Definition: RPCStripNoises.h:25
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
RPCStripNoisesRcdRead::~RPCStripNoisesRcdRead
~RPCStripNoisesRcdRead() override
Definition: RPCStripNoisesRcdRead.cc:24
RPCStripNoises.h
EventSetup.h
edm::Event
Definition: Event.h:73
RPCStripNoisesRcdRead::RPCStripNoisesRcdRead
RPCStripNoisesRcdRead(const edm::ParameterSet &iConfig)
Definition: RPCStripNoisesRcdRead.cc:22