CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
WriteEcalMiscalibConstants.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: WriteEcalMiscalibConstants
4 // Class: WriteEcalMiscalibConstants
5 //
13 //
14 // Original Author: Stephanie BEAUCERON
15 // Created: Tue May 15 16:23:21 CEST 2007
16 //
17 //
18 
19 // user include files
22 
23 // DB includes
26 
27 // user include files
28 //this one
30 
31 //
32 // static data member definitions
33 //
34 
35 //
36 // constructors and destructor
37 //
39  : newTagRequest_(iConfig.getParameter<std::string>("NewTagRequest")), intercalibConstsToken_(esConsumes()) {}
40 
42 
43 //
44 // member functions
45 //
46 
47 // ------------ method called to for each event ------------
49  using namespace edm;
50  // Intercalib constants
52 
54  if (poolDbService.isAvailable()) {
55  if (poolDbService->isNewTagRequest(newTagRequest_)) {
56  edm::LogVerbatim("WriteEcalMiscalibConstants") << "Creating a new IOV";
57  poolDbService->createOneIOV<const EcalIntercalibConstants>(*Mcal, poolDbService->beginOfTime(), newTagRequest_);
58  edm::LogVerbatim("WriteEcalMiscalibConstants") << "Done";
59  } else {
60  edm::LogVerbatim("WriteEcalMiscalibConstants") << "Old IOV";
61  poolDbService->appendOneIOV<const EcalIntercalibConstants>(*Mcal, poolDbService->currentTime(), newTagRequest_);
62  }
63  }
64 }
65 
66 // ------------ method called once each job just before starting event loop ------------
68 
69 // ------------ method called once each job just after ending the event loop ------------
70 void WriteEcalMiscalibConstants::endJob() { edm::LogVerbatim("WriteEcalMiscalibConstants") << "Here is the end"; }
Log< level::Info, true > LogVerbatim
bool getData(T &iHolder) const
Definition: EventSetup.h:128
void analyze(const edm::Event &, const edm::EventSetup &) override
int iEvent
Definition: GenABIO.cc:224
WriteEcalMiscalibConstants(const edm::ParameterSet &)
const edm::ESGetToken< EcalIntercalibConstants, EcalIntercalibConstantsRcd > intercalibConstsToken_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283