CMS 3D CMS Logo

CSCDigiDump.cc
Go to the documentation of this file.
1 // Mar-2015: Changed cout to LogVerbatim - and uses Digi::print() which also used cout
2 // until I switched to LogVerbatim on 03-Mar-2015 for 75X
3 
9 #include <iostream>
10 
12 {
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 }
17 
18 
23 
24  edm::LogVerbatim("CSCDigi") << "Event " << e.id();
25 
26  e.getByToken(wd_token, wires);
27 
28  for (CSCWireDigiCollection::DigiRangeIterator j=wires->begin(); j!=wires->end(); j++) {
29  edm::LogVerbatim("CSCDigi") << "Wire digis from " << CSCDetId((*j).first);
30  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
31  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
32  for( ; digiItr != last; ++digiItr) {
33  digiItr->print();
34  }
35  }
36 
37  e.getByToken(sd_token, strips);
38 
39  for (CSCStripDigiCollection::DigiRangeIterator j=strips->begin(); j!=strips->end(); j++) {
40  edm::LogVerbatim("CSCDigi") << "Strip digis from " << CSCDetId((*j).first);
41  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
42  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
43  for( ; digiItr != last; ++digiItr) {
44  digiItr->print();
45  }
46  }
47 
48  e.getByToken(cd_token, comparators);
49 
50  for (CSCComparatorDigiCollection::DigiRangeIterator j=comparators->begin();
51  j!=comparators->end(); j++)
52  {
53  edm::LogVerbatim("CSCDigi") << "Comparator digis from " << CSCDetId((*j).first);
54  std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
55  std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
56  for( ; digiItr != last; ++digiItr) {
57  digiItr->print();
58  }
59  }
60 }
61 
62 
T getParameter(std::string const &) const
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Definition: CSCDigiDump.cc:19
CSCDigiDump(edm::ParameterSet const &conf)
Definition: CSCDigiDump.cc:11
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
Definition: CSCDigiDump.h:17
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: CSCDigiDump.h:18
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
Definition: CSCDigiDump.h:19
edm::EventID id() const
Definition: EventBase.h:60