#include <CalibCalorimetry/WriteEcalMiscalibConstantsMC/src/WriteEcalMiscalibConstantsMC.cc>
Public Member Functions | |
WriteEcalMiscalibConstantsMC (const edm::ParameterSet &) | |
~WriteEcalMiscalibConstantsMC () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
std::string | newTagRequest_ |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 26 of file WriteEcalMiscalibConstantsMC.h.
WriteEcalMiscalibConstantsMC::WriteEcalMiscalibConstantsMC | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 50 of file WriteEcalMiscalibConstantsMC.cc.
References edm::ParameterSet::getParameter(), and newTagRequest_.
{ //now do what ever initialization is needed newTagRequest_ = iConfig.getParameter< std::string > ("NewTagRequest"); }
WriteEcalMiscalibConstantsMC::~WriteEcalMiscalibConstantsMC | ( | ) |
Definition at line 59 of file WriteEcalMiscalibConstantsMC.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void WriteEcalMiscalibConstantsMC::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 74 of file WriteEcalMiscalibConstantsMC.cc.
References gather_cfg::cout, edm::EventSetup::get(), and newTagRequest_.
{ using namespace edm; // Intercalib constants edm::ESHandle<EcalIntercalibConstantsMC> pIcal; iSetup.get<EcalIntercalibConstantsMCRcd>().get(pIcal); const EcalIntercalibConstantsMC* Mcal = pIcal.product(); edm::Service<cond::service::PoolDBOutputService> poolDbService; if( poolDbService.isAvailable() ){ if ( poolDbService->isNewTagRequest(newTagRequest_) ){ std::cout<<" Creating a new one "<<std::endl; poolDbService->createNewIOV<const EcalIntercalibConstantsMC>( Mcal, poolDbService->beginOfTime(), poolDbService->endOfTime(),newTagRequest_); std::cout<<"Done" << std::endl; }else{ std::cout<<"Old One "<<std::endl; poolDbService->appendSinceTime<const EcalIntercalibConstantsMC>( Mcal, poolDbService->currentTime(),newTagRequest_); } } }
void WriteEcalMiscalibConstantsMC::beginJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 98 of file WriteEcalMiscalibConstantsMC.cc.
{ }
void WriteEcalMiscalibConstantsMC::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 105 of file WriteEcalMiscalibConstantsMC.cc.
References gather_cfg::cout.
{ std::cout << "Here is the end" << std::endl; }
std::string WriteEcalMiscalibConstantsMC::newTagRequest_ [private] |
Definition at line 38 of file WriteEcalMiscalibConstantsMC.h.
Referenced by analyze(), and WriteEcalMiscalibConstantsMC().