CMS 3D CMS Logo

RPCDBPerformanceHandler.cc
Go to the documentation of this file.
1 #include <memory>
2 
3 // user include files
5 
8 
10 //
11 // class decleration
12 //
14 #include <iostream>
15 #include <fstream>
16 
30 
32 
36 
37 #include <cmath>
38 #include <cmath>
39 #include <fstream>
40 #include <sstream>
41 #include <iostream>
42 #include <cstring>
43 #include <string>
44 #include <vector>
45 #include <cstdlib>
46 #include <utility>
47 #include <map>
48 
49 using namespace edm;
50 
52  : m_since(pset.getUntrackedParameter<int>("firstSince")), dataTag(pset.getParameter<std::string>("tag")) {
54 }
55 
57 
59  std::cout << " - > getNewObjects\n"
60  <<
61  //check whats already inside of database
62  "got offlineInfo" << tagInfo().name << ", size " << tagInfo().size << ", last object valid since "
63  << tagInfo().lastInterval.since << std::endl;
64 
66 
67  std::map<int, std::vector<double> >::iterator itc;
68  for (itc = (theRPCSimSetUp->_clsMap).begin(); itc != (theRPCSimSetUp->_clsMap).end(); ++itc) {
69  for (unsigned int n = 0; n < (itc->second).size(); ++n) {
70  (obj->v_cls).push_back((itc->second)[n]);
71  }
72  }
73 
74  RPCStripNoises::NoiseItem tipoprova;
75 
76  for (std::map<uint32_t, std::vector<float> >::iterator it = (theRPCSimSetUp->_mapDetIdNoise).begin();
78  it++) {
79  tipoprova.dpid = it->first;
80  tipoprova.time = theRPCSimSetUp->getTime(it->first);
81 
82  for (unsigned int k = 0; k < 96; ++k) {
83  tipoprova.noise = ((it->second))[k];
84  tipoprova.eff = (theRPCSimSetUp->getEff(it->first))[k];
85  (obj->v_noises).push_back(tipoprova);
86  }
87 
88  edm::LogError("RPCStripNoisesBuilder") << "[RPCStripNoisesBuilder::analyze] detid already exists" << std::endl;
89  }
90 
91  // prepare for transfer:
92  m_to_transfer.push_back(std::make_pair((RPCStripNoises*)obj, m_since));
93 }
94 
size
Write out results.
std::map< int, std::vector< double > > _clsMap
Definition: RPCDBSimSetUp.h:40
Iov_t lastInterval
Definition: Types.h:73
Time_t since
Definition: Types.h:53
size_t size
Definition: Types.h:74
Log< level::Error, false > LogError
std::string name
Definition: Types.h:72
std::map< uint32_t, std::vector< float > > _mapDetIdNoise
Definition: RPCDBSimSetUp.h:37
RPCDBPerformanceHandler(const edm::ParameterSet &pset)
std::vector< std::pair< RPCStripNoises *, Time_t > > m_to_transfer
std::string id() const override
std::vector< float > getEff(uint32_t id)
float getTime(uint32_t id)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
HLT enums.