CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/CondTools/Hcal/src/HcalCovarianceMatricesHandler.cc

Go to the documentation of this file.
00001 #include "CondTools/Hcal/interface/HcalCovarianceMatricesHandler.h"
00002 #include "DataFormats/DetId/interface/DetId.h"
00003 #include "DataFormats/HcalDetId/interface/HcalGenericDetId.h"
00004 #include <memory>
00005 
00006 HcalCovarianceMatricesHandler::HcalCovarianceMatricesHandler(edm::ParameterSet const & ps)
00007 {
00008   m_name = ps.getUntrackedParameter<std::string>("name","HcalCovarianceMatricesHandler");
00009   sinceTime = ps.getUntrackedParameter<unsigned>("IOVRun",0);
00010 }
00011 
00012 HcalCovarianceMatricesHandler::~HcalCovarianceMatricesHandler()
00013 {
00014 }
00015 
00016 void HcalCovarianceMatricesHandler::getNewObjects()
00017 {
00018   //  edm::LogInfo   ("HcalCovarianceMatricesHandler") 
00019   std::cout
00020     << "------- " << m_name 
00021     << " - > getNewObjects\n" << 
00022     //check whats already inside of database
00023     "got offlineInfo"<<
00024     tagInfo().name << ", size " << tagInfo().size 
00025                                           << ", last object valid since " 
00026                                           << tagInfo().lastInterval.first << std::endl;  
00027 
00028   if (!myDBObject) 
00029     throw cms::Exception("Empty DB object") << m_name 
00030                                             << " has received empty object - nothing to write to DB" 
00031                                             << std::endl;
00032 
00033   //  IOV information
00034   cond::Time_t myTime = sinceTime;
00035 
00036   std::cout << "Using IOV run " << sinceTime << std::endl;
00037 
00038   // prepare for transfer:
00039   m_to_transfer.push_back(std::make_pair(myDBObject,myTime));
00040 
00041   edm::LogInfo("HcalCovarianceMatricesHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;
00042 
00043 }
00044 
00045 void HcalCovarianceMatricesHandler::initObject(HcalCovarianceMatrices* fObject)
00046 {
00047   myDBObject = fObject;
00048 }