CMS 3D CMS Logo

CSCViewDigi.cc
Go to the documentation of this file.
1 // Original Author: Alexandre Sakharov
2 // Created: Sun May 10 15:43:28 CEST 2009
3 
4 #include <memory>
5 #include <iostream>
6 
13 
25 
26 class CSCViewDigi : public edm::EDAnalyzer {
27 public:
28  explicit CSCViewDigi(const edm::ParameterSet&);
29  ~CSCViewDigi() override;
30 
31 private:
32  void analyze(const edm::Event&, const edm::EventSetup&) override;
33  void endJob() override;
34 
38 
49 };
50 
52  wd_token = consumes<CSCWireDigiCollection>(conf.getParameter<edm::InputTag>("wireDigiTag"));
53  sd_token = consumes<CSCStripDigiCollection>(conf.getParameter<edm::InputTag>("stripDigiTag"));
54  cd_token = consumes<CSCComparatorDigiCollection>(conf.getParameter<edm::InputTag>("comparatorDigiTag"));
55  rd_token = consumes<CSCRPCDigiCollection>(conf.getParameter<edm::InputTag>("rpcDigiTag"));
56  al_token = consumes<CSCALCTDigiCollection>(conf.getParameter<edm::InputTag>("alctDigiTag"));
57  cl_token = consumes<CSCCLCTDigiCollection>(conf.getParameter<edm::InputTag>("clctDigiTag"));
58  co_token = consumes<CSCCorrelatedLCTDigiCollection>(conf.getParameter<edm::InputTag>("corrclctDigiTag"));
59  st_token = consumes<CSCDCCFormatStatusDigiCollection>(conf.getParameter<edm::InputTag>("statusDigiTag"));
60  dd_token = consumes<CSCDDUStatusDigiCollection>(conf.getParameter<edm::InputTag>("DDUstatusDigiTag"));
61  dc_token = consumes<CSCDCCStatusDigiCollection>(conf.getParameter<edm::InputTag>("DCCstatusDigiTag"));
62 
63  WiresDigiDump = conf.getUntrackedParameter<bool>("WiresDigiDump", false);
64  StripDigiDump = conf.getUntrackedParameter<bool>("StripDigiDump", false);
65  ComparatorDigiDump = conf.getUntrackedParameter<bool>("ComparatorDigiDump", false);
66  RpcDigiDump = conf.getUntrackedParameter<bool>("RpcDigiDump", false);
67  AlctDigiDump = conf.getUntrackedParameter<bool>("AlctDigiDump", false);
68  ClctDigiDump = conf.getUntrackedParameter<bool>("ClctDigiDump", false);
69  CorrClctDigiDump = conf.getUntrackedParameter<bool>("CorrClctDigiDump", false);
70  StatusDigiDump = conf.getUntrackedParameter<bool>("StatusDigiDump", false);
71  DDUStatusDigiDump = conf.getUntrackedParameter<bool>("DDUStatus", false);
72  DCCStatusDigiDump = conf.getUntrackedParameter<bool>("DCCStatus", false);
73 }
74 
76 
78  using namespace edm;
79 
90 
91  iEvent.getByToken(wd_token, wires);
92  iEvent.getByToken(sd_token, strips);
93  iEvent.getByToken(cd_token, comparators);
94  iEvent.getByToken(rd_token, rpcs);
95  iEvent.getByToken(al_token, alcts);
96  iEvent.getByToken(cl_token, clcts);
97  iEvent.getByToken(co_token, correlatedlcts);
98 
99  if (StatusDigiDump)
100  iEvent.getByToken(st_token, statusdigis);
101 
102  if (DDUStatusDigiDump)
103  iEvent.getByToken(dd_token, DDUstatusdigi);
104 
105  if (DCCStatusDigiDump)
106  iEvent.getByToken(dc_token, DCCstatusdigi);
107 
108  if (WiresDigiDump) {
109  std::cout << std::endl;
110  std::cout << "Event " << iEvent.id() << std::endl;
111  std::cout << std::endl;
112  std::cout << "********WIRES Digis********" << std::endl;
113  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin(); j != wires->end(); j++) {
114  std::cout << "Wire digis from " << CSCDetId((*j).first) << std::endl;
115  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
116  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
117  for (; digiItr != last; ++digiItr) {
118  digiItr->print();
119  }
120  }
121  }
122 
123  if (StripDigiDump) {
124  std::cout << std::endl;
125  std::cout << "Event " << iEvent.id() << std::endl;
126  std::cout << std::endl;
127  std::cout << "********STRIPS Digis********" << std::endl;
128  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin(); j != strips->end(); j++) {
129  std::cout << "Strip digis from " << CSCDetId((*j).first) << std::endl;
130  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
131  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
132  for (; digiItr != last; ++digiItr) {
133  digiItr->print();
134  }
135  }
136  }
137 
138  if (ComparatorDigiDump) {
139  std::cout << std::endl;
140  std::cout << "Event " << iEvent.id() << std::endl;
141  std::cout << std::endl;
142  std::cout << "********COMPARATOR Digis********" << std::endl;
143  for (CSCComparatorDigiCollection::DigiRangeIterator j = comparators->begin(); j != comparators->end(); j++) {
144  std::cout << "Comparator digis from " << CSCDetId((*j).first) << std::endl;
145  std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
146  std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
147  for (; digiItr != last; ++digiItr) {
148  digiItr->print();
149  }
150  }
151  }
152 
153  if (RpcDigiDump) {
154  std::cout << std::endl;
155  std::cout << "Event " << iEvent.id() << std::endl;
156  std::cout << std::endl;
157  std::cout << "********RPC Digis********" << std::endl;
158  for (CSCRPCDigiCollection::DigiRangeIterator j = rpcs->begin(); j != rpcs->end(); j++) {
159  std::cout << "RPC digis from " << CSCDetId((*j).first) << std::endl;
160  std::vector<CSCRPCDigi>::const_iterator digiItr = (*j).second.first;
161  std::vector<CSCRPCDigi>::const_iterator last = (*j).second.second;
162  for (; digiItr != last; ++digiItr) {
163  digiItr->print();
164  }
165  }
166  }
167 
168  if (AlctDigiDump) {
169  std::cout << std::endl;
170  std::cout << "Event " << iEvent.id() << std::endl;
171  std::cout << std::endl;
172  std::cout << "********ALCT Digis********" << std::endl;
173  for (CSCALCTDigiCollection::DigiRangeIterator j = alcts->begin(); j != alcts->end(); j++) {
174  std::vector<CSCALCTDigi>::const_iterator digiItr = (*j).second.first;
175  std::vector<CSCALCTDigi>::const_iterator last = (*j).second.second;
176  for (; digiItr != last; ++digiItr) {
177  digiItr->print();
178  }
179  }
180  }
181 
182  if (ClctDigiDump) {
183  std::cout << std::endl;
184  std::cout << "Event " << iEvent.id() << std::endl;
185  std::cout << std::endl;
186  std::cout << "********CLCT Digis********" << std::endl;
187  for (CSCCLCTDigiCollection::DigiRangeIterator j = clcts->begin(); j != clcts->end(); j++) {
188  std::vector<CSCCLCTDigi>::const_iterator digiItr = (*j).second.first;
189  std::vector<CSCCLCTDigi>::const_iterator last = (*j).second.second;
190  for (; digiItr != last; ++digiItr) {
191  digiItr->print();
192  }
193  }
194  }
195 
196  if (CorrClctDigiDump) {
197  std::cout << std::endl;
198  std::cout << "Event " << iEvent.id() << std::endl;
199  std::cout << std::endl;
200  std::cout << "********CorrelatedLCT Digis********" << std::endl;
201  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j = correlatedlcts->begin(); j != correlatedlcts->end();
202  j++) {
203  std::vector<CSCCorrelatedLCTDigi>::const_iterator digiItr = (*j).second.first;
204  std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
205  for (; digiItr != last; ++digiItr) {
206  digiItr->print();
207  }
208  }
209  }
210 
211  if (StatusDigiDump) {
212  std::cout << std::endl;
213  std::cout << "Event " << iEvent.id() << std::endl;
214  std::cout << std::endl;
215  std::cout << "********STATUS Digis********" << std::endl;
216  for (CSCDCCFormatStatusDigiCollection::DigiRangeIterator j = statusdigis->begin(); j != statusdigis->end(); j++) {
217  std::vector<CSCDCCFormatStatusDigi>::const_iterator digiItr = (*j).second.first;
218  std::vector<CSCDCCFormatStatusDigi>::const_iterator last = (*j).second.second;
219  for (; digiItr != last; ++digiItr) {
220  digiItr->print();
221  }
222  }
223  }
224 
225  if (DDUStatusDigiDump) {
226  std::cout << std::endl;
227  std::cout << "Event " << iEvent.id() << std::endl;
228  std::cout << std::endl;
229  std::cout << "********DDU STATUS Digis********" << std::endl;
230  for (CSCDDUStatusDigiCollection::DigiRangeIterator j = DDUstatusdigi->begin(); j != DDUstatusdigi->end(); j++) {
231  std::vector<CSCDDUStatusDigi>::const_iterator digiItr = (*j).second.first;
232  std::vector<CSCDDUStatusDigi>::const_iterator last = (*j).second.second;
233  for (; digiItr != last; ++digiItr) {
234  digiItr->print();
235  }
236  }
237  }
238 
239  if (DCCStatusDigiDump) {
240  std::cout << std::endl;
241  std::cout << "Event " << iEvent.id() << std::endl;
242  std::cout << std::endl;
243  std::cout << "********DCC STATUS Digis********" << std::endl;
244  for (CSCDCCStatusDigiCollection::DigiRangeIterator j = DCCstatusdigi->begin(); j != DCCstatusdigi->end(); j++) {
245  std::vector<CSCDCCStatusDigi>::const_iterator digiItr = (*j).second.first;
246  std::vector<CSCDCCStatusDigi>::const_iterator last = (*j).second.second;
247  for (; digiItr != last; ++digiItr) {
248  digiItr->print();
249  }
250  }
251  }
252 
253 #ifdef THIS_IS_AN_EVENT_EXAMPLE
255  iEvent.getByLabel("example", pIn);
256 #endif
257 
258 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
259  ESHandle<SetupData> pSetup;
260  iSetup.get<SetupRecord>().get(pSetup);
261 #endif
262 }
263 
264 // ------------ method called once each job just after ending the event loop ------------
266 
267 //define this as a plug-in
CSCViewDigi::al_token
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
Definition: CSCViewDigi.cc:43
CSCViewDigi::rd_token
edm::EDGetTokenT< CSCRPCDigiCollection > rd_token
Definition: CSCViewDigi.cc:42
CSCViewDigi::RpcDigiDump
bool RpcDigiDump
Definition: CSCViewDigi.cc:36
CSCCorrelatedLCTDigiCollection.h
CSCALCTHeader.h
CSCViewDigi::~CSCViewDigi
~CSCViewDigi() override
Definition: CSCViewDigi.cc:75
CSCViewDigi::CorrClctDigiDump
bool CorrClctDigiDump
Definition: CSCViewDigi.cc:35
CSCViewDigi::CSCViewDigi
CSCViewDigi(const edm::ParameterSet &)
Definition: CSCViewDigi.cc:51
CSCViewDigi::StatusDigiDump
bool StatusDigiDump
Definition: CSCViewDigi.cc:36
edm::EDGetTokenT< CSCWireDigiCollection >
edm
HLT enums.
Definition: AlignableModifier.h:19
DigiDM_cff.wires
wires
Definition: DigiDM_cff.py:33
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CSCViewDigi::co_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
Definition: CSCViewDigi.cc:45
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EDAnalyzer.h
CSCViewDigi::WiresDigiDump
bool WiresDigiDump
Definition: CSCViewDigi.cc:35
CSCViewDigi::ClctDigiDump
bool ClctDigiDump
Definition: CSCViewDigi.cc:35
edm::Handle< CSCWireDigiCollection >
CSCViewDigi::cd_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
Definition: CSCViewDigi.cc:41
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MakerMacros.h
dqmdumpme.last
last
Definition: dqmdumpme.py:56
CSCRPCDigiCollection.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
CSCDCCStatusDigiCollection.h
edm::ESHandle
Definition: DTSurvey.h:22
CSCViewDigi::ComparatorDigiDump
bool ComparatorDigiDump
Definition: CSCViewDigi.cc:36
CSCViewDigi::DCCStatusDigiDump
bool DCCStatusDigiDump
Definition: CSCViewDigi.cc:37
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
CSCViewDigi::cl_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
Definition: CSCViewDigi.cc:44
CSCDetId
Definition: CSCDetId.h:26
CSCViewDigi::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CSCViewDigi.cc:77
CSCViewDigi
Definition: CSCViewDigi.cc:26
CSCViewDigi::st_token
edm::EDGetTokenT< CSCDCCFormatStatusDigiCollection > st_token
Definition: CSCViewDigi.cc:46
iEvent
int iEvent
Definition: GenABIO.cc:224
CSCViewDigi::dd_token
edm::EDGetTokenT< CSCDDUStatusDigiCollection > dd_token
Definition: CSCViewDigi.cc:47
CSCViewDigi::endJob
void endJob() override
Definition: CSCViewDigi.cc:265
CSCStripDigiCollection.h
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
CSCViewDigi::dc_token
edm::EDGetTokenT< CSCDCCStatusDigiCollection > dc_token
Definition: CSCViewDigi.cc:48
Frameworkfwd.h
CSCViewDigi::AlctDigiDump
bool AlctDigiDump
Definition: CSCViewDigi.cc:35
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CSCComparatorDigiCollection.h
CSCWireDigiCollection.h
CSCALCTDigiCollection.h
ConsumesCollector.h
ParameterSet.h
CSCCLCTDigiCollection.h
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
CSCViewDigi::StripDigiDump
bool StripDigiDump
Definition: CSCViewDigi.cc:36
CSCDDUStatusDigiCollection.h
DigiContainerIterator
Definition: MuonDigiCollection.h:30
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
DigiDM_cff.strips
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
Definition: DigiDM_cff.py:32
CSCViewDigi::DDUStatusDigiDump
bool DDUStatusDigiDump
Definition: CSCViewDigi.cc:37
CSCViewDigi::wd_token
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
Definition: CSCViewDigi.cc:39
CSCViewDigi::sd_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: CSCViewDigi.cc:40
CSCDCCFormatStatusDigiCollection.h