CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
WriteEcalMiscalibConstants Class Reference

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

Inheritance diagram for WriteEcalMiscalibConstants:
edm::EDAnalyzer

Public Member Functions

 WriteEcalMiscalibConstants (const edm::ParameterSet &)
 
 ~WriteEcalMiscalibConstants ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

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

Private Attributes

std::string newTagRequest_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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_.

51 {
52  //now do what ever initialization is needed
53  newTagRequest_ = iConfig.getParameter< std::string > ("NewTagRequest");
54 
55 
56 }
T getParameter(std::string const &) const
WriteEcalMiscalibConstants::~WriteEcalMiscalibConstants ( )

Definition at line 59 of file WriteEcalMiscalibConstants.cc.

60 {
61 
62  // do anything here that needs to be done at desctruction time
63  // (e.g. close files, deallocate resources etc.)
64 
65 }

Member Function Documentation

void WriteEcalMiscalibConstants::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 74 of file WriteEcalMiscalibConstants.cc.

References gather_cfg::cout, edm::EventSetup::get(), and newTagRequest_.

75 {
76  using namespace edm;
77  // Intercalib constants
79  iSetup.get<EcalIntercalibConstantsRcd>().get(pIcal);
80  const EcalIntercalibConstants* Mcal = pIcal.product();
81 
83  if( poolDbService.isAvailable() ){
84  if ( poolDbService->isNewTagRequest(newTagRequest_) ){
85  std::cout<<" Creating a new one "<<std::endl;
86  poolDbService->createNewIOV<const EcalIntercalibConstants>( Mcal, poolDbService->beginOfTime(), poolDbService->endOfTime(),newTagRequest_);
87  std::cout<<"Done" << std::endl;
88  }else{
89  std::cout<<"Old One "<<std::endl;
90  poolDbService->appendSinceTime<const EcalIntercalibConstants>( Mcal, poolDbService->currentTime(),newTagRequest_);
91  }
92  }
93 }
const T & get() const
Definition: EventSetup.h:55
tuple cout
Definition: gather_cfg.py:121
void WriteEcalMiscalibConstants::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 98 of file WriteEcalMiscalibConstants.cc.

99 {
100 }
void WriteEcalMiscalibConstants::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 105 of file WriteEcalMiscalibConstants.cc.

References gather_cfg::cout.

105  {
106  std::cout << "Here is the end" << std::endl;
107 }
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

std::string WriteEcalMiscalibConstants::newTagRequest_
private

Definition at line 38 of file WriteEcalMiscalibConstants.h.

Referenced by analyze(), and WriteEcalMiscalibConstants().