Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
CondTools
CTPPS
src
WriteCTPPSPixelDAQMapping.cc
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* Offline analyzer for writing CTPPS DAQ Mapping sqlite file
4
* H. Malbouisson
5
* based on TOTEM code from Jan Kašpar (jan.kaspar@gmail.com)
6
*
7
****************************************************************************/
8
9
#include "
FWCore/Framework/interface/one/EDAnalyzer.h
"
10
#include "
FWCore/Framework/interface/Event.h
"
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
#include "
FWCore/Framework/interface/EventSetup.h
"
13
#include "
FWCore/Framework/interface/MakerMacros.h
"
14
#include "
FWCore/Framework/interface/ESHandle.h
"
15
#include "
CondCore/CondDB/interface/Time.h
"
16
17
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
18
#include "
FWCore/Framework/interface/EDProducer.h
"
19
20
#include "
FWCore/ServiceRegistry/interface/Service.h
"
21
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
22
23
#include "
CondFormats/DataRecord/interface/CTPPSPixelDAQMappingRcd.h
"
24
#include "
CondFormats/DataRecord/interface/CTPPSPixelAnalysisMaskRcd.h
"
25
#include "
CondFormats/PPSObjects/interface/CTPPSPixelDAQMapping.h
"
26
#include "
CondFormats/PPSObjects/interface/CTPPSPixelAnalysisMask.h
"
27
#include "
FWCore/Utilities/interface/ESInputTag.h
"
28
29
#include <cstdint>
30
31
//----------------------------------------------------------------------------------------------------
32
36
class
WriteCTPPSPixelDAQMapping
:
public
edm::one::EDAnalyzer
<> {
37
public
:
38
WriteCTPPSPixelDAQMapping
(
const
edm::ParameterSet
&ps);
39
~WriteCTPPSPixelDAQMapping
()
override
{}
40
41
private
:
42
void
analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
&es)
override
;
43
cond::Time_t
daqmappingiov_
;
44
std::string
record_
;
45
std::string
label_
;
46
47
edm::ESGetToken<CTPPSPixelDAQMapping, CTPPSPixelDAQMappingRcd>
tokenMapping_
;
48
};
49
50
using namespace
std
;
51
using namespace
edm
;
52
53
//----------------------------------------------------------------------------------------------------
54
55
WriteCTPPSPixelDAQMapping::WriteCTPPSPixelDAQMapping
(
const
edm::ParameterSet
&ps)
56
: daqmappingiov_(ps.getParameter<unsigned long long>(
"daqmappingiov"
)),
57
record_(ps.getParameter<
string
>(
"record"
)),
58
label_(ps.getParameter<
string
>(
"label"
)),
59
tokenMapping_(
esConsumes
<
CTPPSPixelDAQMapping
,
CTPPSPixelDAQMappingRcd
>(
edm
::
ESInputTag
(
""
, label_))) {}
60
61
void
WriteCTPPSPixelDAQMapping::analyze
(
const
edm::Event
&,
edm::EventSetup
const
&es) {
62
// get DAQ mapping
63
edm::ESHandle<CTPPSPixelDAQMapping>
hMapping = es.
getHandle
(
tokenMapping_
);
64
65
// print mapping
66
/*printf("* DAQ mapping\n");
67
for (const auto &p : mapping->ROCMapping)
68
cout << " " << p.first << " -> " << p.second << endl;
69
*/
70
71
// Write DAQ Mapping to sqlite file:
72
const
CTPPSPixelDAQMapping
*pCTPPSPixelDAQMapping = hMapping.
product
();
// DAQ Mapping
73
edm::Service<cond::service::PoolDBOutputService>
poolDbService;
74
if
(poolDbService.
isAvailable
()) {
75
poolDbService->
writeOne
(pCTPPSPixelDAQMapping,
daqmappingiov_
,
/*m_record*/
record_
);
76
}
77
}
78
79
//----------------------------------------------------------------------------------------------------
80
81
DEFINE_FWK_MODULE
(
WriteCTPPSPixelDAQMapping
);
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
CTPPSPixelAnalysisMaskRcd.h
EDAnalyzer.h
edm::ESInputTag
Definition:
ESInputTag.h:87
CTPPSPixelDAQMappingRcd.h
WriteCTPPSPixelDAQMapping::label_
std::string label_
Definition:
WriteCTPPSPixelDAQMapping.cc:49
EDProducer.h
ESHandle.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::one::EDAnalyzer
Definition:
EDAnalyzer.h:30
edm::Service::isAvailable
bool isAvailable() const
Definition:
Service.h:40
MakerMacros.h
PoolDBOutputService.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Service.h
edm::ESHandle
Definition:
DTSurvey.h:22
CTPPSPixelDAQMappingRcd
Definition:
CTPPSPixelDAQMappingRcd.h:23
WriteCTPPSPixelDAQMapping::WriteCTPPSPixelDAQMapping
WriteCTPPSPixelDAQMapping(const edm::ParameterSet &ps)
Definition:
WriteCTPPSPixelDAQMapping.cc:54
CTPPSPixelAnalysisMask.h
WriteCTPPSPixelDAQMapping::~WriteCTPPSPixelDAQMapping
~WriteCTPPSPixelDAQMapping() override
Definition:
WriteCTPPSPixelDAQMapping.cc:43
Time.h
edm::ParameterSet
Definition:
ParameterSet.h:47
WriteCTPPSPixelDAQMapping::tokenMapping_
edm::ESGetToken< CTPPSPixelDAQMapping, CTPPSPixelDAQMappingRcd > tokenMapping_
Definition:
WriteCTPPSPixelDAQMapping.cc:51
Event.h
cond::Time_t
unsigned long long Time_t
Definition:
Time.h:14
edm::Service< cond::service::PoolDBOutputService >
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition:
EventSetup.h:155
WriteCTPPSPixelDAQMapping::record_
std::string record_
Definition:
WriteCTPPSPixelDAQMapping.cc:48
edm::EventSetup
Definition:
EventSetup.h:58
WriteCTPPSPixelDAQMapping::daqmappingiov_
cond::Time_t daqmappingiov_
Definition:
WriteCTPPSPixelDAQMapping.cc:47
edm::ESGetToken< CTPPSPixelDAQMapping, CTPPSPixelDAQMappingRcd >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
ESInputTag.h
std
Definition:
JetResolutionObject.h:76
CTPPSPixelDAQMapping.h
WriteCTPPSPixelDAQMapping
Prints the DAQ mapping loaded by TotemDAQMappingESSourceXML.
Definition:
WriteCTPPSPixelDAQMapping.cc:35
Frameworkfwd.h
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition:
PoolDBOutputService.h:63
CTPPSPixelDAQMapping
The mapping between FramePosition and ROCInfo.
Definition:
CTPPSPixelDAQMapping.h:40
EventSetup.h
ParameterSet.h
WriteCTPPSPixelDAQMapping::analyze
void analyze(const edm::Event &e, const edm::EventSetup &es) override
Definition:
WriteCTPPSPixelDAQMapping.cc:60
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition:
DeDxTools.cc:283
edm::Event
Definition:
Event.h:73
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16