Main Page
Namespaces
Classes
Package Documentation
src
RecoCTPPS
PixelLocal
src
CTPPSPixelGainCalibrationDBService.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: RecoCTPPS/PixelLocal
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 "
RecoCTPPS/PixelLocal/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/CTPPSReadoutObjects/interface/CTPPSPixelGainCalibrations.h
"
19
#include "
CondFormats/DataRecord/interface/CTPPSPixelGainCalibrationsRcd.h
"
20
21
CTPPSPixelGainCalibrationDBService::CTPPSPixelGainCalibrationDBService
()
22
{
23
}
24
25
CTPPSPixelGainCalibrationDBService::~CTPPSPixelGainCalibrationDBService
()
26
{
27
}
28
29
void
CTPPSPixelGainCalibrationDBService::getDB
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup){
30
31
edm::eventsetup::EventSetupRecordKey
recordKey(
edm::eventsetup::EventSetupRecordKey::TypeTag::findType
(
"CTPPSPixelGainCalibrationsRcd"
));
32
if
( recordKey.
type
() ==
edm::eventsetup::EventSetupRecordKey::TypeTag
()) {
33
//record not found
34
throw
cms::Exception
(
"CTPPSPixelGainCalibrationService"
) <<
"Record CTPPSPixelGainCalibrationsRcd does not exist"
;
35
}
36
edm::ESHandle<CTPPSPixelGainCalibrations>
calhandle;
37
iSetup.
get
<
CTPPSPixelGainCalibrationsRcd
>().
get
(calhandle);
38
pPixelGainCalibrations
=calhandle.
product
();
39
}
Exception
Definition:
hltDiff.cc:292
CTPPSPixelGainCalibrations.h
CTPPSPixelGainCalibrationDBService::pPixelGainCalibrations
const CTPPSPixelGainCalibrations * pPixelGainCalibrations
Definition:
CTPPSPixelGainCalibrationDBService.h:33
CTPPSPixelGainCalibrationDBService::~CTPPSPixelGainCalibrationDBService
virtual ~CTPPSPixelGainCalibrationDBService()
Definition:
CTPPSPixelGainCalibrationDBService.cc:25
CTPPSPixelGainCalibrationDBService.h
Event.h
MakerMacros.h
EventSetup.h
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
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::ESHandle
Definition:
DTSurvey.h:22
CTPPSPixelGainCalibrationDBService::CTPPSPixelGainCalibrationDBService
CTPPSPixelGainCalibrationDBService()
Definition:
CTPPSPixelGainCalibrationDBService.cc:21
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:57
CTPPSPixelGainCalibrationDBService::getDB
virtual void getDB(const edm::Event &e, const edm::EventSetup &c)
Definition:
CTPPSPixelGainCalibrationDBService.cc:29
CTPPSPixelGainCalibrationsRcd.h
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
CTPPSPixelGainCalibrationsRcd
Definition:
CTPPSPixelGainCalibrationsRcd.h:23
edm::eventsetup::EventSetupRecordKey::TypeTag
heterocontainer::HCTypeTag TypeTag
Definition:
EventSetupRecordKey.h:32
edm::eventsetup::EventSetupRecordKey::type
const TypeTag & type() const
Definition:
EventSetupRecordKey.h:40
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:71
edm::Event
Definition:
Event.h:71
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
Generated for CMSSW Reference Manual by
1.8.11