test
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:136
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: LedTask.cc:290
void runOnRawData(EcalRawDataCollection const &)
Definition: LedTask.cc:88
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: LedTask.cc:249
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 340 of file LedTask.cc.

References emptyLS_, and isemptyLS.

340  {
341  if(isemptyLS == 1)emptyLS_ += 1;
342  }
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 136 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().

137  {
138  MESet& meOccupancy(MEs_.at("Occupancy"));
139  MESet& meShape(MEs_.at("Shape"));
140  MESet& meSignalRate(MEs_.at("SignalRate"));
141 
142  int nReadouts[nEEDCC];
143  int maxpos[nEEDCC][10];
144  for(unsigned index(0); index < nEEDCC; ++index){
145  nReadouts[index] = 0;
146  for(int i(0); i < 10; i++) maxpos[index][i] = 0;
147  }
148 
149  for(EEDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
150  const DetId& id(digiItr->id());
151 
152  unsigned iDCC(dccId(id) - 1);
153  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
154  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
155 
156  if(!enable_[index]) continue;
157  if(rtHalf(id) != rtHalf_[index]) continue;
158 
159  meOccupancy.fill(id);
160 
161  ++nReadouts[index];
162 
163  EcalDataFrame dataFrame(*digiItr);
164 
165  int iMax(-1);
166  int max(0);
167  int min(4096);
168  for (int i(0); i < 10; i++) {
169  int adc(dataFrame.sample(i).adc());
170  if(adc > max){
171  max = adc;
172  iMax = i;
173  }
174  if(adc < min) min = adc;
175  }
176  if(iMax >= 0 && max - min > 3) // normal RMS of pedestal is ~2.5
177  maxpos[index][iMax] += 1;
178  }
179 
180  // signal existence check
181  bool enable(false);
182  bool ledOnExpected(emptyLS_ >= 0);
183 
184  unsigned iME(-1);
185 
186  for(int index(0); index < nEEDCC; ++index){
187  if(nReadouts[index] == 0){
188  enable_[index] = false;
189  continue;
190  }
191 
192  int threshold(nReadouts[index] / 3);
193  if(ledOnExpected) enable_[index] = false;
194 
195  for(int i(0); i < 10; i++){
196  if(maxpos[index][i] > threshold){
197  enable = true;
198  enable_[index] = true;
199  break;
200  }
201  }
202 
203  if(iME != wlToME_[wavelength_[index]]){
204  iME = wlToME_[wavelength_[index]];
205  static_cast<MESetMulti&>(meSignalRate).use(iME);
206  }
207 
208  meSignalRate.fill((index <= kEEmHigh ? index : index + nEBDCC) + 1, enable_[index] ? 1 : 0);
209  }
210 
211  if(!enable && isemptyLS >= 0) isemptyLS = 1;
212  else if(enable) isemptyLS = -1;
213 
214  if(enable) emptyLS_ = 0;
215  else if(ledOnExpected) return;
216 
217  iME = -1;
218 
219  for(EEDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
220  const DetId& id(digiItr->id());
221 
222  unsigned iDCC(dccId(id) - 1);
223  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
224  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
225 
226  if(!enable_[index]) continue;
227  if(rtHalf(id) != rtHalf_[index]) continue;
228 
229  if(iME != wlToME_[wavelength_[index]]){
230  iME = wlToME_[wavelength_[index]];
231  static_cast<MESetMulti&>(meShape).use(iME);
232  }
233 
234  // EcalDataFrame is not a derived class of edm::DataFrame, but can take edm::DataFrame in the constructor
235  EcalDataFrame dataFrame(*digiItr);
236 
237  for(int iSample(0); iSample < 10; iSample++)
238  meShape.fill(id, iSample + 0.5, float(dataFrame.sample(iSample).adc()));
239 
240  EcalPnDiodeDetId pnidA(pnForCrystal(id, 'a'));
241  EcalPnDiodeDetId pnidB(pnForCrystal(id, 'b'));
242  if(pnidA.null() || pnidB.null()) continue;
243  pnAmp_.insert(std::make_pair(pnidA.rawId(), 0.));
244  pnAmp_.insert(std::make_pair(pnidB.rawId(), 0.));
245  }
246  }
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 249 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().

