CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
ecaldqm::LaserTask Class Reference

#include <LaserTask.h>

Inheritance diagram for ecaldqm::LaserTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

Public Types

enum  Wavelength { kGreen, kBlue, kIRed, nWavelength }
 
- Public Types inherited from ecaldqm::DQWorkerTask
typedef EcalDCCHeaderBlock::EcalDCCEventSettings EventSettings
 

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
 
bool filterRunType (short const *) override
 
 LaserTask ()
 
template<typename DigiCollection >
void runOnDigis (DigiCollection const &)
 
void runOnPnDigis (EcalPnDiodeDigiCollection const &)
 
void runOnRawData (EcalRawDataCollection const &)
 
void runOnUncalibRecHits (EcalUncalibratedRecHitCollection const &)
 
 ~LaserTask ()
 
- 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 ()
 
 ~DQWorkerTask () override
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void bookMEs (DQMStore::IBooker &)
 
 DQWorker ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
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 ()(false)
 

Private Member Functions

void setParams (edm::ParameterSet const &) override
 

Private Attributes

int emptyLS_
 
int emptyLSLimit_
 
bool enable_ [nDCC]
 
int maxPedestal_
 
std::map< uint32_t, float > pnAmp_
 
unsigned rtHalf_ [nDCC]
 
unsigned wavelength_ [nDCC]
 
std::map< int, unsigned > wlToME_
 

Additional Inherited Members

- 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 LaserTask.h.

Member Enumeration Documentation

Enumerator
kGreen 
kBlue 
kIRed 
nWavelength 

Definition at line 34 of file LaserTask.h.

Constructor & Destructor Documentation

LaserTask::LaserTask ( )

Definition at line 9 of file LaserTask.cc.

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

9  :
10  DQWorkerTask(),
11  wlToME_(),
12  pnAmp_(),
13  emptyLS_(0),
14  emptyLSLimit_(0),
15  maxPedestal_(0)
16  {
17  std::fill_n(enable_, nDCC, false);
18  std::fill_n(wavelength_, nDCC, 0);
19  std::fill_n(rtHalf_, nDCC, 0);
20  }
unsigned rtHalf_[nDCC]
Definition: LaserTask.h:48
std::map< int, unsigned > wlToME_
Definition: LaserTask.h:44
std::map< uint32_t, float > pnAmp_
Definition: LaserTask.h:49
unsigned wavelength_[nDCC]
Definition: LaserTask.h:47
bool enable_[nDCC]
Definition: LaserTask.h:46
ecaldqm::LaserTask::~LaserTask ( )
inline

Member Function Documentation

void LaserTask::addDependencies ( DependencySet _dependencies)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 44 of file LaserTask.cc.

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

Referenced by ~LaserTask().

45  {
46  _dependencies.push_back(Dependency(kEBDigi, kEcalRawData));
47  _dependencies.push_back(Dependency(kEEDigi, kEcalRawData));
48  _dependencies.push_back(Dependency(kPnDiodeDigi, kEBDigi, kEEDigi, kEcalRawData));
49  _dependencies.push_back(Dependency(kEBLaserLedUncalibRecHit, kPnDiodeDigi, kEBDigi, kEcalRawData));
50  _dependencies.push_back(Dependency(kEELaserLedUncalibRecHit, kPnDiodeDigi, kEEDigi, kEcalRawData));
51  }
bool LaserTask::analyze ( void const *  _p,
Collections  _collection 
)
inlineoverridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 56 of file LaserTask.h.

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

Referenced by ~LaserTask().

