Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
();
26
27
inline
static
CSCDDUMap
*
fillDDUMap
();
28
29
typedef
const
CSCDDUMap
*
ReturnType
;
30
31
ReturnType
produceDDUMap
(
const
CSCDDUMapRcd
&);
32
33
private
:
34
// ----------member data ---------------------------
35
void
setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
&,
const
edm::IOVSyncValue
&,
edm::ValidityInterval
& );
36
CSCDDUMap
*
mapObj
;
37
38
};
39
40
#include<fstream>
41
#include<vector>
42
#include<iostream>
43
44
// to workaround plugin library
45
inline
CSCDDUMap
*
CSCDDUMapValues::fillDDUMap
()
46
{
47
CSCDDUMap
* mapobj =
new
CSCDDUMap
();
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
ddu_ddu_input;
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
r=2;
62
for
(k=1;k<=
r
;++
k
){
63
if
(j>1 && k==1) c=18;
64
else
c=36;
65
for
(l=1;l<=
c
;++
l
){
66
chamberid=i*100000+j*10000+k*1000+l*10;
67
map->
chamber
(chamberid,&item);
68
ddu_ddu_input=item.
ddu
*100+item.
ddu_input
;
69
mapobj->
ddu_map
[ddu_ddu_input]=item;
70
count=count+1;
71
}
72
}
73
}
74
}
75
return
mapobj;
76
}
77
78
79
#endif
CSCDDUMapValues::mapObj
CSCDDUMap * mapObj
Definition:
CSCDDUMapValues.h:36
i
int i
Definition:
DBlmapReader.cc:9
CSCDDUMap::ddu_map
CSCMap ddu_map
Definition:
CSCDDUMap.h:15
prof2calltree.count
list count
Definition:
prof2calltree.py:146
CSCDDUMapValues.h
edm::ValidityInterval
Definition:
ValidityInterval.h:28
CSCMapItem.h
CSCDDUMapRcd.h
csvReporter.r
tuple r
Definition:
csvReporter.py:25
CSCDetId.h
Event.h
CSCMapItem::MapItem::ddu
int ddu
Definition:
CSCMapItem.h:30
MakerMacros.h
EventSetup.h
CSCDDUMapValues
Definition:
CSCDDUMapValues.h:22
CSCDDUMapValues::ReturnType
const CSCDDUMap * ReturnType
Definition:
CSCDDUMapValues.h:29
cscmap1::chamber
void chamber(int chamberid, CSCMapItem::MapItem *item)
Definition:
CSCMap1.cc:29
CSCDDUMapValues::CSCDDUMapValues
CSCDDUMapValues(const edm::ParameterSet &)
Definition:
CSCDDUMapValues.cc:10
CSCMapItem::MapItem::ddu_input
int ddu_input
Definition:
CSCMapItem.h:31
Frameworkfwd.h
Association.map
dictionary map
Definition:
Association.py:160
edm::ESProducer
Definition:
ESProducer.h:97
ParameterSet.h
CSCDDUMap
Definition:
CSCDDUMap.h:7
CSCMapItem::MapItem
Definition:
CSCMapItem.h:11
CSCDDUMapValues::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
Definition:
CSCDDUMapValues.cc:44
ESHandle.h
j
int j
Definition:
DBlmapReader.cc:9
gen::k
int k[5][pyjets_maxn]
Definition:
Pythia6Hadronizer.cc:86
CSCMap1.h
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
cscmap1
Definition:
CSCMap1.h:9
CSCDDUMapValues::fillDDUMap
static CSCDDUMap * fillDDUMap()
Definition:
CSCDDUMapValues.h:45
prof2calltree.l
tuple l
Definition:
prof2calltree.py:116
trackerHits.c
tuple c
Definition:
trackerHits.py:26
ESProducer.h
EventSetupRecordIntervalFinder.h
CSCDDUMapRcd
Definition:
CSCDDUMapRcd.h:5
edm::EventSetupRecordIntervalFinder
Definition:
EventSetupRecordIntervalFinder.h:34
SourceFactory.h
CSCDDUMapValues::produceDDUMap
ReturnType produceDDUMap(const CSCDDUMapRcd &)
Definition:
CSCDDUMapValues.cc:36
edm::ParameterSet
Definition:
ParameterSet.h:31
CSCDDUMap.h
CSCDDUMapValues::~CSCDDUMapValues
~CSCDDUMapValues()
Definition:
CSCDDUMapValues.cc:21
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
Generated for CMSSW Reference Manual by
1.8.5