Main Page
Namespaces
Classes
Package Documentation
CondTools
CTPPS
plugins
RetrieveCTPPSBeamParameters.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Class: RetrieveCTPPSBeamParameters
4
//
5
// Description: Test analyzer for reading CTPPS beam parameters condition data
6
//
7
// Simple analyzer that retrieves CTTPSBeamParameters record from a sql
8
// database file, as a test of offline conditions implementation.
9
//
10
// Original Author: Wagner De Paula Carvalho
11
// Created: Wed, 21 Nov 2018 17:35:07 GMT
12
//
13
//==================================================================================
14
15
#include <memory>
16
17
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
18
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
19
#include "
FWCore/Framework/interface/one/EDAnalyzer.h
"
20
21
#include "
FWCore/Framework/interface/Event.h
"
22
#include "
FWCore/Framework/interface/EventSetup.h
"
23
#include "
FWCore/Framework/interface/MakerMacros.h
"
24
25
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
26
#include "
FWCore/Framework/interface/ESHandle.h
"
27
#include "
FWCore/ServiceRegistry/interface/Service.h
"
28
29
#include "
CondFormats/CTPPSReadoutObjects/interface/CTPPSBeamParameters.h
"
30
#include "
CondFormats/DataRecord/interface/CTPPSBeamParametersRcd.h
"
31
32
#include <cstdint>
33
34
class
RetrieveCTPPSBeamParameters
:
public
edm::one::EDAnalyzer
<>
35
{
36
public
:
37
explicit
RetrieveCTPPSBeamParameters
(
const
edm::ParameterSet
&);
38
~RetrieveCTPPSBeamParameters
()
override
=
default
;
39
40
private
:
41
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
42
std::string
label_
;
43
};
44
45
//---------------------------------------------------------------------------------------
46
47
RetrieveCTPPSBeamParameters::RetrieveCTPPSBeamParameters
(
const
edm::ParameterSet
& iConfig)
48
{}
49
50
void
RetrieveCTPPSBeamParameters::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
51
{
52
edm::ESHandle<CTPPSBeamParameters>
pSetup;
53
iSetup.
get
<
CTPPSBeamParametersRcd
>().
get
(
label_
, pSetup);
54
55
const
CTPPSBeamParameters
* pInfo = pSetup.
product
();
56
57
edm::LogInfo
(
"CTPPSBeamParameters"
) <<
"\n"
<< *pInfo <<
"\n"
;
58
}
59
60
DEFINE_FWK_MODULE
(
RetrieveCTPPSBeamParameters
);
61
MessageLogger.h
RetrieveCTPPSBeamParameters::label_
std::string label_
Definition:
RetrieveCTPPSBeamParameters.cc:42
CTPPSBeamParametersRcd
Definition:
CTPPSBeamParametersRcd.h:23
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
Event.h
MakerMacros.h
EventSetup.h
Frameworkfwd.h
RetrieveCTPPSBeamParameters
Definition:
RetrieveCTPPSBeamParameters.cc:34
ParameterSet.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ESHandle
Definition:
DTSurvey.h:22
CTPPSBeamParameters
Definition:
CTPPSBeamParameters.h:22
ESHandle.h
Service.h
edm::EventSetup
Definition:
EventSetup.h:57
RetrieveCTPPSBeamParameters::~RetrieveCTPPSBeamParameters
~RetrieveCTPPSBeamParameters() override=default
CTPPSBeamParametersRcd.h
edm::LogInfo
Definition:
MessageLogger.h:254
EDAnalyzer.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:71
RetrieveCTPPSBeamParameters::RetrieveCTPPSBeamParameters
RetrieveCTPPSBeamParameters(const edm::ParameterSet &)
Definition:
RetrieveCTPPSBeamParameters.cc:47
RetrieveCTPPSBeamParameters::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
RetrieveCTPPSBeamParameters.cc:50
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::Event
Definition:
Event.h:71
CTPPSBeamParameters.h
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
edm::one::EDAnalyzer
Definition:
EDAnalyzer.h:30
Generated for CMSSW Reference Manual by
1.8.11