CMS 3D CMS Logo

Public Member Functions | Private Attributes

RPCDBPerformanceHandler Class Reference

#include <RPCDBPerformanceHandler.h>

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

List of all members.

Public Member Functions

void getNewObjects ()
std::string id () const
 RPCDBPerformanceHandler (const edm::ParameterSet &pset)
 ~RPCDBPerformanceHandler ()

Private Attributes

std::string dataTag
unsigned long long m_since
RPCDBSimSetUptheRPCSimSetUp

Detailed Description

Definition at line 21 of file RPCDBPerformanceHandler.h.


Constructor & Destructor Documentation

RPCDBPerformanceHandler::~RPCDBPerformanceHandler ( )

Definition at line 58 of file RPCDBPerformanceHandler.cc.

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

Definition at line 52 of file RPCDBPerformanceHandler.cc.

References theRPCSimSetUp.

                                                                            :
  m_since(pset.getUntrackedParameter<int >("firstSince")),
  dataTag(   pset.getParameter<std::string>  (  "tag" ) ){
  theRPCSimSetUp  =  new RPCDBSimSetUp(pset);
}

Member Function Documentation

void RPCDBPerformanceHandler::getNewObjects ( ) [virtual]

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(), i, gen::k, cond::TagInfo::lastInterval, m_since, popcon::PopConSourceHandler< RPCStripNoises >::m_to_transfer, Association::map, n, cond::TagInfo::name, RPCStripNoises::NoiseItem::noise, VarParsing::obj, findQualityFiles::size, cond::TagInfo::size, popcon::PopConSourceHandler< RPCStripNoises >::tagInfo(), theRPCSimSetUp, RPCStripNoises::NoiseItem::time, RPCStripNoises::v_cls, and RPCStripNoises::v_noises.

                                           {

  std::cout << " - > getNewObjects\n" << 
    //check whats already inside of database
    "got offlineInfo"<<
    tagInfo().name << ", size " << tagInfo().size 
            << ", last object valid since " 
            << tagInfo().lastInterval.first << std::endl;

  RPCStripNoises* obj = new RPCStripNoises();

  std::map< int, std::vector<double> >::iterator itc;
  for(itc = (theRPCSimSetUp->_clsMap).begin();itc != (theRPCSimSetUp->_clsMap).end();++itc){
    for(unsigned int n = 0; n < (itc->second).size();++n){
      (obj->v_cls).push_back((itc->second)[n]);
    }
  }

  RPCStripNoises::NoiseItem tipoprova;

  int i = 0;
  for(std::map<uint32_t, std::vector<float> >::iterator it = (theRPCSimSetUp->_mapDetIdNoise).begin(); 
      it != (theRPCSimSetUp->_mapDetIdNoise).end(); it++){

    tipoprova.dpid = it->first;
    tipoprova.time =  theRPCSimSetUp->getTime(it->first);

    for(unsigned int k = 0; k < 96; ++k){

      tipoprova.noise = ((it->second))[k];
      tipoprova.eff = (theRPCSimSetUp->getEff(it->first))[k];
      (obj->v_noises).push_back(tipoprova);
    }
    
    edm::LogError("RPCStripNoisesBuilder")<<"[RPCStripNoisesBuilder::analyze] detid already exists"<<std::endl;
    
    i++;
  }

  // prepare for transfer:
  m_to_transfer.push_back( std::make_pair((RPCStripNoises*)obj,m_since) );
 
}
std::string RPCDBPerformanceHandler::id ( void  ) const [virtual]

Implements popcon::PopConSourceHandler< RPCStripNoises >.

Definition at line 105 of file RPCDBPerformanceHandler.cc.

References dataTag.

                                            {
  return dataTag;
}

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().

Definition at line 32 of file RPCDBPerformanceHandler.h.

Referenced by getNewObjects(), and RPCDBPerformanceHandler().