Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:09

0001 #include "CondTools/Hcal/interface/HcalZDCLowGainFractionsHandler.h"
0002 #include "DataFormats/DetId/interface/DetId.h"
0003 #include "DataFormats/HcalDetId/interface/HcalGenericDetId.h"
0004 #include <memory>
0005 
0006 HcalZDCLowGainFractionsHandler::HcalZDCLowGainFractionsHandler(edm::ParameterSet const& ps) {
0007   m_name = ps.getUntrackedParameter<std::string>("name", "HcalZDCLowGainFractionsHandler");
0008   sinceTime = ps.getUntrackedParameter<unsigned>("IOVRun", 0);
0009 }
0010 
0011 HcalZDCLowGainFractionsHandler::~HcalZDCLowGainFractionsHandler() {}
0012 
0013 void HcalZDCLowGainFractionsHandler::getNewObjects() {
0014   edm::LogInfo("HcalZDCLowGainFractionsHandler") << "------- " << m_name << " - > getNewObjects\n"
0015                                                  <<
0016       //check whats already inside of database
0017       "got offlineInfo" << tagInfo().name << ", size " << tagInfo().size << ", last object valid since "
0018                                                  << tagInfo().lastInterval.since << std::endl;
0019 
0020   if (!myDBObject)
0021     throw cms::Exception("Empty DB object")
0022         << m_name << " has received empty object - nothing to write to DB" << std::endl;
0023 
0024   //  IOV information
0025   cond::Time_t myTime = sinceTime;
0026 
0027   edm::LogInfo("HcalZDCLowGainFractionsHandler") << "Using IOV run " << sinceTime << std::endl;
0028 
0029   // prepare for transfer:
0030   m_to_transfer.push_back(std::make_pair(myDBObject, myTime));
0031 
0032   edm::LogInfo("HcalZDCLowGainFractionsHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;
0033 }
0034 
0035 void HcalZDCLowGainFractionsHandler::initObject(HcalZDCLowGainFractions* fObject) { myDBObject = fObject; }