Skip to content

Commit

Permalink
fix the ECAL LED task
Browse files Browse the repository at this point in the history
  • Loading branch information
Menglei committed Jul 10, 2015
1 parent 49b3388 commit 3dcad9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions DQM/EcalMonitorTasks/interface/LedTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace ecaldqm {
void runOnPnDigis(EcalPnDiodeDigiCollection const&);
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const&);

void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
private:
void setParams(edm::ParameterSet const&);

Expand All @@ -43,6 +44,7 @@ namespace ecaldqm {

int emptyLS_;
int emptyLSLimit_;
int isemptyLS;
};

inline bool LedTask::analyze(void const* _p, Collections _collection){
Expand Down
11 changes: 10 additions & 1 deletion DQM/EcalMonitorTasks/src/LedTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ namespace ecaldqm {
void
LedTask::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
{
if(++emptyLS_ > emptyLSLimit_) emptyLS_ = -1;
isemptyLS = 0;
if(emptyLS_+1 > emptyLSLimit_) emptyLS_ = -1;
}

void
Expand Down Expand Up @@ -186,6 +187,9 @@ namespace ecaldqm {
meSignalRate.fill((index <= kEEmHigh ? index : index + nEBDCC) + 1, enable_[index] ? 1 : 0);
}

if(!enable && isemptyLS >= 0) isemptyLS = 1;
else if(enable) isemptyLS = -1;

if(enable) emptyLS_ = 0;
else if(ledOnExpected) return;

Expand Down Expand Up @@ -311,6 +315,11 @@ namespace ecaldqm {
}
}

void
LedTask::endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&){
if(isemptyLS == 1)emptyLS_ += 1;
}

DEFINE_ECALDQM_WORKER(LedTask);
}

0 comments on commit 3dcad9e

Please sign in to comment.