Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-31 22:35:52

0001 #include "DQM/RPCMonitorClient/interface/RPCDBHandler.h"
0002 #include "CondCore/CondDB/interface/Types.h"
0003 #include "CondFormats/DataRecord/interface/RPCDQMObjectRcd.h"
0004 
0005 RPCDBHandler::RPCDBHandler(const edm::ParameterSet& iConfig)
0006     : m_name(iConfig.getUntrackedParameter<std::string>("name", "RPCDBHandler")),
0007       sinceTime(iConfig.getUntrackedParameter<unsigned>("IOVRun", 0)) {}
0008 
0009 void RPCDBHandler::getNewObjects() {
0010   cond::Time_t myTime = sinceTime;
0011 
0012   //  std::cout << "sinceTime= " << myTime << std::endl;
0013 
0014   size_t n_empty_run = 0;
0015   if (tagInfo().size > 0 && (tagInfo().lastInterval.since + 1) < myTime) {
0016     n_empty_run = myTime - tagInfo().lastInterval.since - 1;
0017   }
0018 
0019   if (n_empty_run != 0) {
0020     RPCDQMObject* r = new RPCDQMObject();
0021     m_to_transfer.push_back(std::make_pair((RPCDQMObject*)(r->Fake_RPCDQMObject()), tagInfo().lastInterval.since + 1));
0022   }
0023 
0024   m_to_transfer.push_back(std::make_pair(rpcDQMObject, myTime));
0025 }
0026 
0027 void RPCDBHandler::initObject(RPCDQMObject* fObject) { rpcDQMObject = fObject; }