CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
ecaldqm::LedTask Class Reference

#include <LedTask.h>

Inheritance diagram for ecaldqm::LedTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

Public Member Functions

void addDependencies (DependencySet &) override
 
bool analyze (void const *, Collections) override
 
void beginEvent (edm::Event const &, edm::EventSetup const &) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
bool filterRunType (short const *) override
 
 LedTask ()
 
void runOnDigis (EEDigiCollection const &)
 
void runOnPnDigis (EcalPnDiodeDigiCollection const &)
 
void runOnRawData (EcalRawDataCollection const &)
 
void runOnUncalibRecHits (EcalUncalibratedRecHitCollection const &)
 
 ~LedTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerTask
 DQWorkerTask ()
 
virtual void endEvent (edm::Event const &, edm::EventSetup const &)
 
virtual bool filterTrigger (edm::TriggerResultsByName const &)
 
void recoverStats ()
 
virtual void setTokens (edm::ConsumesCollector &)
 
void softReset ()
 
virtual ~DQWorkerTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void bookMEs (DQMStore::IBooker &)
 
 DQWorker ()
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
std::string const & getName () const
 
bool onlineMode () const
 
virtual void releaseMEs ()
 
void setEventNumber (edm::EventNumber_t _e)
 
void setLumiNumber (edm::LuminosityBlockNumber_t _l)
 
void setRunNumber (edm::RunNumber_t _r)
 
void setTime (time_t _t)
 
virtual ~DQWorker ()
 

Private Member Functions

void setParams (edm::ParameterSet const &)
 

Private Attributes

int emptyLS_
 
int emptyLSLimit_
 
bool enable_ [nEEDCC]
 
int isemptyLS
 
std::map< unsigned, float > pnAmp_
 
unsigned rtHalf_ [nEEDCC]
 
unsigned wavelength_ [nEEDCC]
 
std::map< int, unsigned > wlToME_
 

Additional Inherited Members

- Public Types inherited from ecaldqm::DQWorkerTask
typedef
EcalDCCHeaderBlock::EcalDCCEventSettings 
EventSettings
 
