Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
();
26
27
inline
static
CSCChamberIndex
*
fillChamberIndex
();
28
29
typedef
const
CSCChamberIndex
*
ReturnType
;
30
31
ReturnType
produceChamberIndex
(
const
CSCChamberIndexRcd
&);
32
33
private
:
34
// ----------member data ---------------------------
35
void
setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
&,
const
edm::IOVSyncValue
&,
edm::ValidityInterval
& );
36
CSCChamberIndex
*
mapObj
;
37
38
};
39
40
#include<fstream>
41
#include<vector>
42
#include<iostream>
43
44
// to workaround plugin library
45
inline
CSCChamberIndex
*
CSCChamberIndexValues::fillChamberIndex
()
46
{
47
CSCChamberIndex
* mapobj =
new
CSCChamberIndex
();
48
cscmap1
*
map
=
new
cscmap1
();
49
CSCMapItem::MapItem
item;
50
int
chamberid;
51
52
int
i
,
j
,
k
,
l
;
//i - endcap, j - station, k - ring, l - chamber.
53
int
r
,
c
;
//r - number of rings, c - number of chambers.
54
int
count
=0;
55
56
mapobj->
ch_index
.resize(540);
57
/* This is version for 540 chambers. */
58
for
(i=1;i<=2;++
i
){
59
for
(j=1;j<=4;++
j
){
60
if
(j==1) r=3;
61
//else if(j==4) r=1;
62
else
r=2;
63
for
(k=1;k<=
r
;++
k
){
64
if
(j>1 && k==1) c=18;
65
else
c=36;
66
for
(l=1;l<=
c
;++
l
){
67
chamberid=i*100000+j*10000+k*1000+l*10;
68
map->
chamber
(chamberid,&item);
69
mapobj->
ch_index
[item.
cscIndex
-1]=item;
70
count=count+1;
71
}
72
}
73
}
74
}
75
return
mapobj;
76
}
77
78
#endif
CSCChamberIndexValues::~CSCChamberIndexValues
~CSCChamberIndexValues()
Definition:
CSCChamberIndexValues.cc:21
i
int i
Definition:
DBlmapReader.cc:9
CSCChamberIndex.h
prof2calltree.count
list count
Definition:
prof2calltree.py:146
edm::ValidityInterval
Definition:
ValidityInterval.h:28
CSCMapItem.h
CSCChamberIndexValues::produceChamberIndex
ReturnType produceChamberIndex(const CSCChamberIndexRcd &)
Definition:
CSCChamberIndexValues.cc:36
CSCDetId.h
CSCChamberIndexValues::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
Definition:
CSCChamberIndexValues.cc:44
Event.h
MakerMacros.h
EventSetup.h
CSCChamberIndexValues
Definition:
CSCChamberIndexValues.h:22
CSCChamberIndex::ch_index
CSCVector ch_index
Definition:
CSCChamberIndex.h:17
cscmap1::chamber
void chamber(int chamberid, CSCMapItem::MapItem *item)
Definition:
CSCMap1.cc:29
EnergyCorrector.c
tuple c
Definition:
EnergyCorrector.py:43
CSCChamberIndexRcd.h
CSCChamberIndexValues::mapObj
CSCChamberIndex * mapObj
Definition:
CSCChamberIndexValues.h:36
Frameworkfwd.h
edm::ESProducer
Definition:
ESProducer.h:97
CSCMapItem::MapItem::cscIndex
int cscIndex
Definition:
CSCMapItem.h:20
ParameterSet.h
CSCChamberIndexValues::CSCChamberIndexValues
CSCChamberIndexValues(const edm::ParameterSet &)
Definition:
CSCChamberIndexValues.cc:10
CSCMapItem::MapItem
Definition:
CSCMapItem.h:13
python.multivaluedict.map
def map
Definition:
multivaluedict.py:125
ESHandle.h
j
int j
Definition:
DBlmapReader.cc:9
CSCChamberIndexValues.h
CSCChamberIndexValues::ReturnType
const CSCChamberIndex * ReturnType
Definition:
CSCChamberIndexValues.h:29
CSCChamberIndex
Definition:
CSCChamberIndex.h:9
CSCMap1.h
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
cscmap1
Definition:
CSCMap1.h:9
prof2calltree.l
tuple l
Definition:
prof2calltree.py:116
ESProducer.h
EventSetupRecordIntervalFinder.h
edm::EventSetupRecordIntervalFinder
Definition:
EventSetupRecordIntervalFinder.h:33
CSCChamberIndexValues::fillChamberIndex
static CSCChamberIndex * fillChamberIndex()
Definition:
CSCChamberIndexValues.h:45
SourceFactory.h
alignCSCRings.r
list r
Definition:
alignCSCRings.py:92
edm::ParameterSet
Definition:
ParameterSet.h:35
CSCChamberIndexRcd
Definition:
CSCChamberIndexRcd.h:5
relval_steps.k
list k
Definition:
relval_steps.py:1469
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
Generated for CMSSW Reference Manual by
1.8.5