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 21 of file RPCDBPerformanceHandler.h.

Constructor & Destructor Documentation

RPCDBPerformanceHandler::~RPCDBPerformanceHandler ( )
override

Definition at line 58 of file RPCDBPerformanceHandler.cc.

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

Definition at line 52 of file RPCDBPerformanceHandler.cc.

References theRPCSimSetUp.

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

Member Function Documentation

void RPCDBPerformanceHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< RPCStripNoises >.

Definition at line 61 of file RPCDBPerformanceHandler.cc.

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

61  {
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 }
size
Write out results.
size_t size
Definition: Types.h:77
std::string name
Definition: Types.h:73
cond::ValidityInterval lastInterval
Definition: Types.h:75
std::map< uint32_t, std::vector< float > > _mapDetIdNoise
Definition: RPCDBSimSetUp.h:40
std::map< int, std::vector< double > > _clsMap
Definition: RPCDBSimSetUp.h:43
#define end
Definition: vmac.h:39
std::vector< float > getEff(uint32_t id)
float getTime(uint32_t id)
int k[5][pyjets_maxn]
std::vector< float > v_cls
std::vector< NoiseItem > v_noises
std::string RPCDBPerformanceHandler::id ( ) const
overridevirtual

Implements popcon::PopConSourceHandler< RPCStripNoises >.

Definition at line 105 of file RPCDBPerformanceHandler.cc.

References dataTag.

105  {
106  return dataTag;
107 }

Member Data Documentation

std::string RPCDBPerformanceHandler::dataTag
private

Definition at line 31 of file RPCDBPerformanceHandler.h.

Referenced by id().

unsigned long long RPCDBPerformanceHandler::m_since
private

Definition at line 30 of file RPCDBPerformanceHandler.h.

Referenced by getNewObjects().

RPCDBSimSetUp* RPCDBPerformanceHandler::theRPCSimSetUp
private

Definition at line 32 of file RPCDBPerformanceHandler.h.

Referenced by getNewObjects(), and RPCDBPerformanceHandler().