CMS 3D CMS Logo

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 convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
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 ()
 
void sort ()
 
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::vector< Triplet > Container
 
typedef std::vector< std::pair< RPCStripNoises *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< RPCStripNoisesself
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef RPCStripNoises value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< RPCStripNoises >
int add (value_type *payload, Summary *summary, Time_t time)
 
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< RPCStripNoises >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 18 of file RPCDBPerformanceHandler.h.

Constructor & Destructor Documentation

◆ ~RPCDBPerformanceHandler()

RPCDBPerformanceHandler::~RPCDBPerformanceHandler ( )
override

Definition at line 57 of file RPCDBPerformanceHandler.cc.

57 {}

◆ RPCDBPerformanceHandler()

RPCDBPerformanceHandler::RPCDBPerformanceHandler ( const edm::ParameterSet pset)

Definition at line 52 of file RPCDBPerformanceHandler.cc.

53  : m_since(pset.getUntrackedParameter<int>("firstSince")), dataTag(pset.getParameter<std::string>("tag")) {
55 }

References muonDTDigis_cfi::pset, and theRPCSimSetUp.

Member Function Documentation

◆ getNewObjects()

void RPCDBPerformanceHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< RPCStripNoises >.

Definition at line 59 of file RPCDBPerformanceHandler.cc.

59  {
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 }

References RPCDBSimSetUp::_clsMap, RPCDBSimSetUp::_mapDetIdNoise, gather_cfg::cout, RPCStripNoises::NoiseItem::dpid, RPCStripNoises::NoiseItem::eff, mps_fire::end, RPCDBSimSetUp::getEff(), RPCDBSimSetUp::getTime(), mps_fire::i, dqmdumpme::k, cond::TagInfo_t::lastInterval, m_since, popcon::PopConSourceHandler< RPCStripNoises >::m_to_transfer, genParticles_cff::map, 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, and RPCStripNoises::NoiseItem::time.

◆ id()

std::string RPCDBPerformanceHandler::id ( ) const
overridevirtual

Implements popcon::PopConSourceHandler< RPCStripNoises >.

Definition at line 99 of file RPCDBPerformanceHandler.cc.

99 { return dataTag; }

References dataTag.

Member Data Documentation

◆ dataTag

std::string RPCDBPerformanceHandler::dataTag
private

Definition at line 27 of file RPCDBPerformanceHandler.h.

Referenced by id().

◆ m_since

unsigned long long RPCDBPerformanceHandler::m_since
private

Definition at line 26 of file RPCDBPerformanceHandler.h.

Referenced by getNewObjects().

◆ theRPCSimSetUp

RPCDBSimSetUp* RPCDBPerformanceHandler::theRPCSimSetUp
private

Definition at line 28 of file RPCDBPerformanceHandler.h.

Referenced by getNewObjects(), and RPCDBPerformanceHandler().

RPCDBSimSetUp::_mapDetIdNoise
std::map< uint32_t, std::vector< float > > _mapDetIdNoise
Definition: RPCDBSimSetUp.h:38
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
RPCStripNoises::NoiseItem
Definition: RPCStripNoises.h:12
RPCDBSimSetUp::getEff
std::vector< float > getEff(uint32_t id)
Definition: RPCDBSimSetUp.cc:142
gather_cfg.cout
cout
Definition: gather_cfg.py:144
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
RPCStripNoises
Definition: RPCStripNoises.h:10
RPCDBPerformanceHandler::m_since
unsigned long long m_since
Definition: RPCDBPerformanceHandler.h:26
mps_fire.end
end
Definition: mps_fire.py:242
RPCDBSimSetUp::getTime
float getTime(uint32_t id)
Definition: RPCDBSimSetUp.cc:147
dqmdumpme.k
k
Definition: dqmdumpme.py:60
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RPCDBSimSetUp::_clsMap
std::map< int, std::vector< double > > _clsMap
Definition: RPCDBSimSetUp.h:41
popcon::PopConSourceHandler< RPCStripNoises >::tagInfo
cond::TagInfo_t const & tagInfo() const
Definition: PopConSourceHandler.h:78
cond::Iov_t::since
Time_t since
Definition: Types.h:53
RPCStripNoises::NoiseItem::dpid
int dpid
Definition: RPCStripNoises.h:13
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
cond::TagInfo_t::lastInterval
Iov_t lastInterval
Definition: Types.h:73
RPCStripNoises::NoiseItem::noise
float noise
Definition: RPCStripNoises.h:14
genParticles_cff.map
map
Definition: genParticles_cff.py:11
RPCDBPerformanceHandler::theRPCSimSetUp
RPCDBSimSetUp * theRPCSimSetUp
Definition: RPCDBPerformanceHandler.h:28
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