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
2 // used cout until I switched to LogVerbatim on 03-Mar-2015 for 75X
3 
9 #include <iostream>
10 
12  wd_token = consumes<CSCWireDigiCollection>(conf.getParameter<edm::InputTag>("wireDigiTag"));
13  sd_token = consumes<CSCStripDigiCollection>(conf.getParameter<edm::InputTag>("stripDigiTag"));
14  cd_token = consumes<CSCComparatorDigiCollection>(conf.getParameter<edm::InputTag>("comparatorDigiTag"));
15 }
16 
21 
22  edm::LogVerbatim("CSCDigi") << "Event " << e.id();
23 
24  e.getByToken(wd_token, wires);
25 
26  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin(); j != wires->end(); j++) {
27  edm::LogVerbatim("CSCDigi") << "Wire digis from " << CSCDetId((*j).first);
28  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
29  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
30  for (; digiItr != last; ++digiItr) {
31  digiItr->print();
32  }
33  }
34 
35  e.getByToken(sd_token, strips);
36 
37  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin(); j != strips->end(); j++) {
38  edm::LogVerbatim("CSCDigi") << "Strip digis from " << CSCDetId((*j).first);
39  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
40  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
41  for (; digiItr != last; ++digiItr) {
42  digiItr->print();
43  }
44  }
45 
46  e.getByToken(cd_token, comparators);
47 
48  for (CSCComparatorDigiCollection::DigiRangeIterator j = comparators->begin(); j != comparators->end(); j++) {
49  edm::LogVerbatim("CSCDigi") << "Comparator digis from " << CSCDetId((*j).first);
50  std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
51  std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
52  for (; digiItr != last; ++digiItr) {
53  digiItr->print();
54  }
55  }
56 }
Log< level::Info, true > LogVerbatim
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Definition: CSCDigiDump.cc:17
CSCDigiDump(edm::ParameterSet const &conf)
Definition: CSCDigiDump.cc:11
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
Definition: CSCDigiDump.h:17
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: CSCDigiDump.h:18
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
Definition: CSCDigiDump.h:19
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False
Definition: DigiDM_cff.py:32