CMS 3D CMS Logo

CSCViewDigi.cc
Go to the documentation of this file.
1 
7 // Original Author: Alexandre Sakharov
8 // Created: Sun May 10 15:43:28 CEST 2009
10 #include <iostream>
11 
13  wd_token = consumes<CSCWireDigiCollection>(conf.getParameter<edm::InputTag>("wireDigiTag"));
14  sd_token = consumes<CSCStripDigiCollection>(conf.getParameter<edm::InputTag>("stripDigiTag"));
15  cd_token = consumes<CSCComparatorDigiCollection>(conf.getParameter<edm::InputTag>("comparatorDigiTag"));
16  rd_token = consumes<CSCRPCDigiCollection>(conf.getParameter<edm::InputTag>("rpcDigiTag"));
17  al_token = consumes<CSCALCTDigiCollection>(conf.getParameter<edm::InputTag>("alctDigiTag"));
18  cl_token = consumes<CSCCLCTDigiCollection>(conf.getParameter<edm::InputTag>("clctDigiTag"));
19  co_token = consumes<CSCCorrelatedLCTDigiCollection>(conf.getParameter<edm::InputTag>("corrclctDigiTag"));
20  st_token = consumes<CSCDCCFormatStatusDigiCollection>(conf.getParameter<edm::InputTag>("statusDigiTag"));
21  dd_token = consumes<CSCDDUStatusDigiCollection>(conf.getParameter<edm::InputTag>("DDUstatusDigiTag"));
22  dc_token = consumes<CSCDCCStatusDigiCollection>(conf.getParameter<edm::InputTag>("DCCstatusDigiTag"));
23 
24  WiresDigiDump = conf.getUntrackedParameter<bool>("WiresDigiDump", false);
25  StripDigiDump = conf.getUntrackedParameter<bool>("StripDigiDump", false);
26  ComparatorDigiDump = conf.getUntrackedParameter<bool>("ComparatorDigiDump", false);
27  RpcDigiDump = conf.getUntrackedParameter<bool>("RpcDigiDump", false);
28  AlctDigiDump = conf.getUntrackedParameter<bool>("AlctDigiDump", false);
29  ClctDigiDump = conf.getUntrackedParameter<bool>("ClctDigiDump", false);
30  CorrClctDigiDump = conf.getUntrackedParameter<bool>("CorrClctDigiDump", false);
31  StatusDigiDump = conf.getUntrackedParameter<bool>("StatusDigiDump", false);
32  DDUStatusDigiDump = conf.getUntrackedParameter<bool>("DDUStatus", false);
33  DCCStatusDigiDump = conf.getUntrackedParameter<bool>("DCCStatus", false);
34 }
35 
37 
39  using namespace edm;
40 
51 
52  iEvent.getByToken(wd_token, wires);
53  iEvent.getByToken(sd_token, strips);
54  iEvent.getByToken(cd_token, comparators);
55  iEvent.getByToken(rd_token, rpcs);
56  iEvent.getByToken(al_token, alcts);
57  iEvent.getByToken(cl_token, clcts);
58  iEvent.getByToken(co_token, correlatedlcts);
59 
60  if (StatusDigiDump)
61  iEvent.getByToken(st_token, statusdigis);
62 
64  iEvent.getByToken(dd_token, DDUstatusdigi);
65 
67  iEvent.getByToken(dc_token, DCCstatusdigi);
68 
69  if (WiresDigiDump) {
70  std::cout << std::endl;
71  std::cout << "Event " << iEvent.id() << std::endl;
72  std::cout << std::endl;
73  std::cout << "********WIRES Digis********" << std::endl;
74  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin(); j != wires->end(); j++) {
75  std::cout << "Wire digis from " << CSCDetId((*j).first) << std::endl;
76  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
77  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
78  for (; digiItr != last; ++digiItr) {
79  digiItr->print();
80  }
81  }
82  }
83 
84  if (StripDigiDump) {
85  std::cout << std::endl;
86  std::cout << "Event " << iEvent.id() << std::endl;
87  std::cout << std::endl;
88  std::cout << "********STRIPS Digis********" << std::endl;
89  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin(); j != strips->end(); j++) {
90  std::cout << "Strip digis from " << CSCDetId((*j).first) << std::endl;
91  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
92  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
93  for (; digiItr != last; ++digiItr) {
94  digiItr->print();
95  }
96  }
97  }
98 
99  if (ComparatorDigiDump) {
100  std::cout << std::endl;
101  std::cout << "Event " << iEvent.id() << std::endl;
102  std::cout << std::endl;
103  std::cout << "********COMPARATOR Digis********" << std::endl;
104  for (CSCComparatorDigiCollection::DigiRangeIterator j = comparators->begin(); j != comparators->end(); j++) {
105  std::cout << "Comparator digis from " << CSCDetId((*j).first) << std::endl;
106  std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
107  std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
108  for (; digiItr != last; ++digiItr) {
109  digiItr->print();
110  }
111  }
112  }
113 
114  if (RpcDigiDump) {
115  std::cout << std::endl;
116  std::cout << "Event " << iEvent.id() << std::endl;
117  std::cout << std::endl;
118  std::cout << "********RPC Digis********" << std::endl;
119  for (CSCRPCDigiCollection::DigiRangeIterator j = rpcs->begin(); j != rpcs->end(); j++) {
120  std::cout << "RPC digis from " << CSCDetId((*j).first) << std::endl;
121  std::vector<CSCRPCDigi>::const_iterator digiItr = (*j).second.first;
122  std::vector<CSCRPCDigi>::const_iterator last = (*j).second.second;
123  for (; digiItr != last; ++digiItr) {
124  digiItr->print();
125  }
126  }
127  }
128 
129  if (AlctDigiDump) {
130  std::cout << std::endl;
131  std::cout << "Event " << iEvent.id() << std::endl;
132  std::cout << std::endl;
133  std::cout << "********ALCT Digis********" << std::endl;
134  for (CSCALCTDigiCollection::DigiRangeIterator j = alcts->begin(); j != alcts->end(); j++) {
135  std::vector<CSCALCTDigi>::const_iterator digiItr = (*j).second.first;
136  std::vector<CSCALCTDigi>::const_iterator last = (*j).second.second;
137  for (; digiItr != last; ++digiItr) {
138  digiItr->print();
139  }
140  }
141  }
142 
143  if (ClctDigiDump) {
144  std::cout << std::endl;
145  std::cout << "Event " << iEvent.id() << std::endl;
146  std::cout << std::endl;
147  std::cout << "********CLCT Digis********" << std::endl;
148  for (CSCCLCTDigiCollection::DigiRangeIterator j = clcts->begin(); j != clcts->end(); j++) {
149  std::vector<CSCCLCTDigi>::const_iterator digiItr = (*j).second.first;
150  std::vector<CSCCLCTDigi>::const_iterator last = (*j).second.second;
151  for (; digiItr != last; ++digiItr) {
152  digiItr->print();
153  }
154  }
155  }
156 
157  if (CorrClctDigiDump) {
158  std::cout << std::endl;
159  std::cout << "Event " << iEvent.id() << std::endl;
160  std::cout << std::endl;
161  std::cout << "********CorrelatedLCT Digis********" << std::endl;
162  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j = correlatedlcts->begin(); j != correlatedlcts->end();
163  j++) {
164  std::vector<CSCCorrelatedLCTDigi>::const_iterator digiItr = (*j).second.first;
165  std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
166  for (; digiItr != last; ++digiItr) {
167  digiItr->print();
168  }
169  }
170  }
171 
172  if (StatusDigiDump) {
173  std::cout << std::endl;
174  std::cout << "Event " << iEvent.id() << std::endl;
175  std::cout << std::endl;
176  std::cout << "********STATUS Digis********" << std::endl;
177  for (CSCDCCFormatStatusDigiCollection::DigiRangeIterator j = statusdigis->begin(); j != statusdigis->end(); j++) {
178  std::vector<CSCDCCFormatStatusDigi>::const_iterator digiItr = (*j).second.first;
179  std::vector<CSCDCCFormatStatusDigi>::const_iterator last = (*j).second.second;
180  for (; digiItr != last; ++digiItr) {
181  digiItr->print();
182  }
183  }
184  }
185 
186  if (DDUStatusDigiDump) {
187  std::cout << std::endl;
188  std::cout << "Event " << iEvent.id() << std::endl;
189  std::cout << std::endl;
190  std::cout << "********DDU STATUS Digis********" << std::endl;
191  for (CSCDDUStatusDigiCollection::DigiRangeIterator j = DDUstatusdigi->begin(); j != DDUstatusdigi->end(); j++) {
192  std::vector<CSCDDUStatusDigi>::const_iterator digiItr = (*j).second.first;
193  std::vector<CSCDDUStatusDigi>::const_iterator last = (*j).second.second;
194  for (; digiItr != last; ++digiItr) {
195  digiItr->print();
196  }
197  }
198  }
199 
200  if (DCCStatusDigiDump) {
201  std::cout << std::endl;
202  std::cout << "Event " << iEvent.id() << std::endl;
203  std::cout << std::endl;
204  std::cout << "********DCC STATUS Digis********" << std::endl;
205  for (CSCDCCStatusDigiCollection::DigiRangeIterator j = DCCstatusdigi->begin(); j != DCCstatusdigi->end(); j++) {
206  std::vector<CSCDCCStatusDigi>::const_iterator digiItr = (*j).second.first;
207  std::vector<CSCDCCStatusDigi>::const_iterator last = (*j).second.second;
208  for (; digiItr != last; ++digiItr) {
209  digiItr->print();
210  }
211  }
212  }
213 
214 #ifdef THIS_IS_AN_EVENT_EXAMPLE
216  iEvent.getByLabel("example", pIn);
217 #endif
218 
219 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
220  ESHandle<SetupData> pSetup;
221  iSetup.get<SetupRecord>().get(pSetup);
222 #endif
223 }
224 
225 // ------------ method called once each job just after ending the event loop ------------
227 
228 //define this as a plug-in
229 //DEFINE_FWK_MODULE(CSCViewDigi);
CSCViewDigi::al_token
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
Definition: CSCViewDigi.h:52
CSCViewDigi::rd_token
edm::EDGetTokenT< CSCRPCDigiCollection > rd_token
Definition: CSCViewDigi.h:51
CSCViewDigi::RpcDigiDump
bool RpcDigiDump
Definition: CSCViewDigi.h:45
CSCViewDigi::~CSCViewDigi
~CSCViewDigi() override
Definition: CSCViewDigi.cc:36
CSCViewDigi::CorrClctDigiDump
bool CorrClctDigiDump
Definition: CSCViewDigi.h:44
CSCViewDigi::CSCViewDigi
CSCViewDigi(const edm::ParameterSet &)
Definition: CSCViewDigi.cc:12
CSCViewDigi::StatusDigiDump
bool StatusDigiDump
Definition: CSCViewDigi.h:45
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.h:54
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
CSCViewDigi::WiresDigiDump
bool WiresDigiDump
Definition: CSCViewDigi.h:44
CSCViewDigi::ClctDigiDump
bool ClctDigiDump
Definition: CSCViewDigi.h:44
edm::Handle< CSCWireDigiCollection >
CSCViewDigi::cd_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
Definition: CSCViewDigi.h:50
dqmdumpme.last
last
Definition: dqmdumpme.py:56
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
edm::ESHandle
Definition: DTSurvey.h:22
CSCViewDigi::ComparatorDigiDump
bool ComparatorDigiDump
Definition: CSCViewDigi.h:45
CSCViewDigi::DCCStatusDigiDump
bool DCCStatusDigiDump
Definition: CSCViewDigi.h:46
edm::ParameterSet
Definition: ParameterSet.h:36
CSCViewDigi::cl_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
Definition: CSCViewDigi.h:53
CSCDetId
Definition: CSCDetId.h:26
CSCViewDigi::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CSCViewDigi.cc:38
CSCViewDigi::st_token
edm::EDGetTokenT< CSCDCCFormatStatusDigiCollection > st_token
Definition: CSCViewDigi.h:55
iEvent
int iEvent
Definition: GenABIO.cc:224
CSCViewDigi::dd_token
edm::EDGetTokenT< CSCDDUStatusDigiCollection > dd_token
Definition: CSCViewDigi.h:56
CSCViewDigi::endJob
void endJob() override
Definition: CSCViewDigi.cc:226
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CSCViewDigi::dc_token
edm::EDGetTokenT< CSCDCCStatusDigiCollection > dc_token
Definition: CSCViewDigi.h:57
CSCViewDigi::AlctDigiDump
bool AlctDigiDump
Definition: CSCViewDigi.h:44
CSCViewDigi.h
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
CSCViewDigi::StripDigiDump
bool StripDigiDump
Definition: CSCViewDigi.h:45
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.h:46
CSCViewDigi::wd_token
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
Definition: CSCViewDigi.h:48
CSCViewDigi::sd_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: CSCViewDigi.h:49