Main Page
Namespaces
Classes
Package Documentation
OnlineDB
CSCCondDB
interface
CSCCrateMapValues.h
Go to the documentation of this file.
1
#ifndef _CSCCRATEMAPVALUES_H
2
#define _CSCCRATEMAPVALUES_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/CSCCrateMap.h
"
17
#include "
CondFormats/DataRecord/interface/CSCCrateMapRcd.h
"
18
#include "
OnlineDB/CSCCondDB/interface/CSCCrateMapValues.h
"
19
#include "
CondFormats/CSCObjects/interface/CSCMapItem.h
"
20
#include "
OnlineDB/CSCCondDB/interface/CSCMap1.h
"
21
22
class
CSCCrateMapValues
:
public
edm::ESProducer
,
public
edm::EventSetupRecordIntervalFinder
{
23
public
:
24
CSCCrateMapValues
(
const
edm::ParameterSet
&);
25
~CSCCrateMapValues
();
26
27
inline
static
CSCCrateMap
*
fillCrateMap
();
28
29
typedef
const
CSCCrateMap
*
ReturnType
;
30
31
ReturnType
produceCrateMap
(
const
CSCCrateMapRcd
&);
32
33
private
:
34
// ----------member data ---------------------------
35
void
setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
&,
const
edm::IOVSyncValue
&,
edm::ValidityInterval
& );
36
CSCCrateMap
*
mapObj
;
37
38
};
39
40
#include<fstream>
41
#include<vector>
42
#include<iostream>
43
44
// to workaround plugin library
45
inline
CSCCrateMap
*
CSCCrateMapValues::fillCrateMap
()
46
{
47
CSCCrateMap
* mapobj =
new
CSCCrateMap
();
48
cscmap1
*
map
=
new
cscmap1
();
49
CSCMapItem::MapItem
item;
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
int
chamberid;
55
int
crate_cscid;
56
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
crate_cscid=item.
crateid
*10+item.
cscid
;
70
mapobj->
crate_map
[crate_cscid]=item;
71
count=count+1;
72
}
73
}
74
}
75
}
76
return
mapobj;
77
}
78
79
80
#endif
KineDebug3::count
void count()
Definition:
KinematicConstrainedVertexUpdatorT.h:20
edm::ValidityInterval
Definition:
ValidityInterval.h:28
CSCMapItem.h
mps_fire.i
i
Definition:
mps_fire.py:156
CSCDetId.h
CSCCrateMapValues::~CSCCrateMapValues
~CSCCrateMapValues()
Definition:
CSCCrateMapValues.cc:21
CSCCrateMap
Definition:
CSCCrateMap.h:11
Event.h
CSCCrateMapValues.h
CSCCrateMapValues::CSCCrateMapValues
CSCCrateMapValues(const edm::ParameterSet &)
Definition:
CSCCrateMapValues.cc:10
MakerMacros.h
EnergyCorrector.c
c
Definition:
EnergyCorrector.py:43
EventSetup.h
cscmap1::chamber
void chamber(int chamberid, CSCMapItem::MapItem *item)
Definition:
CSCMap1.cc:29
CSCCrateMapValues::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
Definition:
CSCCrateMapValues.cc:44
Frameworkfwd.h
edm::ESProducer
Definition:
ESProducer.h:97
ParameterSet.h
CSCMapItem::MapItem
Definition:
CSCMapItem.h:13
CSCCrateMapRcd
Definition:
CSCCrateMapRcd.h:5
CSCCrateMapValues::fillCrateMap
static CSCCrateMap * fillCrateMap()
Definition:
CSCCrateMapValues.h:45
CSCMapItem::MapItem::cscid
int cscid
Definition:
CSCMapItem.h:31
ESHandle.h
gen::k
int k[5][pyjets_maxn]
Definition:
Cascade2Hadronizer.cc:79
CSCMap1.h
alignCSCRings.r
r
Definition:
alignCSCRings.py:92
genParticles_cff.map
map
Definition:
genParticles_cff.py:11
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
cscmap1
Definition:
CSCMap1.h:9
CSCCrateMapValues::mapObj
CSCCrateMap * mapObj
Definition:
CSCCrateMapValues.h:36
ESProducer.h
EventSetupRecordIntervalFinder.h
edm::EventSetupRecordIntervalFinder
Definition:
EventSetupRecordIntervalFinder.h:33
checklumidiff.l
l
Definition:
checklumidiff.py:65
SourceFactory.h
CSCCrateMap::crate_map
CSCMap crate_map
Definition:
CSCCrateMap.h:25
edm::ParameterSet
Definition:
ParameterSet.h:36
CSCMapItem::MapItem::crateid
int crateid
Definition:
CSCMapItem.h:27
CSCCrateMapValues::ReturnType
const CSCCrateMap * ReturnType
Definition:
CSCCrateMapValues.h:29
CSCCrateMapValues::produceCrateMap
ReturnType produceCrateMap(const CSCCrateMapRcd &)
Definition:
CSCCrateMapValues.cc:36
CSCCrateMapRcd.h
CSCCrateMap.h
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
CSCCrateMapValues
Definition:
CSCCrateMapValues.h:22
Generated for CMSSW Reference Manual by
1.8.11