src
OnlineDB
CSCCondDB
interface
CSCDDUMapValues.h
Go to the documentation of this file.
1
#ifndef _CSCDDUMAPVALUES_H
2
#define _CSCDDUMAPVALUES_H
3
4
#include <memory>
5
#include "
FWCore/Framework/interface/SourceFactory.h
"
6
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
7
#include "
FWCore/Framework/interface/ESProducer.h
"
8
#include "
FWCore/Framework/interface/Event.h
"
9
#include "
FWCore/Framework/interface/MakerMacros.h
"
10
#include "
FWCore/Framework/interface/EventSetupRecordIntervalFinder.h
"
11
#include "
FWCore/Framework/interface/ESHandle.h
"
12
#include "
FWCore/Framework/interface/EventSetup.h
"
13
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
14
15
#include <
DataFormats/MuonDetId/interface/CSCDetId.h
>
16
#include "
CondFormats/CSCObjects/interface/CSCDDUMap.h
"
17
#include "
CondFormats/DataRecord/interface/CSCDDUMapRcd.h
"
18
#include "
OnlineDB/CSCCondDB/interface/CSCDDUMapValues.h
"
19
#include "
CondFormats/CSCObjects/interface/CSCMapItem.h
"
20
#include "
OnlineDB/CSCCondDB/interface/CSCMap1.h
"
21
22
class
CSCDDUMapValues
:
public
edm::ESProducer
,
public
edm::EventSetupRecordIntervalFinder
{
23
public
:
24
CSCDDUMapValues
(
const
edm::ParameterSet
&);
25
~CSCDDUMapValues
()
override
;
26
27
typedef
std::unique_ptr<CSCDDUMap>
ReturnType
;
28
29
inline
static
CSCDDUMap
*
fillDDUMap
();
30
31
CSCDDUMapValues::ReturnType
produceDDUMap
(
const
CSCDDUMapRcd
&);
32
33
private
:
34
// ----------member data ---------------------------
35
void
setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
&,
36
const
edm::IOVSyncValue
&,
37
edm::ValidityInterval
&)
override
;
38
};
39
40
#include <fstream>
41
#include <vector>
42
#include <iostream>
43
44
// to workaround plugin library
45
inline
CSCDDUMap
*
CSCDDUMapValues::fillDDUMap
() {
46
CSCDDUMap
*mapobj =
new
CSCDDUMap
();
47
cscmap1
map
;
48
CSCMapItem::MapItem
item
;
49
50
int
i
,
j
,
k
,
l
;
//i - endcap, j - station, k - ring, l - chamber.
51
int
r
,
c
;
//r - number of rings, c - number of chambers.
52
int
count
= 0;
53
int
chamberid;
54
int
ddu_ddu_input;
55
56
/* This is version for 540 chambers. */
57
for
(
i
= 1;
i
<= 2; ++
i
) {
58
for
(
j
= 1;
j
<= 4; ++
j
) {
59
if
(
j
== 1)
60
r
= 3;
61
else
62
r
= 2;
63
for
(
k
= 1;
k
<=
r
; ++
k
) {
64
if
(
j
> 1 &&
k
== 1)
65
c
= 18;
66
else
67
c
= 36;
68
for
(
l
= 1;
l
<=
c
; ++
l
) {
69
chamberid =
i
* 100000 +
j
* 10000 +
k
* 1000 +
l
* 10;
70
map
.chamber(chamberid, &
item
);
71
ddu_ddu_input =
item
.ddu * 100 +
item
.ddu_input;
72
mapobj->
ddu_map
[ddu_ddu_input] =
item
;
73
count
=
count
+ 1;
74
}
75
}
76
}
77
}
78
return
mapobj;
79
}
80
81
#endif
CSCDDUMap::ddu_map
CSCMap ddu_map
Definition:
CSCDDUMap.h:17
CSCDDUMapValues.h
edm::ValidityInterval
Definition:
ValidityInterval.h:28
CSCMapItem.h
CSCDDUMapValues::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Definition:
CSCDDUMapValues.cc:33
mps_fire.i
i
Definition:
mps_fire.py:429
CSCDDUMapRcd.h
DummyCfis.c
c
Definition:
DummyCfis.py:86
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
CSCDDUMapValues::~CSCDDUMapValues
~CSCDDUMapValues() override
Definition:
CSCDDUMapValues.cc:18
CSCDetId.h
Event.h
EventSetup.h
CSCDDUMapValues
Definition:
CSCDDUMapValues.h:22
CSCDDUMapValues::CSCDDUMapValues
CSCDDUMapValues(const edm::ParameterSet &)
Definition:
CSCDDUMapValues.cc:10
CSCDDUMapValues::ReturnType
std::unique_ptr< CSCDDUMap > ReturnType
Definition:
CSCDDUMapValues.h:27
B2GTnPMonitor_cfi.item
item
Definition:
B2GTnPMonitor_cfi.py:148
Frameworkfwd.h
ESProducer.h
edm::ESProducer
Definition:
ESProducer.h:104
ParameterSet.h
CSCDDUMap
Definition:
CSCDDUMap.h:9
CSCMapItem::MapItem
Definition:
CSCMapItem.h:13
ESHandle.h
submitPVResolutionJobs.count
count
Definition:
submitPVResolutionJobs.py:359
CSCMap1.h
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
genParticles_cff.map
map
Definition:
genParticles_cff.py:11
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
cscmap1
Definition:
CSCMap1.h:9
CSCDDUMapValues::fillDDUMap
static CSCDDUMap * fillDDUMap()
Definition:
CSCDDUMapValues.h:45
EventSetupRecordIntervalFinder.h
CSCDDUMapRcd
Definition:
CSCDDUMapRcd.h:5
edm::EventSetupRecordIntervalFinder
Definition:
EventSetupRecordIntervalFinder.h:33
SourceFactory.h
CSCDDUMapValues::produceDDUMap
CSCDDUMapValues::ReturnType produceDDUMap(const CSCDDUMapRcd &)
Definition:
CSCDDUMapValues.cc:28
edm::ParameterSet
Definition:
ParameterSet.h:48
MakerMacros.h
CSCDDUMap.h
dqmdumpme.k
k
Definition:
dqmdumpme.py:60
MainPageGenerator.l
l
Definition:
MainPageGenerator.py:429
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
Generated for CMSSW Reference Manual by
1.8.14