#include <IntegrityTask.h>
Public Types | |
enum | MESets { kByLumi, kTotal, kGain, kChId, kGainSwitch, kBlockSize, kTowerId, kFEDNonFatal, nMESets } |
Public Member Functions | |
void | analyze (const void *, Collections) |
void | beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) |
void | bookMEs () |
IntegrityTask (const edm::ParameterSet &, const edm::ParameterSet &) | |
void | runOnErrors (const DetIdCollection &, Collections) |
void | runOnErrors (const EcalElectronicsIdCollection &, Collections) |
~IntegrityTask () | |
Static Public Member Functions | |
static void | setMEData (std::vector< MEData > &) |
Private Attributes | |
std::string | hltTaskFolder_ |
int | hltTaskMode_ |
Definition at line 11 of file IntegrityTask.h.
Reimplemented from ecaldqm::DQWorker.
Definition at line 25 of file IntegrityTask.h.
{ kByLumi, kTotal, kGain, kChId, kGainSwitch, kBlockSize, kTowerId, kFEDNonFatal, nMESets };
data refman pasoursint CMSSW_5_3_10_patch2 src DQM EcalBarrelMonitorTasks src IntegrityTask cc ecaldqm::IntegrityTask::IntegrityTask | ( | const edm::ParameterSet & | _params, |
const edm::ParameterSet & | _paths | ||
) |
Definition at line 8 of file IntegrityTask.cc.
References edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::kBlockSizeErrors, ecaldqm::kChIdErrors, ecaldqm::kGainErrors, ecaldqm::kGainSwitchErrors, ecaldqm::kLumiSection, ecaldqm::kTowerIdErrors, and scaleCards::path.
{ collectionMask_ = (0x1 << kLumiSection) | (0x1 << kGainErrors) | (0x1 << kChIdErrors) | (0x1 << kGainSwitchErrors) | (0x1 << kTowerIdErrors) | (0x1 << kBlockSizeErrors); edm::ParameterSet const& commonParams(_params.getUntrackedParameterSet("Common")); hltTaskMode_ = commonParams.getUntrackedParameter<int>("hltTaskMode"); hltTaskFolder_ = commonParams.getUntrackedParameter<std::string>("hltTaskFolder"); if(hltTaskMode_ != 0 && hltTaskFolder_.size() == 0) throw cms::Exception("InvalidConfiguration") << "HLTTask mode needs a folder name"; if(hltTaskMode_ != 0){ std::string path; std::map<std::string, std::string> replacements; replacements["hlttask"] = hltTaskFolder_; MEs_[kFEDNonFatal]->name(replacements); } }
ecaldqm::IntegrityTask::~IntegrityTask | ( | ) |
Definition at line 38 of file IntegrityTask.cc.
{ }
void ecaldqm::IntegrityTask::analyze | ( | const void * | _p, |
Collections | _collection | ||
) | [inline, virtual] |
Reimplemented from ecaldqm::DQWorkerTask.
Definition at line 44 of file IntegrityTask.h.
References ecaldqm::kBlockSizeErrors, ecaldqm::kChIdErrors, ecaldqm::kGainErrors, ecaldqm::kGainSwitchErrors, ecaldqm::kTowerIdErrors, and runOnErrors().
{ switch(_collection){ case kGainErrors: case kChIdErrors: case kGainSwitchErrors: runOnErrors(*static_cast<const DetIdCollection*>(_p), _collection); break; case kTowerIdErrors: case kBlockSizeErrors: runOnErrors(*static_cast<const EcalElectronicsIdCollection*>(_p), _collection); break; default: break; } }
void ecaldqm::IntegrityTask::beginLuminosityBlock | ( | const edm::LuminosityBlock & | , |
const edm::EventSetup & | |||
) | [virtual] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 54 of file IntegrityTask.cc.
References kByLumi, and ecaldqm::DQWorker::MEs_.
void ecaldqm::IntegrityTask::bookMEs | ( | ) | [virtual] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 43 of file IntegrityTask.cc.
References hltTaskMode_, kByLumi, kFEDNonFatal, and ecaldqm::DQWorker::MEs_.
{ if(hltTaskMode_ != 1){ for(unsigned iME(kByLumi); iME < kFEDNonFatal; iME++) MEs_[iME]->book(); } if(hltTaskMode_ != 0) MEs_[kFEDNonFatal]->book(); }
void ecaldqm::IntegrityTask::runOnErrors | ( | const DetIdCollection & | _ids, |
Collections | _collection | ||
) |
Definition at line 60 of file IntegrityTask.cc.
References edm::EDCollection< T >::begin(), edm::EDCollection< T >::end(), lumiContext::fill, kByLumi, kChId, ecaldqm::kChIdErrors, kFEDNonFatal, kGain, ecaldqm::kGainErrors, kGainSwitch, ecaldqm::kGainSwitchErrors, kTotal, ecaldqm::DQWorker::MEs_, and nMESets.
Referenced by analyze().
{ MESets set(nMESets); switch(_collection){ case kGainErrors: set = kGain; break; case kChIdErrors: set = kChId; break; case kGainSwitchErrors: set = kGainSwitch; break; default: return; } for(DetIdCollection::const_iterator idItr(_ids.begin()); idItr != _ids.end(); ++idItr){ if(MEs_[set]->isActive()) MEs_[set]->fill(*idItr); if(MEs_[kFEDNonFatal]->isActive()) MEs_[kFEDNonFatal]->fill(*idItr); if(MEs_[kByLumi]->isActive()) MEs_[kByLumi]->fill(*idItr); if(MEs_[kTotal]->isActive()) MEs_[kTotal]->fill(*idItr); } }
void ecaldqm::IntegrityTask::runOnErrors | ( | const EcalElectronicsIdCollection & | _ids, |
Collections | _collection | ||
) |
Definition at line 86 of file IntegrityTask.cc.
References edm::EDCollection< T >::begin(), edm::EDCollection< T >::end(), lumiContext::fill, kBlockSize, ecaldqm::kBlockSizeErrors, kByLumi, kFEDNonFatal, kTotal, kTowerId, ecaldqm::kTowerIdErrors, ecaldqm::DQWorker::MEs_, and nMESets.
{ MESets set(nMESets); switch(_collection){ case kTowerIdErrors: set = kTowerId; break; case kBlockSizeErrors: set = kBlockSize; break; default: return; } // 25 is not correct for(EcalElectronicsIdCollection::const_iterator idItr(_ids.begin()); idItr != _ids.end(); ++idItr){ if(MEs_[set]->isActive()) MEs_[set]->fill(*idItr, 25.); if(MEs_[kFEDNonFatal]->isActive()) MEs_[kFEDNonFatal]->fill(*idItr, 25.); if(MEs_[kByLumi]->isActive()) MEs_[kByLumi]->fill(*idItr, 25.); if(MEs_[kTotal]->isActive()) MEs_[kTotal]->fill(*idItr, 25.); } }
void ecaldqm::IntegrityTask::setMEData | ( | std::vector< MEData > & | _data | ) | [static] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 113 of file IntegrityTask.cc.
References MonitorElement::DQM_KIND_TH1F, kBlockSize, kByLumi, EcalDQMBinningService::kChannel, kChId, EcalDQMBinningService::kCrystal, EcalDQMBinningService::kDCC, EcalDQMBinningService::kEcal2P, kFEDNonFatal, kGain, kGainSwitch, EcalDQMBinningService::kSuperCrystal, kTotal, and kTowerId.
{ _data[kByLumi] = MEData("ByLumi", BinService::kEcal2P, BinService::kDCC, MonitorElement::DQM_KIND_TH1F); _data[kTotal] = MEData("Total", BinService::kEcal2P, BinService::kDCC, MonitorElement::DQM_KIND_TH1F); _data[kGain] = MEData("Gain", BinService::kChannel, BinService::kCrystal, MonitorElement::DQM_KIND_TH1F); _data[kChId] = MEData("ChId", BinService::kChannel, BinService::kCrystal, MonitorElement::DQM_KIND_TH1F); _data[kGainSwitch] = MEData("GainSwitch", BinService::kChannel, BinService::kCrystal, MonitorElement::DQM_KIND_TH1F); _data[kBlockSize] = MEData("BlockSize", BinService::kChannel, BinService::kSuperCrystal, MonitorElement::DQM_KIND_TH1F); _data[kTowerId] = MEData("TowerId", BinService::kChannel, BinService::kSuperCrystal, MonitorElement::DQM_KIND_TH1F); _data[kFEDNonFatal] = MEData("FEDNonFatal", BinService::kEcal2P, BinService::kDCC, MonitorElement::DQM_KIND_TH1F); }
std::string ecaldqm::IntegrityTask::hltTaskFolder_ [private] |
Definition at line 41 of file IntegrityTask.h.
int ecaldqm::IntegrityTask::hltTaskMode_ [private] |
Definition at line 40 of file IntegrityTask.h.
Referenced by bookMEs().