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 
input
static const std::string input
Definition: EdmProvDump.cc:48
SiPixelPhase1DigisV::SiPixelPhase1DigisV
SiPixelPhase1DigisV(const edm::ParameterSet &conf)
Definition: SiPixelPhase1DigisV.cc:23
SiPixelPhase1DigisV::ADC
Definition: SiPixelPhase1DigisV.h:22
PixelDigi
Definition: PixelDigi.h:14
DQMStore.h
HistogramManagerHolder::histo
std::vector< HistogramManager > histo
Definition: SiPixelPhase1Base.h:37
SiPixelPhase1DigisV::NDIGIS
Definition: SiPixelPhase1DigisV.h:23
edm::Handle
Definition: AssociativeIterator.h:50
SiPixelPhase1Base
Definition: SiPixelPhase1Base.h:46
DetId
Definition: DetId.h:17
MakerMacros.h
SiPixelPhase1DigisV::ROW
Definition: SiPixelPhase1DigisV.h:24
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
SiPixelPhase1DigisV::COLUMN
Definition: SiPixelPhase1DigisV.h:25
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
edm::DetSetVector::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
iEvent
int iEvent
Definition: GenABIO.cc:224
SiPixelPhase1DigisV
Definition: SiPixelPhase1DigisV.h:19
edm::EventSetup
Definition: EventSetup.h:57
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
SiPixelPhase1DigisV::srcToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > srcToken_
Definition: SiPixelPhase1DigisV.h:36
SiPixelPhase1DigisV.h
ParameterSet.h
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
SiPixelPhase1DigisV::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: SiPixelPhase1DigisV.cc:27