CMS 3D CMS Logo

RPCDBPerformanceHandler.cc
Go to the documentation of this file.
1 #include <memory>
2 
3 // user include files
6 
9 
11 //
12 // class decleration
13 //
15 #include <iostream>
16 #include <fstream>
17 
31 
33 
37 
38 #include <cmath>
39 #include <cmath>
40 #include <fstream>
41 #include <sstream>
42 #include <iostream>
43 #include <cstring>
44 #include <string>
45 #include <vector>
46 #include <cstdlib>
47 #include <utility>
48 #include <map>
49 
50 using namespace edm;
51 
53  : m_since(pset.getUntrackedParameter<int>("firstSince")), dataTag(pset.getParameter<std::string>("tag")) {
55 }
56 
58 
60  std::cout << " - > getNewObjects\n"
61  <<
62  //check whats already inside of database
63  "got offlineInfo" << tagInfo().name << ", size " << tagInfo().size << ", last object valid since "
64  << tagInfo().lastInterval.since << std::endl;
65 
67 
68  std::map<int, std::vector<double> >::iterator itc;
69  for (itc = (theRPCSimSetUp->_clsMap).begin(); itc != (theRPCSimSetUp->_clsMap).end(); ++itc) {
70  for (unsigned int n = 0; n < (itc->second).size(); ++n) {
71  (obj->v_cls).push_back((itc->second)[n]);
72  }
73  }
74 
75  RPCStripNoises::NoiseItem tipoprova;
76 
77  int i = 0;
78  for (std::map<uint32_t, std::vector<float> >::iterator it = (theRPCSimSetUp->_mapDetIdNoise).begin();
80  it++) {
81  tipoprova.dpid = it->first;
82  tipoprova.time = theRPCSimSetUp->getTime(it->first);
83 
84  for (unsigned int k = 0; k < 96; ++k) {
85  tipoprova.noise = ((it->second))[k];
86  tipoprova.eff = (theRPCSimSetUp->getEff(it->first))[k];
87  (obj->v_noises).push_back(tipoprova);
88  }
89 
90  edm::LogError("RPCStripNoisesBuilder") << "[RPCStripNoisesBuilder::analyze] detid already exists" << std::endl;
91 
92  i++;
93  }
94 
95  // prepare for transfer:
96  m_to_transfer.push_back(std::make_pair((RPCStripNoises*)obj, m_since));
97 }
98 
RPCDBSimSetUp::_mapDetIdNoise
std::map< uint32_t, std::vector< float > > _mapDetIdNoise
Definition: RPCDBSimSetUp.h:38
Handle.h
mps_fire.i
i
Definition: mps_fire.py:428
popcon::PopConSourceHandler< RPCStripNoises >::m_to_transfer
OldContainer m_to_transfer
Definition: PopConSourceHandler.h:162
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
ESHandle.h
RPCDBSimSetUp.h
RPCStripNoises::NoiseItem
Definition: RPCStripNoises.h:12
RPCDBSimSetUp::getEff
std::vector< float > getEff(uint32_t id)
Definition: RPCDBSimSetUp.cc:142
edm
HLT enums.
Definition: AlignableModifier.h:19
RandomNumberGenerator.h
gather_cfg.cout
cout
Definition: gather_cfg.py:144
PSimHitContainer.h
RPCStripNoisesRcd.h
EDAnalyzer.h
RPCDBPerformanceHandler::dataTag
std::string dataTag
Definition: RPCDBPerformanceHandler.h:27
RPCDBSimSetUp
Definition: RPCDBSimSetUp.h:22
RPCStripNoises::NoiseItem::eff
float eff
Definition: RPCStripNoises.h:15
cond::TagInfo_t::name
std::string name
Definition: Types.h:72
MakerMacros.h
RPCStripNoises
Definition: RPCStripNoises.h:10
Service.h
RPCDBPerformanceHandler::m_since
unsigned long long m_since
Definition: RPCDBPerformanceHandler.h:26
mps_fire.end
end
Definition: mps_fire.py:242
IdealMagneticFieldRecord.h
RPCDBSimSetUp::getTime
float getTime(uint32_t id)
Definition: RPCDBSimSetUp.cc:147
RPCDBPerformanceHandler::id
std::string id() const override
Definition: RPCDBPerformanceHandler.cc:99
dqmdumpme.k
k
Definition: dqmdumpme.py:60
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
RPCDetId.h
RPCDBSimSetUp::_clsMap
std::map< int, std::vector< double > > _clsMap
Definition: RPCDBSimSetUp.h:41
edm::ParameterSet
Definition: ParameterSet.h:47
popcon::PopConSourceHandler< RPCStripNoises >::tagInfo
cond::TagInfo_t const & tagInfo() const
Definition: PopConSourceHandler.h:78
Event.h
cond::Iov_t::since
Time_t since
Definition: Types.h:53
createfilelist.int
int
Definition: createfilelist.py:10
RPCDBPerformanceHandler::RPCDBPerformanceHandler
RPCDBPerformanceHandler(const edm::ParameterSet &pset)
Definition: RPCDBPerformanceHandler.cc:52
RPCStripNoises::NoiseItem::dpid
int dpid
Definition: RPCStripNoises.h:13
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cond::TagInfo_t::lastInterval
Iov_t lastInterval
Definition: Types.h:73
RPCDBPerformanceHandler.h
std
Definition: JetResolutionObject.h:76
Frameworkfwd.h
RPCStripNoises.h
RPCStripNoises::NoiseItem::noise
float noise
Definition: RPCStripNoises.h:14
EventSetup.h
gctErrorAnalyzer_cfi.dataTag
dataTag
Definition: gctErrorAnalyzer_cfi.py:28
genParticles_cff.map
map
Definition: genParticles_cff.py:11
ParameterSet.h
RPCDBPerformanceHandler::theRPCSimSetUp
RPCDBSimSetUp * theRPCSimSetUp
Definition: RPCDBPerformanceHandler.h:28
MuonGeometryRecord.h
RPCDBPerformanceHandler::getNewObjects
void getNewObjects() override
Definition: RPCDBPerformanceHandler.cc:59
RPCDBPerformanceHandler::~RPCDBPerformanceHandler
~RPCDBPerformanceHandler() override
Definition: RPCDBPerformanceHandler.cc:57
RPCStripNoises::NoiseItem::time
float time
Definition: RPCStripNoises.h:16
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
cond::TagInfo_t::size
size_t size
Definition: Types.h:74
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443