#include <CalibCalorimetry/CaloMiscalibToolsMC/interface/CaloMiscalibToolsMC.h>
Public Types | |
typedef const EcalIntercalibConstantsMC * | ReturnType |
Public Member Functions | |
CaloMiscalibToolsMC (const edm::ParameterSet &) | |
ReturnType | produce (const EcalIntercalibConstantsMCRcd &) |
~CaloMiscalibToolsMC () | |
Private Member Functions | |
void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Attributes | |
std::string | barrelfile_ |
std::string | barrelfileinpath_ |
std::string | endcapfile_ |
std::string | endcapfileinpath_ |
CaloMiscalibMapEcal | map_ |
Description: Definition of CaloMiscalibToolsMC
Implementation: <Notes on="" implementation>="">
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 51 of file CaloMiscalibToolsMC.h.
typedef const EcalIntercalibConstantsMC* CaloMiscalibToolsMC::ReturnType |
Definition at line 56 of file CaloMiscalibToolsMC.h.
CaloMiscalibToolsMC::CaloMiscalibToolsMC | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 37 of file CaloMiscalibToolsMC.cc.
References barrelfile_, barrelfileinpath_, gather_cfg::cout, endcapfile_, endcapfileinpath_, edm::FileInPath::fullPath(), edm::ParameterSet::getUntrackedParameter(), map_, CaloMiscalibMapEcal::prefillMap(), produce(), and edm::ESProducer::setWhatProduced().
{ //the following line is needed to tell the framework what // data is being produced map_.prefillMap(); barrelfileinpath_=iConfig.getUntrackedParameter<std::string> ("fileNameBarrel",""); endcapfileinpath_=iConfig.getUntrackedParameter<std::string> ("fileNameEndcap",""); edm::FileInPath barrelfiletmp("CalibCalorimetry/CaloMiscalibTools/data/"+barrelfileinpath_); edm::FileInPath endcapfiletmp("CalibCalorimetry/CaloMiscalibTools/data/"+endcapfileinpath_); barrelfile_=barrelfiletmp.fullPath(); endcapfile_=endcapfiletmp.fullPath(); std::cout <<"Barrel file is:"<< barrelfile_<<std::endl; std::cout <<"endcap file is:"<< endcapfile_<<std::endl; // added by Zhen (changed since 1_2_0) setWhatProduced(this,&CaloMiscalibToolsMC::produce); findingRecord<EcalIntercalibConstantsMCRcd>(); //now do what ever other initialization is needed }
CaloMiscalibToolsMC::~CaloMiscalibToolsMC | ( | ) |
Definition at line 64 of file CaloMiscalibToolsMC.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
CaloMiscalibToolsMC::ReturnType CaloMiscalibToolsMC::produce | ( | const EcalIntercalibConstantsMCRcd & | iRecord | ) |
Definition at line 79 of file CaloMiscalibToolsMC.cc.
References barrelfile_, endcapfile_, CaloMiscalibMapEcal::get(), map_, MiscalibReaderFromXML::parseXMLMiscalibFile(), CaloMiscalibMapEcal::prefillMap(), and CaloMiscalibMapEcal::print().
Referenced by CaloMiscalibToolsMC().
{ map_.prefillMap(); MiscalibReaderFromXMLEcalBarrel barrelreader_(map_); MiscalibReaderFromXMLEcalEndcap endcapreader_(map_); if(!barrelfile_.empty()) barrelreader_.parseXMLMiscalibFile(barrelfile_); if(!endcapfile_.empty())endcapreader_.parseXMLMiscalibFile(endcapfile_); map_.print(); // Added by Zhen, need a new object so to not be deleted at exit // std::cout<<"about to copy"<<std::endl; EcalIntercalibConstantsMC* mydata=new EcalIntercalibConstantsMC(map_.get()); // std::cout<<"mydata "<<mydata<<std::endl; return mydata; }
void CaloMiscalibToolsMC::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , |
const edm::IOVSyncValue & | , | ||
edm::ValidityInterval & | oValidity | ||
) | [private, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 94 of file CaloMiscalibToolsMC.cc.
References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().
{ oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); }
std::string CaloMiscalibToolsMC::barrelfile_ [private] |
Definition at line 64 of file CaloMiscalibToolsMC.h.
Referenced by CaloMiscalibToolsMC(), and produce().
std::string CaloMiscalibToolsMC::barrelfileinpath_ [private] |
Definition at line 66 of file CaloMiscalibToolsMC.h.
Referenced by CaloMiscalibToolsMC().
std::string CaloMiscalibToolsMC::endcapfile_ [private] |
Definition at line 65 of file CaloMiscalibToolsMC.h.
Referenced by CaloMiscalibToolsMC(), and produce().
std::string CaloMiscalibToolsMC::endcapfileinpath_ [private] |
Definition at line 67 of file CaloMiscalibToolsMC.h.
Referenced by CaloMiscalibToolsMC().
CaloMiscalibMapEcal CaloMiscalibToolsMC::map_ [private] |
Definition at line 63 of file CaloMiscalibToolsMC.h.
Referenced by CaloMiscalibToolsMC(), and produce().