34 unsigned nG(MGPAGains.size());
35 for(
unsigned iG(0); iG != nG; ++iG){
36 int gain(MGPAGains[iG]);
37 if(gain != 1 && gain != 6 && gain != 12)
throw cms::Exception(
"InvalidConfiguration") <<
"MGPA gain";
38 repl[
"gain"] = std::to_string(gain);
44 MESetMulti& pnAmplitude(static_cast<MESetMulti&>(
MEs_.at(
"PNAmplitude")));
45 unsigned nGPN(MGPAGainsPN.size());
46 for(
unsigned iG(0); iG != nGPN; ++iG){
47 int gain(MGPAGainsPN[iG]);
48 if(gain != 1 && gain != 16)
throw cms::Exception(
"InvalidConfiguration") <<
"PN MGPA gain";
49 repl[
"pngain"] = std::to_string(gain);
66 for(
int iFED(0); iFED <
nDCC; iFED++){
83 unsigned iDCC(rItr->id() - 1);
89 switch(rItr->getMgpaGain()){
108 template<
typename DigiCollection>
112 MESet& meOccupancy(
MEs_.at(
"Occupancy"));
117 for(
typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
120 meOccupancy.fill(
id);
122 int iDCC(
dccId(
id) - 1);
134 for(
int iSample(0); iSample < 10; iSample++)
135 meShape.
fill(
id, iSample + 0.5,
float(dataFrame.
sample(iSample).
adc()));
142 MESet& mePNAmplitude(
MEs_.at(
"PNAmplitude"));
149 int iDCC(
dccId(
id) - 1);
154 switch(digiItr->sample(0).gainId()){
155 case 0: gain = 1;
break;
156 case 1: gain = 16;
break;
164 static_cast<MESetMulti&
>(mePNAmplitude).use(iME);
168 for(
int iSample(0); iSample < 4; iSample++)
169 pedestal += digiItr->sample(iSample).adc();
173 for(
int iSample(0); iSample < 50; iSample++)
174 if(digiItr->sample(iSample).adc() >
max) max = digiItr->sample(iSample).adc();
178 mePNAmplitude.fill(
id, amplitude);
185 MESet& meAmplitude(
MEs_.at(
"Amplitude"));
192 int iDCC(
dccId(
id) - 1);
198 static_cast<MESetMulti&
>(meAmplitude).use(iME);
201 meAmplitude.
fill(
id, uhitItr->amplitude());
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_ECALDQM_WORKER(TYPE)
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
void fill(DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
std::map< int, unsigned > gainToME_
std::map< int, unsigned > pnGainToME_
bool filterRunType(short const *) override
void setParams(edm::ParameterSet const &) override
void runOnDigis(DigiCollection const &)
const_iterator end() const
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
void addDependencies(DependencySet &) override
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
std::map< std::string, std::string > PathReplacements
void push_back(Dependency const &_d)
unsigned dccId(DetId const &)
unsigned getIndex(PathReplacements const &) const
void runOnRawData(EcalRawDataCollection const &)
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)