#include <CalibCalorimetry/WriteEcalMiscalibConstants/src/WriteEcalMiscalibConstants.cc>
Public Member Functions | |
WriteEcalMiscalibConstants (const edm::ParameterSet &) | |
~WriteEcalMiscalibConstants () | |
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 WriteEcalMiscalibConstants.h.
WriteEcalMiscalibConstants::WriteEcalMiscalibConstants | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 50 of file WriteEcalMiscalibConstants.cc.
References edm::ParameterSet::getParameter(), and newTagRequest_.
{ //now do what ever initialization is needed newTagRequest_ = iConfig.getParameter< std::string > ("NewTagRequest"); }
WriteEcalMiscalibConstants::~WriteEcalMiscalibConstants | ( | ) |
Definition at line 59 of file WriteEcalMiscalibConstants.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void WriteEcalMiscalibConstants::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 74 of file WriteEcalMiscalibConstants.cc.
References gather_cfg::cout, edm::EventSetup::get(), and newTagRequest_.
{ using namespace edm; // Intercalib constants edm::ESHandle<EcalIntercalibConstants> pIcal; iSetup.get<EcalIntercalibConstantsRcd>().get(pIcal); const EcalIntercalibConstants* 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 EcalIntercalibConstants>( Mcal, poolDbService->beginOfTime(), poolDbService->endOfTime(),newTagRequest_); std::cout<<"Done" << std::endl; }else{ std::cout<<"Old One "<<std::endl; poolDbService->appendSinceTime<const EcalIntercalibConstants>( Mcal, poolDbService->currentTime(),newTagRequest_); } } }
void WriteEcalMiscalibConstants::beginJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 98 of file WriteEcalMiscalibConstants.cc.
{ }
void WriteEcalMiscalibConstants::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 105 of file WriteEcalMiscalibConstants.cc.
References gather_cfg::cout.
{ std::cout << "Here is the end" << std::endl; }
std::string WriteEcalMiscalibConstants::newTagRequest_ [private] |
Definition at line 38 of file WriteEcalMiscalibConstants.h.
Referenced by analyze(), and WriteEcalMiscalibConstants().