Main Page
Namespaces
Classes
Package Documentation
CondTools
CTPPS
plugins
CTPPSRPAlignmentInfoReader.cc
Go to the documentation of this file.
1
// system include files
2
#include <memory>
3
#include <iostream>
4
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
5
#include "
FWCore/Framework/interface/one/EDAnalyzer.h
"
6
#include "
FWCore/Framework/interface/ESHandle.h
"
7
#include "
FWCore/Framework/interface/Event.h
"
8
#include "
FWCore/Framework/interface/EventSetup.h
"
9
#include "
FWCore/Framework/interface/MakerMacros.h
"
10
#include "
CondCore/CondDB/interface/Time.h
"
11
12
#include "
CondFormats/CTPPSReadoutObjects/interface/CTPPSRPAlignmentCorrectionsData.h
"
13
#include "
CondFormats/AlignmentRecord/interface/CTPPSRPAlignmentCorrectionsDataRcd.h
"
14
#include "
CondFormats/AlignmentRecord/interface/RPRealAlignmentRecord.h
"
15
#include "
CondFormats/AlignmentRecord/interface/RPMisalignedAlignmentRecord.h
"
16
17
using namespace
std
;
18
19
class
CTPPSRPAlignmentInfoReader
:
public
edm::one::EDAnalyzer
<> {
20
public
:
21
cond::Time_t
iov_
;
22
std::string
record_
;
23
24
explicit
CTPPSRPAlignmentInfoReader
(
edm::ParameterSet
const
& iConfig)
25
: iov_(iConfig.getParameter<unsigned long long>(
"iov"
)), record_(iConfig.getParameter<
string
>(
"record"
)) {}
26
explicit
CTPPSRPAlignmentInfoReader
(
int
i
) {}
27
~CTPPSRPAlignmentInfoReader
()
override
{}
28
void
analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
&
c
)
override
;
29
void
printInfo
(
const
CTPPSRPAlignmentCorrectionsData
& alignments,
const
edm::Event
&
event
);
30
};
31
32
void
CTPPSRPAlignmentInfoReader::analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
& context) {
33
using namespace
edm
;
34
35
//this part gets the handle of the event source and the record (i.e. the Database)
36
if
(e.
id
().
run
() == iov_) {
37
ESHandle<CTPPSRPAlignmentCorrectionsData>
alignments;
38
if
(strcmp(record_.c_str(),
"CTPPSRPAlignmentCorrectionsDataRcd"
) == 0) {
39
context.
get
<
CTPPSRPAlignmentCorrectionsDataRcd
>().
get
(alignments);
40
}
else
if
(strcmp(record_.c_str(),
"RPRealAlignmentRecord"
) == 0) {
41
context.
get
<
RPRealAlignmentRecord
>().
get
(alignments);
42
}
else
{
43
context.
get
<
RPMisalignedAlignmentRecord
>().
get
(alignments);
44
}
45
46
//std::cout
47
edm::LogPrint
(
"CTPPSRPAlignmentInfoReader"
)
48
<<
"New alignments found in run="
<< e.
id
().
run
() <<
", event="
<< e.
id
().
event
() <<
":\n"
49
<< *alignments;
50
}
51
}
52
53
DEFINE_FWK_MODULE
(
CTPPSRPAlignmentInfoReader
);
edm::EventID::run
RunNumber_t run() const
Definition:
EventID.h:38
RPMisalignedAlignmentRecord
Definition:
RPMisalignedAlignmentRecord.h:6
edm::EventID::event
EventNumber_t event() const
Definition:
EventID.h:40
MessageLogger.h
mps_fire.i
i
Definition:
mps_fire.py:341
CTPPSRPAlignmentInfoReader::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition:
CTPPSRPAlignmentInfoReader.cc:32
CTPPSRPAlignmentCorrectionsDataRcd.h
CTPPSRPAlignmentInfoReader::~CTPPSRPAlignmentInfoReader
~CTPPSRPAlignmentInfoReader() override
Definition:
CTPPSRPAlignmentInfoReader.cc:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
Event.h
MakerMacros.h
EventSetup.h
RPRealAlignmentRecord
Definition:
RPRealAlignmentRecord.h:6
std
Definition:
JetResolutionObject.h:76
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
CTPPSRPAlignmentInfoReader::record_
std::string record_
Definition:
CTPPSRPAlignmentInfoReader.cc:22
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
analyze
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
CTPPSRPAlignmentInfoReader::CTPPSRPAlignmentInfoReader
CTPPSRPAlignmentInfoReader(edm::ParameterSet const &iConfig)
Definition:
CTPPSRPAlignmentInfoReader.cc:24
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
cond::Time_t
unsigned long long Time_t
Definition:
Time.h:14
RPRealAlignmentRecord.h
CTPPSRPAlignmentInfoReader
Definition:
CTPPSRPAlignmentInfoReader.cc:19
edm::ESHandle
Definition:
DTSurvey.h:22
edm::LogPrint
Definition:
MessageLogger.h:342
CTPPSRPAlignmentInfoReader::CTPPSRPAlignmentInfoReader
CTPPSRPAlignmentInfoReader(int i)
Definition:
CTPPSRPAlignmentInfoReader.cc:26
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:57
RPMisalignedAlignmentRecord.h
CTPPSRPAlignmentInfoReader::iov_
cond::Time_t iov_
Definition:
CTPPSRPAlignmentInfoReader.cc:21
CTPPSRPAlignmentCorrectionsData.h
EDAnalyzer.h
CTPPSRPAlignmentCorrectionsData
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
Definition:
CTPPSRPAlignmentCorrectionsData.h:25
edm::EventBase::id
edm::EventID id() const
Definition:
EventBase.h:59
edm
HLT enums.
Definition:
AlignableModifier.h:19
CTPPSRPAlignmentCorrectionsDataRcd
Definition:
CTPPSRPAlignmentCorrectionsDataRcd.h:23
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:73
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::Event
Definition:
Event.h:72
Time.h
edm::one::EDAnalyzer
Definition:
EDAnalyzer.h:30
objects.IsoTrackAnalyzer.printInfo
def printInfo(self, event)
Definition:
IsoTrackAnalyzer.py:252
event
Definition:
event.py:1
Generated for CMSSW Reference Manual by
1.8.11