RecoPPS
Local
src
CTPPSPixelGainCalibrationDBService.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: RecoPPS/Local
4
// Class : CTPPSPixelGainCalibrationDBService
5
//
6
// Implementation:
7
// [Notes on implementation]
8
//
9
// Original Author: Helio Nogima
10
// Created: Thu, 23 Feb 2017 17:37:50 GMT
11
//
12
13
#include "
RecoPPS/Local/interface/CTPPSPixelGainCalibrationDBService.h
"
14
#include "
FWCore/Framework/interface/ESHandle.h
"
15
#include "
FWCore/Framework/interface/Event.h
"
16
#include "
FWCore/Framework/interface/EventSetup.h
"
17
#include "
FWCore/Framework/interface/MakerMacros.h
"
18
#include "
CondFormats/PPSObjects/interface/CTPPSPixelGainCalibrations.h
"
19
#include "
CondFormats/DataRecord/interface/CTPPSPixelGainCalibrationsRcd.h
"
20
21
CTPPSPixelGainCalibrationDBService::CTPPSPixelGainCalibrationDBService
() {}
22
23
CTPPSPixelGainCalibrationDBService::~CTPPSPixelGainCalibrationDBService
() {}
24
25
void
CTPPSPixelGainCalibrationDBService::getDB
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
26
edm::eventsetup::EventSetupRecordKey
recordKey(
27
edm::eventsetup::EventSetupRecordKey::TypeTag::findType
(
"CTPPSPixelGainCalibrationsRcd"
));
28
if
(recordKey.
type
() ==
edm::eventsetup::EventSetupRecordKey::TypeTag
()) {
29
//record not found
30
throw
cms::Exception
(
"CTPPSPixelGainCalibrationService"
) <<
"Record CTPPSPixelGainCalibrationsRcd does not exist"
;
31
}
32
edm::ESHandle<CTPPSPixelGainCalibrations>
calhandle;
33
iSetup.
get
<
CTPPSPixelGainCalibrationsRcd
>().
get
(calhandle);
34
pPixelGainCalibrations
= calhandle.
product
();
35
}
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
edm::eventsetup::heterocontainer::HCTypeTag::findType
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition:
HCTypeTag.cc:121
ESHandle.h
CTPPSPixelGainCalibrationDBService::~CTPPSPixelGainCalibrationDBService
virtual ~CTPPSPixelGainCalibrationDBService()
Definition:
CTPPSPixelGainCalibrationDBService.cc:23
CTPPSPixelGainCalibrationDBService::CTPPSPixelGainCalibrationDBService
CTPPSPixelGainCalibrationDBService()
Definition:
CTPPSPixelGainCalibrationDBService.cc:21
CTPPSPixelGainCalibrations.h
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
MakerMacros.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:80
CTPPSPixelGainCalibrationDBService::getDB
virtual void getDB(const edm::Event &e, const edm::EventSetup &c)
Definition:
CTPPSPixelGainCalibrationDBService.cc:25
edm::ESHandle
Definition:
DTSurvey.h:22
edm::eventsetup::EventSetupRecordKey::TypeTag
heterocontainer::HCTypeTag TypeTag
Definition:
EventSetupRecordKey.h:32
Event.h
edm::eventsetup::EventSetupRecordKey::type
const TypeTag & type() const
Definition:
EventSetupRecordKey.h:40
iEvent
int iEvent
Definition:
GenABIO.cc:224
CTPPSPixelGainCalibrationsRcd
Definition:
CTPPSPixelGainCalibrationsRcd.h:23
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
CTPPSPixelGainCalibrationsRcd.h
Exception
Definition:
hltDiff.cc:246
EventSetup.h
CTPPSPixelGainCalibrationDBService.h
edm::Event
Definition:
Event.h:73
CTPPSPixelGainCalibrationDBService::pPixelGainCalibrations
const CTPPSPixelGainCalibrations * pPixelGainCalibrations
Definition:
CTPPSPixelGainCalibrationDBService.h:32
Generated for CMSSW Reference Manual by
1.8.16