#include <PresampleTask.h>
Public Types | |
enum | MESets { kPedestal, nMESets } |
Public Member Functions | |
void | analyze (const void *, Collections) |
bool | filterRunType (const std::vector< short > &) |
PresampleTask (const edm::ParameterSet &, const edm::ParameterSet &) | |
void | runOnDigis (const EcalDigiCollection &) |
~PresampleTask () | |
Static Public Member Functions | |
static void | setMEData (std::vector< MEData > &) |
Definition at line 10 of file PresampleTask.h.
Reimplemented from ecaldqm::DQWorker.
Definition at line 21 of file PresampleTask.h.
data refman pasoursint CMSSW_5_3_10_patch1 src DQM EcalBarrelMonitorTasks src PresampleTask cc ecaldqm::PresampleTask::PresampleTask | ( | const edm::ParameterSet & | _params, |
const edm::ParameterSet & | _paths | ||
) |
Definition at line 9 of file PresampleTask.cc.
References ecaldqm::kEBDigi, and ecaldqm::kEEDigi.
{ collectionMask_ = (0x1 << kEBDigi) | (0x1 << kEEDigi); }
ecaldqm::PresampleTask::~PresampleTask | ( | ) |
Definition at line 17 of file PresampleTask.cc.
{ }
void ecaldqm::PresampleTask::analyze | ( | const void * | _p, |
Collections | _collection | ||
) | [inline, virtual] |
Reimplemented from ecaldqm::DQWorkerTask.
Definition at line 29 of file PresampleTask.h.
References ecaldqm::kEBDigi, ecaldqm::kEEDigi, and runOnDigis().
{ switch(_collection){ case kEBDigi: case kEEDigi: runOnDigis(*static_cast<const EcalDigiCollection*>(_p)); break; default: break; } }
bool ecaldqm::PresampleTask::filterRunType | ( | const std::vector< short > & | _runType | ) | [virtual] |
Reimplemented from ecaldqm::DQWorkerTask.
Definition at line 22 of file PresampleTask.cc.
References EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, EcalDCCHeaderBlock::MTCC, EcalDCCHeaderBlock::PHYSICS_GLOBAL, and EcalDCCHeaderBlock::PHYSICS_LOCAL.
{ for(int iFED(0); iFED < 54; iFED++){ if ( _runType[iFED] == EcalDCCHeaderBlock::COSMIC || _runType[iFED] == EcalDCCHeaderBlock::MTCC || _runType[iFED] == EcalDCCHeaderBlock::COSMICS_GLOBAL || _runType[iFED] == EcalDCCHeaderBlock::PHYSICS_GLOBAL || _runType[iFED] == EcalDCCHeaderBlock::COSMICS_LOCAL || _runType[iFED] == EcalDCCHeaderBlock::PHYSICS_LOCAL ) return true; } return false; }
void ecaldqm::PresampleTask::runOnDigis | ( | const EcalDigiCollection & | _digis | ) |
Definition at line 37 of file PresampleTask.cc.
References edm::DataFrameContainer::begin(), edm::DataFrameContainer::end(), errorMatrix2Lands_multiChannel::id, kPedestal, timingPdfMaker::mean, and ecaldqm::DQWorker::MEs_.
Referenced by analyze().
{ for(EcalDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){ DetId id(digiItr->id()); // EcalDataFrame is not a derived class of edm::DataFrame, but can take edm::DataFrame in the constructor EcalDataFrame dataFrame(*digiItr); float mean(0.); bool gainSwitch(false); for(int iSample(0); iSample < 3; iSample++){ if(dataFrame.sample(iSample).gainId() != 1){ gainSwitch = true; break; } mean += dataFrame.sample(iSample).adc(); } if(gainSwitch) continue; mean /= 3.; MEs_[kPedestal]->fill(id, mean); } }
void ecaldqm::PresampleTask::setMEData | ( | std::vector< MEData > & | _data | ) | [static] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 66 of file PresampleTask.cc.
References MonitorElement::DQM_KIND_TPROFILE2D, EcalDQMBinningService::AxisSpecs::high, EcalDQMBinningService::kCrystal, kPedestal, EcalDQMBinningService::kSM, and EcalDQMBinningService::AxisSpecs::low.
{ BinService::AxisSpecs axis; axis.low = 160.; axis.high = 240.; _data[kPedestal] = MEData("Pedestal", BinService::kSM, BinService::kCrystal, MonitorElement::DQM_KIND_TPROFILE2D, 0, 0, &axis); }