56  {
57  switch(_collection){
58  case kEcalRawData:
59  if(_p) runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
60  return true;
61  break;
62  case kEBDigi:
63  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p));
64  return true;
65  break;
66  case kEEDigi:
67  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
68  return true;
69  break;
70  case kPnDiodeDigi:
71  if(_p) runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
72  return true;
73  break;
76  if(_p) runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
77  return true;
78  break;
79  default:
80  break;
81  }
82 
83  return false;
84  }
void runOnDigis(DigiCollection const &)
Definition: LaserTask.cc:137
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: LaserTask.cc:257
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: LaserTask.cc:301
void runOnRawData(EcalRawDataCollection const &)
Definition: LaserTask.cc:90
void LaserTask::beginEvent ( edm::Event const &  _evt,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 84 of file LaserTask.cc.

References pnAmp_.

Referenced by ~LaserTask().

85  {
86  pnAmp_.clear();
87  }
std::map< uint32_t, float > pnAmp_
Definition: LaserTask.h:49
void LaserTask::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 78 of file LaserTask.cc.

References emptyLS_, and emptyLSLimit_.

Referenced by ~LaserTask().

79  {
80  if(++emptyLS_ > emptyLSLimit_) emptyLS_ = -1;
81  }
void LaserTask::beginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 72 of file LaserTask.cc.

References emptyLS_.

Referenced by ~LaserTask().

73  {
74  emptyLS_ = 0;
75  }
bool LaserTask::filterRunType ( short const *  _runType)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 54 of file LaserTask.cc.

References Reconstruction_hiPF_cff::enable, enable_, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_STD, and ecaldqm::nDCC.

Referenced by ~LaserTask().

55  {
56  bool enable(false);
57 
58  for(unsigned iDCC(0); iDCC < nDCC; iDCC++){
59  if(_runType[iDCC] == EcalDCCHeaderBlock::LASER_STD ||
60  _runType[iDCC] == EcalDCCHeaderBlock::LASER_GAP){
61  enable = true;
62  enable_[iDCC] = true;
63  }
64  else
65  enable_[iDCC] = false;
66  }
67 
68  return enable;
69  }
bool enable_[nDCC]
Definition: LaserTask.h:46
template<typename DigiCollection >
void LaserTask::runOnDigis ( DigiCollection const &  _digis)

Definition at line 137 of file LaserTask.cc.

References ecalMGPA::adc(), EcalMGPASample::adc(), ecaldqm::dccId(), emptyLS_, Reconstruction_hiPF_cff::enable, enable_, ecaldqm::MESetMulti::fill(), mps_fire::i, triggerObjects_cff::id, SiStripPI::max, maxPedestal_, EcalDataFrame::MAXSAMPLES, ecaldqm::DQWorker::MEs_, min(), ecaldqm::nDCC, DetId::null(), pnAmp_, ecaldqm::pnForCrystal(), DetId::rawId(), ecaldqm::rtHalf(), rtHalf_, EcalDataFrame::sample(), electronIdCutBased_cfi::threshold, wavelength_, and wlToME_.

Referenced by analyze(), and ~LaserTask().

138  {
139  MESet& meOccupancy(MEs_.at("Occupancy"));
140  MESet& meShape(MEs_.at("Shape"));
141  MESet& meSignalRate(MEs_.at("SignalRate"));
142 
143  bool inData[nDCC];
144  int nReadouts[nDCC];
145  int maxpos[nDCC][EcalDataFrame::MAXSAMPLES];
146  bool largeAmplitude[nDCC];
147  for(unsigned iDCC(0); iDCC < nDCC; ++iDCC){
148  inData[iDCC] = false;
149  nReadouts[iDCC] = 0;
150  for(int i(0); i < EcalDataFrame::MAXSAMPLES; i++) maxpos[iDCC][i] = 0;
151  largeAmplitude[iDCC] = false;
152  }
153 
154  for(typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
155  const DetId& id(digiItr->id());
156 
157  unsigned iDCC(dccId(id) - 1);
158 
159  inData[iDCC] = true;
160 
161  if(!enable_[iDCC]) continue;
162  if(rtHalf(id) != rtHalf_[iDCC]) continue;
163 
164  meOccupancy.fill(id);
165 
166  ++nReadouts[iDCC];
167 
168  EcalDataFrame dataFrame(*digiItr);
169 
170  int iMax(-1);
171  int max(0);
172  int min(4096);
173  for (int i(0); i < EcalDataFrame::MAXSAMPLES; i++) {
174  int adc(dataFrame.sample(i).adc());
175  if(adc > max){
176  max = adc;
177  iMax = i;
178  }
179  if(adc < min) min = adc;
180  if(adc > maxPedestal_) largeAmplitude[iDCC] = true;
181  }
182  if(iMax >= 0 && max - min > 3) // normal RMS of pedestal is ~2.5
183  maxpos[iDCC][iMax] += 1;
184  }
185 
186  // signal existence check
187  bool enable(false);
188  bool laserOnExpected(emptyLS_ >= 0);
189 
190  unsigned iME(-1);
191 
192  for(int iDCC(0); iDCC < nDCC; ++iDCC){
193  if(!inData[iDCC]) continue;
194 
195  if(nReadouts[iDCC] == 0){
196  enable_[iDCC] = false;
197  continue;
198  }
199 
200  int threshold(nReadouts[iDCC] / 3);
201  if(laserOnExpected) enable_[iDCC] = false;
202 
203  if(largeAmplitude[iDCC]){
204  enable = true;
205  enable_[iDCC] = true;
206  }
207  else{
208  for(int i(0); i < EcalDataFrame::MAXSAMPLES; i++){
209  if(maxpos[iDCC][i] > threshold){
210  enable = true;
211  enable_[iDCC] = true;
212  break;
213  }
214  }
215  }
216 
217  if(iME != wlToME_[wavelength_[iDCC]]){
218  iME = wlToME_[wavelength_[iDCC]];
219  static_cast<MESetMulti&>(meSignalRate).use(iME);
220  }
221 
222  meSignalRate.fill(iDCC + 1, enable_[iDCC] ? 1 : 0);
223  }
224 
225  if(enable) emptyLS_ = 0;
226  else if(laserOnExpected) return;
227 
228  iME = -1;
229 
230  for(typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
231  const DetId& id(digiItr->id());
232 
233  unsigned iDCC(dccId(id) - 1);
234 
235  if(!enable_[iDCC]) continue;
236  if(rtHalf(id) != rtHalf_[iDCC]) continue;
237 
238  EcalDataFrame dataFrame(*digiItr);
239 
240  if(iME != wlToME_[wavelength_[iDCC]]){
241  iME = wlToME_[wavelength_[iDCC]];
242  static_cast<MESetMulti&>(meShape).use(iME);
243  }
244 
245  for(int iSample(0); iSample < EcalDataFrame::MAXSAMPLES; iSample++)
246  meShape.fill(id, iSample + 0.5, float(dataFrame.sample(iSample).adc()));
247 
248  EcalPnDiodeDetId pnidA(pnForCrystal(id, 'a'));
249  EcalPnDiodeDetId pnidB(pnForCrystal(id, 'b'));
250  if(pnidA.null() || pnidB.null()) continue;
251  pnAmp_.insert(std::make_pair(pnidA.rawId(), 0.));
252  pnAmp_.insert(std::make_pair(pnidB.rawId(), 0.));
253  }
254  }
int adc(sample_type sample)
get the ADC sample (12 bits)
unsigned rtHalf_[nDCC]
Definition: LaserTask.h:48
std::map< int, unsigned > wlToME_
Definition: LaserTask.h:44
std::map< uint32_t, float > pnAmp_
Definition: LaserTask.h:49
unsigned wavelength_[nDCC]
Definition: LaserTask.h:47
EcalPnDiodeDetId pnForCrystal(DetId const &, char)
unsigned rtHalf(DetId const &)
T min(T a, T b)
Definition: MathUtil.h:58
Definition: DetId.h:18
MESetCollection MEs_
Definition: DQWorker.h:75
bool enable_[nDCC]
Definition: LaserTask.h:46
unsigned dccId(DetId const &)
static const int MAXSAMPLES
Definition: EcalDataFrame.h:48
void LaserTask::runOnPnDigis ( EcalPnDiodeDigiCollection const &  _digis)

Definition at line 257 of file LaserTask.cc.

References edm::SortedCollection< T, SORT >::begin(), ecaldqm::dccId(), Reconstruction_hiPF_cff::enable, enable_, edm::SortedCollection< T, SORT >::end(), ecaldqm::MESetMulti::fill(), triggerObjects_cff::id, SiStripPI::max, ecaldqm::DQWorker::MEs_, ecaldqm::nDCC, muonCSCDigis_cfi::pedestal, pnAmp_, wavelength_, and wlToME_.

Referenced by analyze(), and ~LaserTask().

258  {
259  MESet& mePNAmplitude(MEs_.at("PNAmplitude"));
260 
261  bool enable(false);
262  for(unsigned iDCC(0); iDCC < nDCC; ++iDCC)
263  enable |= enable_[iDCC];
264  if(!enable) return;
265 
266  unsigned iME(-1);
267 
268  for(EcalPnDiodeDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
269  if(digiItr->sample(0).gainId() != 0 && digiItr->sample(0).gainId() != 1) continue;
270 
271  const EcalPnDiodeDetId& id(digiItr->id());
272 
273  std::map<uint32_t, float>::iterator ampItr(pnAmp_.find(id.rawId()));
274  if(ampItr == pnAmp_.end()) continue;
275 
276  unsigned iDCC(dccId(id) - 1);
277 
278  double pedestal(0.);
279  for(int iSample(0); iSample < 4; iSample++)
280  pedestal += digiItr->sample(iSample).adc();
281  pedestal /= 4.;
282 
283  double max(0.);
284  for(int iSample(0); iSample < 50; iSample++){
285  float amp(digiItr->sample(iSample).adc() - pedestal);
286  if(amp > max) max = amp;
287  }
288 
289  if(iME != wlToME_[wavelength_[iDCC]]){
290  iME = wlToME_[wavelength_[iDCC]];
291  static_cast<MESetMulti&>(mePNAmplitude).use(iME);
292  }
293 
294  mePNAmplitude.fill(id, max);
295 
296  ampItr->second = max;
297  }
298  }
std::map< int, unsigned > wlToME_
Definition: LaserTask.h:44
std::vector< EcalPnDiodeDigi >::const_iterator const_iterator
std::map< uint32_t, float > pnAmp_
Definition: LaserTask.h:49
unsigned wavelength_[nDCC]
Definition: LaserTask.h:47
MESetCollection MEs_
Definition: DQWorker.h:75
bool enable_[nDCC]
Definition: LaserTask.h:46
unsigned dccId(DetId const &)
void LaserTask::runOnRawData ( EcalRawDataCollection const &  _rawData)

Definition at line 90 of file LaserTask.cc.

References edm::SortedCollection< T, SORT >::begin(), enable_, edm::SortedCollection< T, SORT >::end(), ecaldqm::DQWorker::MEs_, ecaldqm::nDCC, nWavelength, rtHalf_, wavelength_, and wlToME_.

Referenced by analyze(), and ~LaserTask().

91  {
92  MESet& meCalibStatus(MEs_.at("CalibStatus"));
93  for(EcalRawDataCollection::const_iterator rItr(_rawData.begin()); rItr != _rawData.end(); ++rItr){
94  unsigned iDCC(rItr->id() - 1);
95 
96  if(!enable_[iDCC]){
97  wavelength_[iDCC] = -1;
98  rtHalf_[iDCC] = -1;
99  continue;
100  }
101  wavelength_[iDCC] = rItr->getEventSettings().wavelength + 1;
102 
103  if(wlToME_.find(wavelength_[iDCC]) == wlToME_.end())
104  enable_[iDCC] = false;
105 
106  rtHalf_[iDCC] = rItr->getRtHalf();
107  }
108  bool LaserStatus[nWavelength];
109  for(unsigned iW(0); iW < nWavelength; iW++){
110  LaserStatus[iW] = false;
111  }
112  for(unsigned iDCC(0); iDCC < nDCC; iDCC++){
113  switch (wavelength_[iDCC])
114  {
115  case 1:
116  break;
117  case 2:
118  LaserStatus[Wavelength::kGreen] = true;
119  break;
120  case 3:
121  LaserStatus[Wavelength::kBlue] = true;
122  break;
123  case 4:
124  LaserStatus[Wavelength::kIRed] = true;
125  break;
126  default:
127  break;
128  }
129  }
130  for(unsigned iWL(0); iWL<nWavelength; iWL++){
131  meCalibStatus.fill(double(iWL), LaserStatus[iWL]? 1:0);
132  }
133  }
unsigned rtHalf_[nDCC]
Definition: LaserTask.h:48
std::map< int, unsigned > wlToME_
Definition: LaserTask.h:44
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
unsigned wavelength_[nDCC]
Definition: LaserTask.h:47
MESetCollection MEs_
Definition: DQWorker.h:75
bool enable_[nDCC]
Definition: LaserTask.h:46
void LaserTask::runOnUncalibRecHits ( EcalUncalibratedRecHitCollection const &  _uhits)

Definition at line 301 of file LaserTask.cc.

References edm::SortedCollection< T, SORT >::begin(), ecaldqm::dccId(), DEFINE_ECALDQM_WORKER, Reconstruction_hiPF_cff::enable, enable_, edm::SortedCollection< T, SORT >::end(), ecaldqm::MESetMulti::fill(), triggerObjects_cff::id, SiStripPI::max, ecaldqm::DQWorker::MEs_, ecaldqm::nDCC, pnAmp_, ecaldqm::pnForCrystal(), ecaldqm::rtHalf(), rtHalf_, wavelength_, and wlToME_.

Referenced by analyze(), and ~LaserTask().

302  {
303  MESet& meAmplitude(MEs_.at("Amplitude"));
304  MESet& meAmplitudeSummary(MEs_.at("AmplitudeSummary"));
305  MESet& meTiming(MEs_.at("Timing"));
306  MESet& meAOverP(MEs_.at("AOverP"));
307 
308  using namespace std;
309 
310  bool enable(false);
311  for(unsigned iDCC(0); iDCC < nDCC; ++iDCC)
312  enable |= enable_[iDCC];
313  if(!enable) return;
314 
315  unsigned iME(-1);
316 
317  for(EcalUncalibratedRecHitCollection::const_iterator uhitItr(_uhits.begin()); uhitItr != _uhits.end(); ++uhitItr){
318  const DetId& id(uhitItr->id());
319 
320  unsigned iDCC(dccId(id) - 1);
321 
322  if(!enable_[iDCC]) continue;
323  if(rtHalf(id) != rtHalf_[iDCC]) continue;
324 
325  if(iME != wlToME_[wavelength_[iDCC]]){
326  iME = wlToME_[wavelength_[iDCC]];
327  static_cast<MESetMulti&>(meAmplitude).use(iME);
328  static_cast<MESetMulti&>(meAmplitudeSummary).use(iME);
329  static_cast<MESetMulti&>(meTiming).use(iME);
330  static_cast<MESetMulti&>(meAOverP).use(iME);
331  }
332 
333  float amp(max((double)uhitItr->amplitude(), 0.));
334  float jitter(max((double)uhitItr->jitter() + 5.0, 0.));
335 
336  meAmplitude.fill(id, amp);
337  meAmplitudeSummary.fill(id, amp);
338  meTiming.fill(id, jitter);
339 
340  float aop(0.);
341 
342  map<uint32_t, float>::iterator ampItrA(pnAmp_.find(pnForCrystal(id, 'a')));
343  map<uint32_t, float>::iterator ampItrB(pnAmp_.find(pnForCrystal(id, 'b')));
344  if(ampItrA == pnAmp_.end() && ampItrB == pnAmp_.end()) continue;
345  else if(ampItrB == pnAmp_.end()) aop = amp / ampItrA->second;
346  else if(ampItrA == pnAmp_.end()) aop = amp / ampItrB->second;
347  else aop = amp / (ampItrA->second + ampItrB->second) * 2.;
348 
349  meAOverP.fill(id, aop);
350  }
351  }
unsigned rtHalf_[nDCC]
Definition: LaserTask.h:48
std::map< int, unsigned > wlToME_
Definition: LaserTask.h:44
std::vector< EcalUncalibratedRecHit >::const_iterator const_iterator
std::map< uint32_t, float > pnAmp_
Definition: LaserTask.h:49
unsigned wavelength_[nDCC]
Definition: LaserTask.h:47
EcalPnDiodeDetId pnForCrystal(DetId const &, char)
unsigned rtHalf(DetId const &)
Definition: DetId.h:18
MESetCollection MEs_
Definition: DQWorker.h:75
bool enable_[nDCC]
Definition: LaserTask.h:46
unsigned dccId(DetId const &)
void LaserTask::setParams ( edm::ParameterSet const &  _params)
overrideprivatevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 23 of file LaserTask.cc.

References CustomPhysics_cfi::amplitude, emptyLSLimit_, Exception, ecaldqm::MESetMulti::getIndex(), edm::ParameterSet::getUntrackedParameter(), maxPedestal_, ecaldqm::DQWorker::MEs_, and wlToME_.

24  {
25  emptyLSLimit_ = _params.getUntrackedParameter<int>("emptyLSLimit");
26 
27  std::vector<int> laserWavelengths(_params.getUntrackedParameter<std::vector<int> >("laserWavelengths"));
28 
30 
31  MESetMulti& amplitude(static_cast<MESetMulti&>(MEs_.at("Amplitude")));
32  unsigned nWL(laserWavelengths.size());
33  for(unsigned iWL(0); iWL != nWL; ++iWL){
34  int wl(laserWavelengths[iWL]);
35  if(wl <= 0 || wl >= 5) throw cms::Exception("InvalidConfiguration") << "Laser Wavelength";
36  repl["wl"] = std::to_string(wl);
37  wlToME_[wl] = amplitude.getIndex(repl);
38  }
39 
40  maxPedestal_ = _params.getUntrackedParameter<int>("maxPedestal");
41  }
std::map< int, unsigned > wlToME_
Definition: LaserTask.h:44
MESetCollection MEs_
Definition: DQWorker.h:75
std::map< std::string, std::string > PathReplacements
Definition: MESet.h:31

Member Data Documentation

int ecaldqm::LaserTask::emptyLS_
private

Definition at line 51 of file LaserTask.h.

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

int ecaldqm::LaserTask::emptyLSLimit_
private

Definition at line 52 of file LaserTask.h.

Referenced by beginLuminosityBlock(), and setParams().

bool ecaldqm::LaserTask::enable_[nDCC]
private
int ecaldqm::LaserTask::maxPedestal_
private

Definition at line 53 of file LaserTask.h.

Referenced by runOnDigis(), and setParams().

std::map<uint32_t, float> ecaldqm::LaserTask::pnAmp_
private

Definition at line 49 of file LaserTask.h.

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

unsigned ecaldqm::LaserTask::rtHalf_[nDCC]
private

Definition at line 48 of file LaserTask.h.

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

unsigned ecaldqm::LaserTask::wavelength_[nDCC]
private

Definition at line 47 of file LaserTask.h.

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

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

Definition at line 44 of file LaserTask.h.

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