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  SiPixelPhase1Base(iConfig)
25 {
26  srcToken_ = consumes<edm::DetSetVector<PixelDigi>>(iConfig.getParameter<edm::InputTag>("src"));
27 }
28 
30 
32  iEvent.getByToken(srcToken_, input);
33  if (!input.isValid()) return;
34 
36  for (it = input->begin(); it != input->end(); ++it) {
37  for(PixelDigi const& digi : *it) {
38  histo[ADC].fill((double) digi.adc(), DetId(it->detId()), &iEvent);
39  histo[NDIGIS ].fill(DetId(it->detId()), &iEvent); // count
40  histo[ROW].fill((double) digi.row(), DetId(it->detId()), &iEvent);
41  histo[COLUMN].fill((double) digi.column(), DetId(it->detId()), &iEvent);
42  }
43  }
44  histo[NDIGIS ].executePerEventHarvesting(&iEvent);
45 }
46 
48 
T getParameter(std::string const &) const
void analyze(const edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
SiPixelPhase1DigisV(const edm::ParameterSet &conf)
static std::string const input
Definition: EdmProvDump.cc:44
int iEvent
Definition: GenABIO.cc:230
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > srcToken_
Definition: DetId.h:18
std::vector< HistogramManager > histo
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:104