OnlineDB
CSCCondDB
interface
CSCChamberIndexValues.h
Go to the documentation of this file.
1
#ifndef _CSCCHAMBERINDEXVALUES_H
2
#define _CSCCHAMBERINDEXVALUES_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/CSCChamberIndex.h
"
17
#include "
CondFormats/DataRecord/interface/CSCChamberIndexRcd.h
"
18
#include "
OnlineDB/CSCCondDB/interface/CSCChamberIndexValues.h
"
19
#include "
CondFormats/CSCObjects/interface/CSCMapItem.h
"
20
#include "
OnlineDB/CSCCondDB/interface/CSCMap1.h
"
21
22
class
CSCChamberIndexValues
:
public
edm::ESProducer
,
public
edm::EventSetupRecordIntervalFinder
{
23
public
:
24
CSCChamberIndexValues
(
const
edm::ParameterSet
&);
25
~CSCChamberIndexValues
()
override
;
26
27
typedef
std::unique_ptr<CSCChamberIndex>
ReturnType
;
28
29
inline
static
CSCChamberIndex
*
fillChamberIndex
();
30
31
ReturnType
produceChamberIndex
(
const
CSCChamberIndexRcd
&);
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
CSCChamberIndex
*
CSCChamberIndexValues::fillChamberIndex
() {
46
CSCChamberIndex
*mapobj =
new
CSCChamberIndex
();
47
cscmap1
map
;
48
CSCMapItem::MapItem
item
;
49
int
chamberid;
50
51
int
i
,
j
,
k
,
l
;
//i - endcap, j - station, k - ring, l - chamber.
52
int
r
,
c
;
//r - number of rings, c - number of chambers.
53
int
count
= 0;
54
55
mapobj->
ch_index
.resize(540);
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 if(j==4) r=1;
62
else
63
r
= 2;
64
for
(
k
= 1;
k
<=
r
; ++
k
) {
65
if
(
j
> 1 &&
k
== 1)
66
c
= 18;
67
else
68
c
= 36;
69
for
(
l
= 1;
l
<=
c
; ++
l
) {
70
chamberid =
i
* 100000 +
j
* 10000 +
k
* 1000 +
l
* 10;
71
map
.chamber(chamberid, &
item
);
72
mapobj->
ch_index
[
item
.cscIndex - 1] =
item
;
73
count
=
count
+ 1;
74
}
75
}
76
}
77
}
78
return
mapobj;
79
}
80
81
#endif
mps_fire.i
i
Definition:
mps_fire.py:428
ESHandle.h
CSCChamberIndex::ch_index
CSCVector ch_index
Definition:
CSCChamberIndex.h:17
CSCChamberIndexValues
Definition:
CSCChamberIndexValues.h:22
CSCChamberIndexValues::fillChamberIndex
static CSCChamberIndex * fillChamberIndex()
Definition:
CSCChamberIndexValues.h:45
edm::ValidityInterval
Definition:
ValidityInterval.h:28
ESProducer.h
edm::EventSetupRecordIntervalFinder
Definition:
EventSetupRecordIntervalFinder.h:33
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
CSCDetId.h
MakerMacros.h
CSCChamberIndex.h
CSCMapItem.h
CSCChamberIndex
Definition:
CSCChamberIndex.h:9
submitPVResolutionJobs.count
count
Definition:
submitPVResolutionJobs.py:352
dqmdumpme.k
k
Definition:
dqmdumpme.py:60
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
EventSetupRecordIntervalFinder.h
CSCChamberIndexRcd.h
SourceFactory.h
CSCMapItem::MapItem
Definition:
CSCMapItem.h:13
CSCChamberIndexValues::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Definition:
CSCChamberIndexValues.cc:33
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
cscmap1
Definition:
CSCMap1.h:9
CSCChamberIndexValues::ReturnType
std::unique_ptr< CSCChamberIndex > ReturnType
Definition:
CSCChamberIndexValues.h:27
B2GTnPMonitor_cfi.item
item
Definition:
B2GTnPMonitor_cfi.py:147
CSCChamberIndexValues::produceChamberIndex
ReturnType produceChamberIndex(const CSCChamberIndexRcd &)
Definition:
CSCChamberIndexValues.cc:28
cmsLHEtoEOSManager.l
l
Definition:
cmsLHEtoEOSManager.py:204
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
Frameworkfwd.h
EventSetup.h
CSCChamberIndexValues::~CSCChamberIndexValues
~CSCChamberIndexValues() override
Definition:
CSCChamberIndexValues.cc:18
CSCChamberIndexValues::CSCChamberIndexValues
CSCChamberIndexValues(const edm::ParameterSet &)
Definition:
CSCChamberIndexValues.cc:10
edm::ESProducer
Definition:
ESProducer.h:104
CSCChamberIndexRcd
Definition:
CSCChamberIndexRcd.h:5
genParticles_cff.map
map
Definition:
genParticles_cff.py:11
ParameterSet.h
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:46
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
CSCChamberIndexValues.h
CSCMap1.h
Generated for CMSSW Reference Manual by
1.8.16