CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <math.h>
40 #include <fstream>
41 #include <sstream>
42 #include <iostream>
43 #include<cstring>
44 #include<string>
45 #include<vector>
46 #include<stdlib.h>
47 #include <utility>
48 #include <map>
49 
50 using namespace edm;
51 
53  m_since(pset.getUntrackedParameter<int >("firstSince")),
54  dataTag( pset.getParameter<std::string> ( "tag" ) ){
55  theRPCSimSetUp = new RPCDBSimSetUp(pset);
56 }
57 
59 
60 
62 
63  std::cout << " - > getNewObjects\n" <<
64  //check whats already inside of database
65  "got offlineInfo"<<
66  tagInfo().name << ", size " << tagInfo().size
67  << ", last object valid since "
68  << tagInfo().lastInterval.first << std::endl;
69 
71 
72  std::map< int, std::vector<double> >::iterator itc;
73  for(itc = (theRPCSimSetUp->_clsMap).begin();itc != (theRPCSimSetUp->_clsMap).end();++itc){
74  for(unsigned int n = 0; n < (itc->second).size();++n){
75  (obj->v_cls).push_back((itc->second)[n]);
76  }
77  }
78 
79  RPCStripNoises::NoiseItem tipoprova;
80 
81  int i = 0;
82  for(std::map<uint32_t, std::vector<float> >::iterator it = (theRPCSimSetUp->_mapDetIdNoise).begin();
83  it != (theRPCSimSetUp->_mapDetIdNoise).end(); it++){
84 
85  tipoprova.dpid = it->first;
86  tipoprova.time = theRPCSimSetUp->getTime(it->first);
87 
88  for(unsigned int k = 0; k < 96; ++k){
89 
90  tipoprova.noise = ((it->second))[k];
91  tipoprova.eff = (theRPCSimSetUp->getEff(it->first))[k];
92  (obj->v_noises).push_back(tipoprova);
93  }
94 
95  edm::LogError("RPCStripNoisesBuilder")<<"[RPCStripNoisesBuilder::analyze] detid already exists"<<std::endl;
96 
97  i++;
98  }
99 
100  // prepare for transfer:
101  m_to_transfer.push_back( std::make_pair((RPCStripNoises*)obj,m_since) );
102 
103 }
104 
105 std::string RPCDBPerformanceHandler::id() const {
106  return dataTag;
107 }
108 
109 
110 
111 
112 
int i
Definition: DBlmapReader.cc:9
dictionary map
Definition: Association.py:205
std::string name
Definition: TagInfo.h:9
std::map< uint32_t, std::vector< float > > _mapDetIdNoise
Definition: RPCDBSimSetUp.h:40
RPCDBPerformanceHandler(const edm::ParameterSet &pset)
std::map< int, std::vector< double > > _clsMap
Definition: RPCDBSimSetUp.h:43
#define end
Definition: vmac.h:38
std::vector< float > getEff(uint32_t id)
size_t size
Definition: TagInfo.h:13
float getTime(uint32_t id)
int k[5][pyjets_maxn]
std::vector< float > v_cls
std::vector< NoiseItem > v_noises
cond::ValidityInterval lastInterval
Definition: TagInfo.h:11
tuple cout
Definition: gather_cfg.py:121
tuple size
Write out results.