CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
RPCDBPerformanceHandler Class Reference

#include <RPCDBPerformanceHandler.h>

Inheritance diagram for RPCDBPerformanceHandler:
popcon::PopConSourceHandler< RPCStripNoises >

Public Member Functions

void getNewObjects () override
 
std::string id () const override
 
 RPCDBPerformanceHandler (const edm::ParameterSet &pset)
 
 ~RPCDBPerformanceHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< RPCStripNoises >
void initialize (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const
*, std::string const > 
operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Private Attributes

std::string dataTag
 
unsigned long long m_since
 
RPCDBSimSetUptheRPCSimSetUp
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< RPCStripNoises >
typedef std::map< Time_t,
std::shared_ptr
< RPCStripNoises > > 
Container
 
typedef std::unique_ptr
< RPCStripNoises
Ref
 
typedef PopConSourceHandler
< RPCStripNoises
self
 
typedef cond::Time_t Time_t
 
typedef RPCStripNoises value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< RPCStripNoises >
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< RPCStripNoises >
Container m_iovs
 
std::vector< std::pair
< RPCStripNoises *, Time_t > > 
m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 18 of file RPCDBPerformanceHandler.h.

Constructor & Destructor Documentation

RPCDBPerformanceHandler::~RPCDBPerformanceHandler ( )
override

Definition at line 56 of file RPCDBPerformanceHandler.cc.

56 {}
RPCDBPerformanceHandler::RPCDBPerformanceHandler ( const edm::ParameterSet pset)

Definition at line 51 of file RPCDBPerformanceHandler.cc.

References theRPCSimSetUp.

52  : m_since(pset.getUntrackedParameter<int>("firstSince")), dataTag(pset.getParameter<std::string>("tag")) {
53  theRPCSimSetUp = new RPCDBSimSetUp(pset);
54 }
T getUntrackedParameter(std::string const &, T const &) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Function Documentation

void RPCDBPerformanceHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< RPCStripNoises >.

Definition at line 58 of file RPCDBPerformanceHandler.cc.

References RPCDBSimSetUp::_clsMap, RPCDBSimSetUp::_mapDetIdNoise, gather_cfg::cout, RPCStripNoises::NoiseItem::dpid, RPCStripNoises::NoiseItem::eff, dataset::end, RPCDBSimSetUp::getEff(), RPCDBSimSetUp::getTime(), mps_fire::i, isotrackApplyRegressor::k, cond::TagInfo_t::lastInterval, m_since, popcon::PopConSourceHandler< RPCStripNoises >::m_to_transfer, dqmiodumpmetadata::n, cond::TagInfo_t::name, RPCStripNoises::NoiseItem::noise, getGTfromDQMFile::obj, cond::Iov_t::since, cond::TagInfo_t::size, findQualityFiles::size, popcon::PopConSourceHandler< RPCStripNoises >::tagInfo(), theRPCSimSetUp, RPCStripNoises::NoiseItem::time, RPCStripNoises::v_cls, and RPCStripNoises::v_noises.

58  {
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  int i = 0;
77  for (std::map<uint32_t, std::vector<float> >::iterator it = (theRPCSimSetUp->_mapDetIdNoise).begin();
79  it++) {
80  tipoprova.dpid = it->first;
81  tipoprova.time = theRPCSimSetUp->getTime(it->first);
82 
83  for (unsigned int k = 0; k < 96; ++k) {
84  tipoprova.noise = ((it->second))[k];
85  tipoprova.eff = (theRPCSimSetUp->getEff(it->first))[k];
86  (obj->v_noises).push_back(tipoprova);
87  }
88 
89  edm::LogError("RPCStripNoisesBuilder") << "[RPCStripNoisesBuilder::analyze] detid already exists" << std::endl;
90 
91  i++;
92  }
93 
94  // prepare for transfer:
95  m_to_transfer.push_back(std::make_pair((RPCStripNoises*)obj, m_since));
96 }
std::map< int, std::vector< double > > _clsMap
Definition: RPCDBSimSetUp.h:41
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:38
std::vector< std::pair< RPCStripNoises *, Time_t > > m_to_transfer
std::vector< float > getEff(uint32_t id)
float getTime(uint32_t id)
std::vector< float > v_cls
std::vector< NoiseItem > v_noises
string end
Definition: dataset.py:937
tuple cout
Definition: gather_cfg.py:144
tuple size
Write out results.
std::string RPCDBPerformanceHandler::id ( ) const
overridevirtual

Implements popcon::PopConSourceHandler< RPCStripNoises >.

Definition at line 98 of file RPCDBPerformanceHandler.cc.

References dataTag.

98 { return dataTag; }

Member Data Documentation

std::string RPCDBPerformanceHandler::dataTag
private

Definition at line 27 of file RPCDBPerformanceHandler.h.

Referenced by id().

unsigned long long RPCDBPerformanceHandler::m_since
private

Definition at line 26 of file RPCDBPerformanceHandler.h.

Referenced by getNewObjects().

RPCDBSimSetUp* RPCDBPerformanceHandler::theRPCSimSetUp
private

Definition at line 28 of file RPCDBPerformanceHandler.h.

Referenced by getNewObjects(), and RPCDBPerformanceHandler().