CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDigiDump.cc
Go to the documentation of this file.
6 #include <iostream>
7 
9 {
10  wd_token = consumes<CSCWireDigiCollection>(conf.getParameter<edm::InputTag>("wireDigiTag"));
11  sd_token = consumes<CSCStripDigiCollection>(conf.getParameter<edm::InputTag>("stripDigiTag"));
12  cd_token = consumes<CSCComparatorDigiCollection>(conf.getParameter<edm::InputTag>("comparatorDigiTag"));
13 }
14 
15 
20 
21  std::cout << "Event " << e.id() << std::endl;
22 
23  e.getByToken(wd_token, wires);
24 
25  for (CSCWireDigiCollection::DigiRangeIterator j=wires->begin(); j!=wires->end(); j++) {
26  std::cout << "Wire digis from "<< CSCDetId((*j).first) << std::endl;
27  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
28  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
29  for( ; digiItr != last; ++digiItr) {
30  digiItr->print();
31  }
32  }
33 
34  e.getByToken(sd_token, strips);
35 
36  for (CSCStripDigiCollection::DigiRangeIterator j=strips->begin(); j!=strips->end(); j++) {
37  std::cout << "Strip digis from "<< CSCDetId((*j).first) << std::endl;
38  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
39  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
40  for( ; digiItr != last; ++digiItr) {
41  digiItr->print();
42  }
43  }
44 
45  e.getByToken(cd_token, comparators);
46 
47  for (CSCComparatorDigiCollection::DigiRangeIterator j=comparators->begin();
48  j!=comparators->end(); j++)
49  {
50  std::cout << "Comparator digis from "<< CSCDetId((*j).first) << std::endl;
51  std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
52  std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
53  for( ; digiItr != last; ++digiItr) {
54  digiItr->print();
55  }
56  }
57 }
58 
59 
T getParameter(std::string const &) const
CSCDigiDump(edm::ParameterSet const &conf)
Definition: CSCDigiDump.cc:8
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
Definition: CSCDigiDump.h:17
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: CSCDigiDump.h:18
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
Definition: CSCDigiDump.h:19
int j
Definition: DBlmapReader.cc:9
virtual void analyze(edm::Event const &e, edm::EventSetup const &c)
Definition: CSCDigiDump.cc:16
tuple conf
Definition: dbtoconf.py:185
edm::EventID id() const
Definition: EventBase.h:60
tuple cout
Definition: gather_cfg.py:121