CMS 3D CMS Logo

WriteEcalMiscalibConstants Class Reference

Description: <one line="" class="" summary>="">. More...

#include <CalibCalorimetry/WriteEcalMiscalibConstants/src/WriteEcalMiscalibConstants.cc>

Inheritance diagram for WriteEcalMiscalibConstants:

edm::EDAnalyzer

List of all members.

Public Member Functions

 WriteEcalMiscalibConstants (const edm::ParameterSet &)
 ~WriteEcalMiscalibConstants ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob (const edm::EventSetup &)
virtual void endJob ()

Private Attributes

std::string newTagRequest_


Detailed Description

Description: <one line="" class="" summary>="">.

Implementation: <Notes on="" implementation>="">

Definition at line 26 of file WriteEcalMiscalibConstants.h.


Constructor & Destructor Documentation

WriteEcalMiscalibConstants::WriteEcalMiscalibConstants ( const edm::ParameterSet iConfig  )  [explicit]

Definition at line 50 of file WriteEcalMiscalibConstants.cc.

References edm::ParameterSet::getParameter(), and newTagRequest_.

00051 {
00052    //now do what ever initialization is needed
00053   newTagRequest_ = iConfig.getParameter< std::string > ("NewTagRequest");
00054 
00055 
00056 }

WriteEcalMiscalibConstants::~WriteEcalMiscalibConstants (  ) 

Definition at line 59 of file WriteEcalMiscalibConstants.cc.

00060 {
00061  
00062    // do anything here that needs to be done at desctruction time
00063    // (e.g. close files, deallocate resources etc.)
00064 
00065 }


Member Function Documentation

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 GenMuonPlsPt100GeV_cfg::cout, lat::endl(), edm::EventSetup::get(), edm::Service< T >::isAvailable(), newTagRequest_, and edm::ESHandle< T >::product().

00075 {
00076    using namespace edm;
00077   // Intercalib constants
00078    edm::ESHandle<EcalIntercalibConstants> pIcal;
00079    iSetup.get<EcalIntercalibConstantsRcd>().get(pIcal);
00080    const EcalIntercalibConstants* Mcal = pIcal.product();
00081 
00082   edm::Service<cond::service::PoolDBOutputService> poolDbService;
00083   if( poolDbService.isAvailable() ){
00084     if ( poolDbService->isNewTagRequest(newTagRequest_) ){
00085       std::cout<<" Creating a  new one "<<std::endl;
00086       poolDbService->createNewIOV<const EcalIntercalibConstants>( Mcal, poolDbService->beginOfTime(), poolDbService->endOfTime(),newTagRequest_);
00087       std::cout<<"Done" << std::endl;
00088     }else{
00089       std::cout<<"Old One "<<std::endl;
00090        poolDbService->appendSinceTime<const EcalIntercalibConstants>( Mcal, poolDbService->currentTime(),newTagRequest_);
00091     }
00092   }  
00093 }

void WriteEcalMiscalibConstants::beginJob ( const edm::EventSetup  )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 98 of file WriteEcalMiscalibConstants.cc.

00099 {
00100 }

void WriteEcalMiscalibConstants::endJob ( void   )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 105 of file WriteEcalMiscalibConstants.cc.

References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().

00105                                    {
00106   std::cout << "Here is the end" << std::endl; 
00107 }


Member Data Documentation

std::string WriteEcalMiscalibConstants::newTagRequest_ [private]

Definition at line 38 of file WriteEcalMiscalibConstants.h.

Referenced by analyze(), and WriteEcalMiscalibConstants().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:35:53 2009 for CMSSW by  doxygen 1.5.4