Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
EventFilter
CSCRawToDigi
plugins
DigiAnalyzer.cc
Go to the documentation of this file.
1
7
#include "
DataFormats/CSCDigi/interface/CSCWireDigiCollection.h
"
8
#include "
EventFilter/CSCRawToDigi/interface/DigiAnalyzer.h
"
9
#include "
DataFormats/CSCDigi/interface/CSCWireDigi.h
"
10
#include "
DataFormats/CSCDigi/interface/CSCStripDigi.h
"
11
#include "
DataFormats/CSCDigi/interface/CSCStripDigiCollection.h
"
12
#include "
DataFormats/CSCDigi/interface/CSCComparatorDigiCollection.h
"
13
#include "
DataFormats/CSCDigi/interface/CSCALCTDigiCollection.h
"
14
#include "
DataFormats/CSCDigi/interface/CSCDDUStatusDigiCollection.h
"
15
#include "
DataFormats/CSCDigi/interface/CSCCLCTDigiCollection.h
"
16
#include "
DataFormats/CSCDigi/interface/CSCRPCDigiCollection.h
"
17
#include "
DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h
"
18
#include "
DataFormats/CSCDigi/interface/CSCDCCFormatStatusDigiCollection.h
"
19
20
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
21
22
DigiAnalyzer::DigiAnalyzer
(
edm::ParameterSet
const
&
conf
) {
23
24
// If your module takes parameters, here is where you would define
25
// their names and types, and access them to initialize internal
26
// variables. Example as follows:
27
//
28
eventNumber
= 0;
29
}
30
31
void
DigiAnalyzer::analyze
(
edm::Event
const
&
e
,
edm::EventSetup
const
& iSetup) {
32
33
// These declarations create handles to the types of records that you want
34
// to retrieve from event "e".
35
//
36
edm::Handle<CSCWireDigiCollection>
wires;
37
edm::Handle<CSCStripDigiCollection>
strips
;
38
edm::Handle<CSCComparatorDigiCollection>
comparators;
39
edm::Handle<CSCALCTDigiCollection>
alcts;
40
edm::Handle<CSCCLCTDigiCollection>
clcts;
41
edm::Handle<CSCRPCDigiCollection>
rpcs;
42
edm::Handle<CSCCorrelatedLCTDigiCollection>
correlatedlcts;
43
edm::Handle<CSCDDUStatusDigiCollection>
dduStatusDigi;
44
edm::Handle<CSCDCCFormatStatusDigiCollection>
formatStatusDigi;
45
46
// Pass the handle to the method "getByType", which is used to retrieve
47
// one and only one instance of the type in question out of event "e". If
48
// zero or more than one instance exists in the event an exception is thrown.
49
//
50
51
// e.getByLabel("muonCSCDigis","MuonCSCDDUStatusDigi", dduStatusDigi);
52
// e.getByLabel("muonCSCDigis","MuonCSCWireDigi",wires);
53
// e.getByLabel("muonCSCDigis","MuonCSCStripDigi",strips);
54
// e.getByLabel("muonCSCDigis","MuonCSCComparatorDigi",comparators);
55
//e.getByLabel("muonCSCDigis","MuonCSCALCTDigi",alcts);
56
// e.getByLabel("muonCSCDigis","MuonCSCCLCTDigi",clcts);
57
// e.getByLabel("muonCSCDigis","MuonCSCRPCDigi",rpcs);
58
//e.getByLabel("muonCSCDigis","MuonCSCCorrelatedLCTDigi",correlatedlcts);
59
e.
getByLabel
(
"muonCSCDigis"
,
"MuonCSCDCCFormatStatusDigi"
,formatStatusDigi);
60
61
62
// read digi collections and print digis
63
//
64
65
for
(
CSCDCCFormatStatusDigiCollection::DigiRangeIterator
j
=formatStatusDigi->begin();
j
!=formatStatusDigi->end();
j
++) {
66
std::vector<CSCDCCFormatStatusDigi>::const_iterator digiItr = (*j).second.first;
67
std::vector<CSCDCCFormatStatusDigi>::const_iterator
last
= (*j).second.second;
68
for
( ; digiItr !=
last
; ++digiItr) {
69
digiItr->print();
70
}
71
}
72
73
74
/*for (CSCDDUStatusDigiCollection::DigiRangeIterator j=dduStatusDigi->begin(); j!=dduStatusDigi->end(); j++) {
75
std::vector<CSCDDUStatusDigi>::const_iterator digiItr = (*j).second.first;
76
std::vector<CSCDDUStatusDigi>::const_iterator last = (*j).second.second;
77
for( ; digiItr != last; ++digiItr) {
78
CSCDDUHeader header(*digiItr);
79
std::cout <<"L1 number = " << header.lvl1num() << std::endl;
80
std::cout <<"DDU number = " << header.source_id() << std::endl;
81
}
82
}
83
*/
84
/*
85
for (CSCStripDigiCollection::DigiRangeIterator j=strips->begin(); j!=strips->end(); j++) {
86
std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
87
CSCDetId const cscDetId=(*j).first;
88
std::cout<<cscDetId<<std::endl;
89
std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
90
for( ; digiItr != last; ++digiItr) {
91
digiItr->print();
92
}
93
}
94
95
96
for (CSCWireDigiCollection::DigiRangeIterator j=wires->begin(); j!=wires->end(); j++) {
97
CSCDetId const cscDetId=(*j).first;
98
std::cout<<cscDetId<<std::endl;
99
std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
100
std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
101
for( ; digiItr != last; ++digiItr) {
102
digiItr->print();
103
}
104
}
105
*/
106
107
108
/*
109
for (CSCComparatorDigiCollection::DigiRangeIterator j=comparators->begin(); j!=comparators->end(); j++) {
110
111
std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
112
std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
113
for( ; digiItr != last; ++digiItr) {
114
digiItr->print();
115
}
116
}
117
118
119
120
for (CSCALCTDigiCollection::DigiRangeIterator j=alcts->begin(); j!=alcts->end(); j++) {
121
122
std::vector<CSCALCTDigi>::const_iterator digiItr = (*j).second.first;
123
std::vector<CSCALCTDigi>::const_iterator last = (*j).second.second;
124
for( ; digiItr != last; ++digiItr) {
125
digiItr->print();
126
}
127
}
128
129
130
for (CSCCLCTDigiCollection::DigiRangeIterator j=clcts->begin(); j!=clcts->end(); j++) {
131
132
std::vector<CSCCLCTDigi>::const_iterator digiItr = (*j).second.first;
133
std::vector<CSCCLCTDigi>::const_iterator last = (*j).second.second;
134
for( ; digiItr != last; ++digiItr) {
135
digiItr->print();
136
}
137
}
138
139
140
141
for (CSCRPCDigiCollection::DigiRangeIterator j=rpcs->begin(); j!=rpcs->end(); j++) {
142
143
std::vector<CSCRPCDigi>::const_iterator digiItr = (*j).second.first;
144
std::vector<CSCRPCDigi>::const_iterator last = (*j).second.second;
145
for( ; digiItr != last; ++digiItr) {
146
digiItr->print();
147
}
148
}
149
150
151
for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j=correlatedlcts->begin(); j!=correlatedlcts->end(); j++) {
152
153
std::vector<CSCCorrelatedLCTDigi>::const_iterator digiItr = (*j).second.first;
154
std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
155
for( ; digiItr != last; ++digiItr) {
156
digiItr->print();
157
}
158
}
159
160
*/
161
162
eventNumber
++;
163
edm::LogInfo
(
"DigiAnalyzer"
) <<
"end of event number "
<<
eventNumber
;
164
165
166
167
}
168
169
170
171
172
CSCStripDigiCollection.h
CSCDCCFormatStatusDigiCollection.h
MessageLogger.h
CSCWireDigi.h
CSCRPCDigiCollection.h
DigiAnalyzer::analyze
virtual void analyze(edm::Event const &e, edm::EventSetup const &iSetup)
Definition:
DigiAnalyzer.cc:31
edm::Handle
Definition:
AssociativeIterator.h:48
DigiContainerIterator
Definition:
MuonDigiCollection.h:32
DigiAnalyzer::eventNumber
int eventNumber
Definition:
DigiAnalyzer.h:24
CSCComparatorDigiCollection.h
j
int j
Definition:
DBlmapReader.cc:9
edm::EventSetup
Definition:
EventSetup.h:44
CSCCorrelatedLCTDigiCollection.h
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition:
Event.h:356
dbtoconf.conf
tuple conf
Definition:
dbtoconf.py:185
edm::LogInfo
Definition:
MessageLogger.h:214
prof2calltree.last
tuple last
Definition:
prof2calltree.py:122
CSCStripDigi.h
alignCSCRings.e
list e
Definition:
alignCSCRings.py:90
DigiAnalyzer.h
CSCWireDigiCollection.h
CSCDDUStatusDigiCollection.h
CSCALCTDigiCollection.h
CSCCLCTDigiCollection.h
DigiAnalyzer::DigiAnalyzer
DigiAnalyzer(edm::ParameterSet const &conf)
Definition:
DigiAnalyzer.cc:22
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:50
RecoTauPiZeroBuilderPlugins_cfi.strips
tuple strips
Definition:
RecoTauPiZeroBuilderPlugins_cfi.py:34
Generated for CMSSW Reference Manual by
1.8.5