250  {
251  MESet& mePNAmplitude(MEs_.at("PNAmplitude"));
252 
253  unsigned iME(-1);
254 
255  for(EcalPnDiodeDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
256  if(digiItr->sample(0).gainId() != 0 && digiItr->sample(0).gainId() != 1) continue;
257 
258  const EcalPnDiodeDetId& id(digiItr->id());
259 
260  std::map<uint32_t, float>::iterator ampItr(pnAmp_.find(id.rawId()));
261  if(ampItr == pnAmp_.end()) continue;
262 
263  unsigned iDCC(dccId(id) - 1);
264  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
265  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
266 
267  float pedestal(0.);
268  for(int iSample(0); iSample < 4; iSample++)
269  pedestal += digiItr->sample(iSample).adc();
270  pedestal /= 4.;
271 
272  float max(0.);
273  for(int iSample(0); iSample < 50; iSample++){
274  float amp(digiItr->sample(iSample).adc() - pedestal);
275  if(amp > max) max = amp;
276  }
277 
278  if(iME != wlToME_[wavelength_[index]]){
279  iME = wlToME_[wavelength_[index]];
280  static_cast<MESetMulti&>(mePNAmplitude).use(iME);
281  }
282 
283  mePNAmplitude.fill(id, max);
284 
285  ampItr->second = max;
286  }
287  }
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::DQWorker::MEs_, ecaldqm::nEBDCC, ecaldqm::nEEDCC, rtHalf_, wavelength_, and wlToME_.

Referenced by analyze().

89  {
90  MESet& meCalibStatus(MEs_.at("CalibStatus"));
91  for(EcalRawDataCollection::const_iterator rItr(_rawData.begin()); rItr != _rawData.end(); ++rItr){
92  unsigned iDCC(rItr->id() - 1);
93  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
94  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
95 
96  if(!enable_[index]){
97  wavelength_[index] = -1;
98  rtHalf_[index] = -1;
99  continue;
100  }
101  if(rItr->getEventSettings().wavelength == 0)
102  wavelength_[index] = 1;
103  else if(rItr->getEventSettings().wavelength == 2)
104  wavelength_[index] = 2;
105  else
106  wavelength_[index] = -1;
107 
108  if(wlToME_.find(wavelength_[index]) == wlToME_.end())
109  enable_[index] = false;
110 
111  rtHalf_[index] = rItr->getRtHalf();
112  }
113  bool LedStatus[2];
114  for(unsigned iW(0); iW < 2; iW++){
115  LedStatus[iW] = false;
116  }
117  for(unsigned index(0); index < nEEDCC; ++index){
118  switch (wavelength_[index])
119  {
120  case 1:
121  LedStatus[0] = true;
122  break;
123  case 2:
124  LedStatus[1] = true;
125  break;
126  default:
127  break;
128  }
129  }
130  for(unsigned iWL(0); iWL<2; iWL++){
131  meCalibStatus.fill(double(iWL+3), LedStatus[iWL]? 1:0);
132  }
133  }
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
MESetCollection MEs_
Definition: DQWorker.h:75
std::map< int, unsigned > wlToME_
Definition: LedTask.h:38
void ecaldqm::LedTask::runOnUncalibRecHits ( EcalUncalibratedRecHitCollection const &  _uhits)

Definition at line 290 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().

291  {
292  using namespace std;
293 
294  MESet& meAmplitude(MEs_.at("Amplitude"));
295  MESet& meAmplitudeSummary(MEs_.at("AmplitudeSummary"));
296  MESet& meTiming(MEs_.at("Timing"));
297  MESet& meAOverP(MEs_.at("AOverP"));
298 
299  unsigned iME(-1);
300 
301  for(EcalUncalibratedRecHitCollection::const_iterator uhitItr(_uhits.begin()); uhitItr != _uhits.end(); ++uhitItr){
302  EEDetId id(uhitItr->id());
303 
304  unsigned iDCC(dccId(id) - 1);
305  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) continue;
306  unsigned index(iDCC <= kEEmHigh ? iDCC : iDCC - nEBDCC);
307 
308  if(!enable_[index]) continue;
309  if(rtHalf(id) != rtHalf_[index]) continue;
310 
311  if(iME != wlToME_[wavelength_[index]]){
312  iME = wlToME_[wavelength_[index]];
313  static_cast<MESetMulti&>(meAmplitude).use(iME);
314  static_cast<MESetMulti&>(meAmplitudeSummary).use(iME);
315  static_cast<MESetMulti&>(meTiming).use(iME);
316  static_cast<MESetMulti&>(meAOverP).use(iME);
317  }
318 
319  float amp(max((double)uhitItr->amplitude(), 0.));
320  float jitter(max((double)uhitItr->jitter() + 5.0, 0.));
321 
322  meAmplitude.fill(id, amp);
323  meAmplitudeSummary.fill(id, amp);
324  meTiming.fill(id, jitter);
325 
326  float aop(0.);
327 
328  map<uint32_t, float>::iterator ampItrA(pnAmp_.find(pnForCrystal(id, 'a')));
329  map<uint32_t, float>::iterator ampItrB(pnAmp_.find(pnForCrystal(id, 'b')));
330  if(ampItrA == pnAmp_.end() && ampItrB == pnAmp_.end()) continue;
331  else if(ampItrB == pnAmp_.end()) aop = amp / ampItrA->second;
332  else if(ampItrA == pnAmp_.end()) aop = amp / ampItrB->second;
333  else aop = amp / (ampItrA->second + ampItrB->second) * 2.;
334 
335  meAOverP.fill(id, aop);
336  }
337  }
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_, 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  }
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().