CMS 3D CMS Logo

SiPixelPhase1Digis.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiPixelPhase1Digis
4 // Class: SiPixelPhase1Digis
5 //
6 
7 // Original Author: Marcel Schneider
8 
10 
11 // C++ stuff
12 #include <iostream>
13 
14 // CMSSW stuff
18 
19 // DQM Stuff
21 
23  SiPixelPhase1Base(iConfig)
24 {
25  srcToken_ = consumes<edm::DetSetVector<PixelDigi>>(iConfig.getParameter<edm::InputTag>("src"));
26 }
27 
29 
31  iEvent.getByToken(srcToken_, input);
32  if (!input.isValid()) return;
33  bool hasDigis=false;
34 
36  for (it = input->begin(); it != input->end(); ++it) {
37  for(PixelDigi const& digi : *it) {
38  hasDigis=true;
39  histo[ADC].fill((double) digi.adc(), DetId(it->detId()), &iEvent, digi.column(), digi.row());
40  histo[MAP].fill(DetId(it->detId()), &iEvent, digi.column(), digi.row());
41  histo[OCCUPANCY].fill(DetId(it->detId()), &iEvent, digi.column(), digi.row());
42  histo[NDIGIS ].fill(DetId(it->detId()), &iEvent); // count
43  histo[NDIGISINCLUSIVE].fill(DetId(it->detId()), &iEvent); // count
44  histo[NDIGIS_FED].fill(DetId(it->detId()), &iEvent);
45  histo[NDIGIS_FEDtrend].fill(DetId(it->detId()), &iEvent);
46  }
47  }
48  if (hasDigis) histo[EVENT].fill(DetId(0), &iEvent);
49  histo[NDIGIS ].executePerEventHarvesting(&iEvent);
50  histo[NDIGISINCLUSIVE].executePerEventHarvesting(&iEvent);
51  histo[NDIGIS_FED].executePerEventHarvesting(&iEvent);
52  histo[NDIGIS_FEDtrend].executePerEventHarvesting(&iEvent);
53 }
54 
56 
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > srcToken_
T getParameter(std::string const &) const
SiPixelPhase1Digis(const edm::ParameterSet &conf)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
static std::string const input
Definition: EdmProvDump.cc:44
int iEvent
Definition: GenABIO.cc:230
void analyze(const edm::Event &, const edm::EventSetup &)
bool isValid() const
Definition: HandleBase.h:74
Definition: DetId.h:18
std::vector< HistogramManager > histo
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:104