CMS 3D CMS Logo

SiPixelPhase1DigisV.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiPixelPhase1DigisV
4 // Class: SiPixelPhase1DigisV
5 //
6 
7 // Original Author: Marcel Schneider
8 
10 // Additional Authors: Alexander Morton - modifying code for validation use
11 
12 // C++ stuff
13 #include <iostream>
14 
15 // CMSSW stuff
19 
20 // DQM Stuff
22 
24  srcToken_ = consumes<edm::DetSetVector<PixelDigi>>(iConfig.getParameter<edm::InputTag>("src"));
25 }
26 
29  iEvent.getByToken(srcToken_, input);
30  if (!input.isValid())
31  return;
32 
34  for (it = input->begin(); it != input->end(); ++it) {
35  for (PixelDigi const &digi : *it) {
36  histo[ADC].fill((double)digi.adc(), DetId(it->detId()), &iEvent);
37  histo[NDIGIS].fill(DetId(it->detId()), &iEvent); // count
38  histo[ROW].fill((double)digi.row(), DetId(it->detId()), &iEvent);
39  histo[COLUMN].fill((double)digi.column(), DetId(it->detId()), &iEvent);
40  }
41  }
42  histo[NDIGIS].executePerEventHarvesting(&iEvent);
43 }
44 
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
SiPixelPhase1DigisV(const edm::ParameterSet &conf)
static std::string const input
Definition: EdmProvDump.cc:47
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > srcToken_
Definition: DetId.h:17
std::vector< HistogramManager > histo
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102