- Static Public Member Functions inherited from ecaldqm::DQWorkerTask
static void fillDescriptions (edm::ParameterSetDescription &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void fillDescriptions (edm::ParameterSetDescription &_desc)
 
- Protected Member Functions inherited from ecaldqm::DQWorkerTask
void setME (edm::ParameterSet const &) final
 
- Protected Member Functions inherited from ecaldqm::DQWorker
void initialize (std::string const &_name, edm::ParameterSet const &)
 
void print_ (std::string const &, int=0) const
 
virtual void setSource (edm::ParameterSet const &)
 
void setVerbosity (int _verbosity)
 
- Protected Attributes inherited from ecaldqm::DQWorkerTask
std::set< std::string > resettable_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool booked_
 
MESetCollection MEs_
 
std::string name_
 
bool onlineMode_
 
Timestamp timestamp_
 
int verbosity_
 
bool willConvertToEDM_
 

Detailed Description

Definition at line 14 of file LedTask.h.

Constructor & Destructor Documentation

ecaldqm::LedTask::LedTask ( )

Definition at line 9 of file LedTask.cc.

References enable_, ecaldqm::nEEDCC, rtHalf_, and wavelength_.

9  :
10  DQWorkerTask(),
11  wlToME_(),
12  pnAmp_(),
13  emptyLS_(0),
14  emptyLSLimit_(0)
15  {
16  std::fill_n(enable_, nEEDCC, false);
17  std::fill_n(wavelength_, nEEDCC, 0);
18  std::fill_n(rtHalf_, nEEDCC, 0);
19  }
bool enable_[nEEDCC]
Definition: LedTask.h:40
unsigned rtHalf_[nEEDCC]
Definition: LedTask.h:42
int emptyLSLimit_
Definition: LedTask.h:46
unsigned wavelength_[nEEDCC]
Definition: LedTask.h:41
std::map< unsigned, float > pnAmp_
Definition: LedTask.h:43
std::map< int, unsigned > wlToME_
Definition: LedTask.h:38
ecaldqm::LedTask::~LedTask ( )
inline

Definition at line 17 of file LedTask.h.

17 {}

Member Function Documentation

void ecaldqm::LedTask::addDependencies ( DependencySet _dependencies)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 41 of file LedTask.cc.

References ecaldqm::kEcalRawData, ecaldqm::kEEDigi, ecaldqm::kEELaserLedUncalibRecHit, ecaldqm::kPnDiodeDigi, and ecaldqm::DependencySet::push_back().

42  {
43  _dependencies.push_back(Dependency(kEEDigi, kEcalRawData));
44  _dependencies.push_back(Dependency(kPnDiodeDigi, kEEDigi, kEcalRawData));
45  _dependencies.push_back(Dependency(kEELaserLedUncalibRecHit, kPnDiodeDigi, kEEDigi, kEcalRawData));
46  }
bool ecaldqm::LedTask::analyze ( void const *  _p,
Collections  _collection 
)
inlineoverridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 50 of file LedTask.h.

References ecaldqm::kEcalRawData, ecaldqm::kEEDigi, ecaldqm::kEELaserLedUncalibRecHit, ecaldqm::kPnDiodeDigi, runOnDigis(), runOnPnDigis(), runOnRawData(), and runOnUncalibRecHits().

50  {
51  switch(_collection){
52  case kEcalRawData:
53  if(_p) runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
54  return true;
55  break;
56  case kEEDigi:
57  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
58  return true;
59  break;
60  case kPnDiodeDigi:
61  if(_p) runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
62  return true;
63  break;
65  if(_p) runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
66  return true;
67  break;
68  default:
69  break;
70  }
71 
72  return false;
73  }
void runOnDigis(EEDigiCollection const &)
Definition: LedTask.cc:115
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: LedTask.cc:269
void runOnRawData(EcalRawDataCollection const &)
Definition: LedTask.cc:88
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: LedTask.cc:228
void ecaldqm::LedTask::beginEvent ( edm::Event const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 82 of file LedTask.cc.

References pnAmp_.

83  {
84  pnAmp_.clear();
85  }
std::map< unsigned, float > pnAmp_
Definition: LedTask.h:43
void ecaldqm::LedTask::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 75 of file LedTask.cc.

References emptyLS_, emptyLSLimit_, and isemptyLS.

76  {
77  isemptyLS = 0;
78  if(emptyLS_+1 > emptyLSLimit_) emptyLS_ = -1;
79  }
int emptyLSLimit_
Definition: LedTask.h:46
void ecaldqm::LedTask::beginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 69 of file LedTask.cc.

References emptyLS_.

70  {
71  emptyLS_ = 0;
72  }
void ecaldqm::LedTask::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 319 of file LedTask.cc.

References emptyLS_, and isemptyLS.

319  {
320  if(isemptyLS == 1)emptyLS_ += 1;
321  }
bool ecaldqm::LedTask::filterRunType ( short const *  _runType)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 49 of file LedTask.cc.

References enable_, cmsHarvester::index, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::kEEmHigh, EcalDCCHeaderBlock::LED_GAP, EcalDCCHeaderBlock::LED_STD, ecaldqm::nDCC, and ecaldqm::nEBDCC.

50  {
51  bool enable(false);
52 
53  for(unsigned iDCC(0); iDCC != nDCC; iDCC++){
54  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
55  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
56  if(_runType[iDCC] == EcalDCCHeaderBlock::LED_STD ||
57  _runType[iDCC] == EcalDCCHeaderBlock::LED_GAP){
58  enable = true;
59  enable_[index] = true;
60  }
61  else
62  enable_[index] = false;
63  }
64 
65  return enable;
66  }
bool enable_[nEEDCC]
Definition: LedTask.h:40
void ecaldqm::LedTask::runOnDigis ( EEDigiCollection const &  _digis)

Definition at line 115 of file LedTask.cc.

References ecalMGPA::adc(), EcalMGPASample::adc(), edm::DataFrameContainer::begin(), ecaldqm::dccId(), emptyLS_, enable_, edm::DataFrameContainer::end(), ecaldqm::MESetMulti::fill(), i, cmsHarvester::index, isemptyLS, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::kEEmHigh, bookConverter::max, ecaldqm::DQWorker::MEs_, min(), ecaldqm::nEBDCC, ecaldqm::nEEDCC, DetId::null(), pnAmp_, ecaldqm::pnForCrystal(), DetId::rawId(), ecaldqm::rtHalf(), rtHalf_, EcalDataFrame::sample(), dtDQMClient_cfg::threshold, wavelength_, and wlToME_.

Referenced by analyze().

116  {
117  MESet& meOccupancy(MEs_.at("Occupancy"));
118  MESet& meShape(MEs_.at("Shape"));
119  MESet& meSignalRate(MEs_.at("SignalRate"));
120 
121  int nReadouts[nEEDCC];
122  int maxpos[nEEDCC][10];
123  for(unsigned index(0); index < nEEDCC; ++index){
124  nReadouts[index] = 0;
125  for(int i(0); i < 10; i++) maxpos[index][i] = 0;
126  }
127 
128  for(EEDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
129  const DetId& id(digiItr->id());
130 
131  unsigned iDCC(dccId(id) - 1);
132  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
133  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
134 
135  if(!enable_[index]) continue;
136  if(rtHalf(id) != rtHalf_[index]) continue;
137 
138  meOccupancy.fill(id);
139 
140  ++nReadouts[index];
141 
142  EcalDataFrame dataFrame(*digiItr);
143 
144  int iMax(-1);
145  int max(0);
146  int min(4096);
147  for (int i(0); i < 10; i++) {
148  int adc(dataFrame.sample(i).adc());
149  if(adc > max){
150  max = adc;
151  iMax = i;
152  }
153  if(adc < min) min = adc;
154  }
155  if(iMax >= 0 && max - min > 3) // normal RMS of pedestal is ~2.5
156  maxpos[index][iMax] += 1;
157  }
158 
159  // signal existence check
160  bool enable(false);
161  bool ledOnExpected(emptyLS_ >= 0);
162 
163  unsigned iME(-1);
164 
165  for(int index(0); index < nEEDCC; ++index){
166  if(nReadouts[index] == 0){
167  enable_[index] = false;
168  continue;
169  }
170 
171  int threshold(nReadouts[index] / 3);
172  if(ledOnExpected) enable_[index] = false;
173 
174  for(int i(0); i < 10; i++){
175  if(maxpos[index][i] > threshold){
176  enable = true;
177  enable_[index] = true;
178  break;
179  }
180  }
181 
182  if(iME != wlToME_[wavelength_[index]]){
183  iME = wlToME_[wavelength_[index]];
184  static_cast<MESetMulti&>(meSignalRate).use(iME);
185  }
186 
187  meSignalRate.fill((index <= kEEmHigh ? index : index + nEBDCC) + 1, enable_[index] ? 1 : 0);
188  }
189 
190  if(!enable && isemptyLS >= 0) isemptyLS = 1;
191  else if(enable) isemptyLS = -1;
192 
193  if(enable) emptyLS_ = 0;
194  else if(ledOnExpected) return;
195 
196  iME = -1;
197 
198  for(EEDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
199  const DetId& id(digiItr->id());
200 
201  unsigned iDCC(dccId(id) - 1);
202  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
203  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
204 
205  if(!enable_[index]) continue;
206  if(rtHalf(id) != rtHalf_[index]) continue;
207 
208  if(iME != wlToME_[wavelength_[index]]){
209  iME = wlToME_[wavelength_[index]];
210  static_cast<MESetMulti&>(meShape).use(iME);
211  }
212 
213  // EcalDataFrame is not a derived class of edm::DataFrame, but can take edm::DataFrame in the constructor
214  EcalDataFrame dataFrame(*digiItr);
215 
216  for(int iSample(0); iSample < 10; iSample++)
217  meShape.fill(id, iSample + 0.5, float(dataFrame.sample(iSample).adc()));
218 
219  EcalPnDiodeDetId pnidA(pnForCrystal(id, 'a'));
220  EcalPnDiodeDetId pnidB(pnForCrystal(id, 'b'));
221  if(pnidA.null() || pnidB.null()) continue;
222  pnAmp_.insert(std::make_pair(pnidA.rawId(), 0.));
223  pnAmp_.insert(std::make_pair(pnidB.rawId(), 0.));
224  }
225  }
int adc(sample_type sample)
get the ADC sample (12 bits)
bool enable_[nEEDCC]
Definition: LedTask.h:40
int i
Definition: DBlmapReader.cc:9
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
unsigned rtHalf_[nEEDCC]
Definition: LedTask.h:42
EcalPnDiodeDetId pnForCrystal(DetId const &, char)
unsigned rtHalf(DetId const &)
T min(T a, T b)
Definition: MathUtil.h:58
unsigned wavelength_[nEEDCC]
Definition: LedTask.h:41
Definition: DetId.h:18
MESetCollection MEs_
Definition: DQWorker.h:75
std::map< unsigned, float > pnAmp_
Definition: LedTask.h:43
std::map< int, unsigned > wlToME_
Definition: LedTask.h:38
unsigned dccId(DetId const &)
void ecaldqm::LedTask::runOnPnDigis ( EcalPnDiodeDigiCollection const &  _digis)

Definition at line 228 of file LedTask.cc.

References edm::SortedCollection< T, SORT >::begin(), ecaldqm::dccId(), edm::SortedCollection< T, SORT >::end(), ecaldqm::MESetMulti::fill(), cmsHarvester::index, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::kEEmHigh, bookConverter::max, ecaldqm::DQWorker::MEs_, ecaldqm::nEBDCC, EcalCondDBWriter_cfi::pedestal, pnAmp_, wavelength_, and wlToME_.

Referenced by analyze().

229  {
230  MESet& mePNAmplitude(MEs_.at("PNAmplitude"));
231 
232  unsigned iME(-1);
233 
234  for(EcalPnDiodeDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
235  if(digiItr->sample(0).gainId() != 0 && digiItr->sample(0).gainId() != 1) continue;
236 
237  const EcalPnDiodeDetId& id(digiItr->id());
238 
239  std::map<uint32_t, float>::iterator ampItr(pnAmp_.find(id.rawId()));
240  if(ampItr == pnAmp_.end()) continue;
241 
242  unsigned iDCC(dccId(id) - 1);
243  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
244  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
245 
246  float pedestal(0.);
247  for(int iSample(0); iSample < 4; iSample++)
248  pedestal += digiItr->sample(iSample).adc();
249  pedestal /= 4.;
250 
251  float max(0.);
252  for(int iSample(0); iSample < 50; iSample++){
253  float amp(digiItr->sample(iSample).adc() - pedestal);
254  if(amp > max) max = amp;
255  }
256 
257  if(iME != wlToME_[wavelength_[index]]){
258  iME = wlToME_[wavelength_[index]];
259  static_cast<MESetMulti&>(mePNAmplitude).use(iME);
260  }
261 
262  mePNAmplitude.fill(id, max);
263 
264  ampItr->second = max;
265  }
266  }
std::vector< EcalPnDiodeDigi >::const_iterator const_iterator
unsigned wavelength_[nEEDCC]
Definition: LedTask.h:41
MESetCollection MEs_
Definition: DQWorker.h:75
std::map< unsigned, float > pnAmp_
Definition: LedTask.h:43
std::map< int, unsigned > wlToME_
Definition: LedTask.h:38
unsigned dccId(DetId const &)
void ecaldqm::LedTask::runOnRawData ( EcalRawDataCollection const &  _rawData)

Definition at line 88 of file LedTask.cc.

References edm::SortedCollection< T, SORT >::begin(), enable_, edm::SortedCollection< T, SORT >::end(), cmsHarvester::index, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::kEEmHigh, ecaldqm::nEBDCC, rtHalf_, wavelength_, and wlToME_.

Referenced by analyze().

89  {
90  for(EcalRawDataCollection::const_iterator rItr(_rawData.begin()); rItr != _rawData.end(); ++rItr){
91  unsigned iDCC(rItr->id() - 1);
92  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
93  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
94 
95  if(!enable_[index]){
96  wavelength_[index] = -1;
97  rtHalf_[index] = -1;
98  continue;
99  }
100  if(rItr->getEventSettings().wavelength == 0)
101  wavelength_[index] = 1;
102  else if(rItr->getEventSettings().wavelength == 2)
103  wavelength_[index] = 2;
104  else
105  wavelength_[index] = -1;
106 
107  if(wlToME_.find(wavelength_[index]) == wlToME_.end())
108  enable_[index] = false;
109 
110  rtHalf_[index] = rItr->getRtHalf();
111  }
112  }
bool enable_[nEEDCC]
Definition: LedTask.h:40
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
unsigned rtHalf_[nEEDCC]
Definition: LedTask.h:42
unsigned wavelength_[nEEDCC]
Definition: LedTask.h:41
std::map< int, unsigned > wlToME_
Definition: LedTask.h:38
void ecaldqm::LedTask::runOnUncalibRecHits ( EcalUncalibratedRecHitCollection const &  _uhits)

Definition at line 269 of file LedTask.cc.

References edm::SortedCollection< T, SORT >::begin(), ecaldqm::dccId(), enable_, edm::SortedCollection< T, SORT >::end(), ecaldqm::MESetMulti::fill(), cmsHarvester::index, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::kEEmHigh, bookConverter::max, ecaldqm::DQWorker::MEs_, ecaldqm::nEBDCC, pnAmp_, ecaldqm::pnForCrystal(), ecaldqm::rtHalf(), rtHalf_, wavelength_, and wlToME_.

Referenced by analyze().

270  {
271  using namespace std;
272 
273  MESet& meAmplitude(MEs_.at("Amplitude"));
274  MESet& meAmplitudeSummary(MEs_.at("AmplitudeSummary"));
275  MESet& meTiming(MEs_.at("Timing"));
276  MESet& meAOverP(MEs_.at("AOverP"));
277 
278  unsigned iME(-1);
279 
280  for(EcalUncalibratedRecHitCollection::const_iterator uhitItr(_uhits.begin()); uhitItr != _uhits.end(); ++uhitItr){
281  EEDetId id(uhitItr->id());
282 
283  unsigned iDCC(dccId(id) - 1);
284  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
285  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
286 
287  if(!enable_[index]) continue;
288  if(rtHalf(id) != rtHalf_[index]) continue;
289 
290  if(iME != wlToME_[wavelength_[index]]){
291  iME = wlToME_[wavelength_[index]];
292  static_cast<MESetMulti&>(meAmplitude).use(iME);
293  static_cast<MESetMulti&>(meAmplitudeSummary).use(iME);
294  static_cast<MESetMulti&>(meTiming).use(iME);
295  static_cast<MESetMulti&>(meAOverP).use(iME);
296  }
297 
298  float amp(max((double)uhitItr->amplitude(), 0.));
299  float jitter(max((double)uhitItr->jitter() + 5.0, 0.));
300 
301  meAmplitude.fill(id, amp);
302  meAmplitudeSummary.fill(id, amp);
303  meTiming.fill(id, jitter);
304 
305  float aop(0.);
306 
307  map<uint32_t, float>::iterator ampItrA(pnAmp_.find(pnForCrystal(id, 'a')));
308  map<uint32_t, float>::iterator ampItrB(pnAmp_.find(pnForCrystal(id, 'b')));
309  if(ampItrA == pnAmp_.end() && ampItrB == pnAmp_.end()) continue;
310  else if(ampItrB == pnAmp_.end()) aop = amp / ampItrA->second;
311  else if(ampItrA == pnAmp_.end()) aop = amp / ampItrB->second;
312  else aop = amp / (ampItrA->second + ampItrB->second) * 2.;
313 
314  meAOverP.fill(id, aop);
315  }
316  }
bool enable_[nEEDCC]
Definition: LedTask.h:40
std::vector< EcalUncalibratedRecHit >::const_iterator const_iterator
unsigned rtHalf_[nEEDCC]
Definition: LedTask.h:42
EcalPnDiodeDetId pnForCrystal(DetId const &, char)
unsigned rtHalf(DetId const &)
unsigned wavelength_[nEEDCC]
Definition: LedTask.h:41
MESetCollection MEs_
Definition: DQWorker.h:75
std::map< unsigned, float > pnAmp_
Definition: LedTask.h:43
std::map< int, unsigned > wlToME_
Definition: LedTask.h:38
unsigned dccId(DetId const &)
void ecaldqm::LedTask::setParams ( edm::ParameterSet const &  _params)
privatevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 22 of file LedTask.cc.

References emptyLSLimit_, Exception, ecaldqm::MESetMulti::getIndex(), edm::ParameterSet::getUntrackedParameter(), ecaldqm::DQWorker::MEs_, cond::to_string(), and wlToME_.

23  {
24  emptyLSLimit_ = _params.getUntrackedParameter<int>("emptyLSLimit");
25 
26  std::vector<int> ledWavelengths(_params.getUntrackedParameter<std::vector<int> >("ledWavelengths"));
27 
29 
30  MESetMulti& amplitude(static_cast<MESetMulti&>(MEs_.at("Amplitude")));
31  unsigned nWL(ledWavelengths.size());
32  for(unsigned iWL(0); iWL != nWL; ++iWL){
33  int wl(ledWavelengths[iWL]);
34  if(wl != 1 && wl != 2) throw cms::Exception("InvalidConfiguration") << "Led Wavelength";
35  repl["wl"] = std::to_string(wl);
36  wlToME_[wl] = amplitude.getIndex(repl);
37  }
38  }
std::string to_string(const T &t)
Definition: Logger.cc:26
int emptyLSLimit_
Definition: LedTask.h:46
MESetCollection MEs_
Definition: DQWorker.h:75
std::map< int, unsigned > wlToME_
Definition: LedTask.h:38
std::map< std::string, std::string > PathReplacements
Definition: MESet.h:31

Member Data Documentation

int ecaldqm::LedTask::emptyLS_
private

Definition at line 45 of file LedTask.h.

Referenced by beginLuminosityBlock(), beginRun(), endLuminosityBlock(), and runOnDigis().

int ecaldqm::LedTask::emptyLSLimit_
private

Definition at line 46 of file LedTask.h.

Referenced by beginLuminosityBlock(), and setParams().

bool ecaldqm::LedTask::enable_[nEEDCC]
private

Definition at line 40 of file LedTask.h.

Referenced by filterRunType(), LedTask(), runOnDigis(), runOnRawData(), and runOnUncalibRecHits().

int ecaldqm::LedTask::isemptyLS
private

Definition at line 47 of file LedTask.h.

Referenced by beginLuminosityBlock(), endLuminosityBlock(), and runOnDigis().

std::map<unsigned, float> ecaldqm::LedTask::pnAmp_
private

Definition at line 43 of file LedTask.h.

Referenced by beginEvent(), runOnDigis(), runOnPnDigis(), and runOnUncalibRecHits().

unsigned ecaldqm::LedTask::rtHalf_[nEEDCC]
private

Definition at line 42 of file LedTask.h.

Referenced by LedTask(), runOnDigis(), runOnRawData(), and runOnUncalibRecHits().

unsigned ecaldqm::LedTask::wavelength_[nEEDCC]
private

Definition at line 41 of file LedTask.h.

Referenced by LedTask(), runOnDigis(), runOnPnDigis(), runOnRawData(), and runOnUncalibRecHits().

std::map<int, unsigned> ecaldqm::LedTask::wlToME_
private

Definition at line 38 of file LedTask.h.

Referenced by runOnDigis(), runOnPnDigis(), runOnRawData(), runOnUncalibRecHits(), and setParams().