#include <DQWorkerClient.h>
Public Types | |
enum | Sources { nSources } |
Public Member Functions | |
DQWorkerClient (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &) | |
virtual void | endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) |
virtual void | initialize () |
virtual void | producePlots ()=0 |
void | reset () |
virtual | ~DQWorkerClient () |
Static Public Attributes | |
static EcalDQMChannelStatus const * | channelStatus |
static EcalDQMTowerStatus const * | towerStatus |
Protected Member Functions | |
void | fillQuality_ (unsigned, DetId const &, uint32_t, float) |
void | source_ (unsigned, std::string const &, unsigned, edm::ParameterSet const &) |
Protected Attributes | |
std::vector< MESet const * > | sources_ |
Definition at line 13 of file DQWorkerClient.h.
Reimplemented in ecaldqm::CertificationClient, ecaldqm::IntegrityClient, ecaldqm::LaserClient, ecaldqm::OccupancyClient, ecaldqm::PresampleClient, ecaldqm::RawDataClient, ecaldqm::SelectiveReadoutClient, ecaldqm::SummaryClient, ecaldqm::TimingClient, and ecaldqm::TrigPrimClient.
Definition at line 26 of file DQWorkerClient.h.
{ nSources };
ecaldqm::DQWorkerClient::DQWorkerClient | ( | const edm::ParameterSet & | _params, |
const edm::ParameterSet & | _paths, | ||
std::string const & | _name | ||
) |
Definition at line 13 of file DQWorkerClient.cc.
virtual ecaldqm::DQWorkerClient::~DQWorkerClient | ( | ) | [inline, virtual] |
Definition at line 16 of file DQWorkerClient.h.
{}
void ecaldqm::DQWorkerClient::endLuminosityBlock | ( | const edm::LuminosityBlock & | , |
const edm::EventSetup & | |||
) | [virtual] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 20 of file DQWorkerClient.cc.
References ecaldqm::MESetChannel::checkDirectory(), and sources_.
void ecaldqm::DQWorkerClient::fillQuality_ | ( | unsigned | _iME, |
DetId const & | _id, | ||
uint32_t | _mask, | ||
float | _quality | ||
) | [protected] |
Definition at line 63 of file DQWorkerClient.cc.
References channelStatus, EcalBarrel, EcalEndcap, EcalTriggerTower, EcalCondTowerObjectContainer< T >::end(), EcalCondObjectContainer< T >::end(), EcalCondObjectContainer< T >::find(), EcalCondTowerObjectContainer< T >::find(), ecaldqm::getElectronicsMap(), ecaldqm::getTrigTowerMap(), ecaldqm::isEcalScDetId(), EcalScDetId::ix(), EcalScDetId::iy(), EcalDQMBinningService::kSuperCrystal, EcalDQMBinningService::kTriggerTower, ecaldqm::DQWorker::MEs_, DetId::rawId(), EEDetId::sc(), DetId::subdetId(), EBDetId::tower(), towerStatus, EEDetId::validDetId(), and EcalScDetId::zside().
Referenced by ecaldqm::IntegrityClient::producePlots(), ecaldqm::OccupancyClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::RawDataClient::producePlots(), ecaldqm::PresampleClient::producePlots(), and ecaldqm::TrigPrimClient::producePlots().
{ using namespace std; bool doMask(false); // turn off masking for good channel for the time being // update the RP then enable again if(_quality != 1. && channelStatus && towerStatus){ BinService::BinningType btype(MEs_[_iME]->getBinType()); bool searchTower(btype == BinService::kTriggerTower || btype == BinService::kSuperCrystal); switch(_id.subdetId()){ case EcalBarrel: if(searchTower){ EcalTrigTowerDetId ttid(EBDetId(_id).tower()); int tccid(getElectronicsMap()->TCCid(ttid)); int itt(getElectronicsMap()->iTT(ttid)); vector<DetId> ids(getElectronicsMap()->ttConstituents(tccid, itt)); for(vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr){ if(doMask) break; EcalDQMChannelStatus::const_iterator cItr(channelStatus->find(idItr->rawId())); if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask; } } else{ EcalDQMChannelStatus::const_iterator cItr(channelStatus->find(_id.rawId())); if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask; } if(!doMask){ EcalDQMTowerStatus::const_iterator tItr(towerStatus->find(EBDetId(_id).tower().rawId())); if(tItr != towerStatus->end()) doMask |= tItr->getStatusCode() & _mask; } break; case EcalEndcap: if(isEcalScDetId(_id)){ EcalScDetId scid(_id); for(int ix(1); ix <= 5; ix++){ for(int iy(1); iy <= 5; iy++){ if(doMask) break; int iix((scid.ix() - 1) * 5 + ix); int iiy((scid.iy() - 1) * 5 + iy); if(!EEDetId::validDetId(iix, iiy, scid.zside())) continue; EcalDQMChannelStatus::const_iterator cItr(channelStatus->find(EEDetId(iix, iiy, scid.zside()).rawId())); if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask; } } if(!doMask){ EcalDQMTowerStatus::const_iterator tItr(towerStatus->find(_id.rawId())); if(tItr != towerStatus->end()) doMask |= tItr->getStatusCode() & _mask; } } else{ if(searchTower){ EcalScDetId scid(EEDetId(_id).sc()); for(int ix(1); ix <= 5; ix++){ for(int iy(1); iy <= 5; iy++){ if(doMask) break; int iix((scid.ix() - 1) * 5 + ix); int iiy((scid.iy() - 1) * 5 + iy); if(!EEDetId::validDetId(iix, iiy, scid.zside())) continue; EcalDQMChannelStatus::const_iterator cItr(channelStatus->find(EEDetId(iix, iiy, scid.zside()).rawId())); if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask; } } } else{ EcalDQMChannelStatus::const_iterator cItr(channelStatus->find(_id.rawId())); if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask; } if(!doMask){ EcalDQMTowerStatus::const_iterator tItr(towerStatus->find(EEDetId(_id).sc().rawId())); if(tItr != towerStatus->end()) doMask |= tItr->getStatusCode() & _mask; } } break; case EcalTriggerTower: { EcalTrigTowerDetId ttid(_id); vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttid)); for(vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr){ if(doMask) break; EcalDQMChannelStatus::const_iterator cItr(channelStatus->find(idItr->rawId())); if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask; if(doMask) break; if(idItr->subdetId() == EcalBarrel){ if(idItr != ids.begin()) continue; EcalDQMTowerStatus::const_iterator tItr(towerStatus->find(EBDetId(*idItr).tower().rawId())); if(tItr != towerStatus->end()) doMask |= tItr->getStatusCode() & _mask; } else{ EcalDQMTowerStatus::const_iterator tItr(towerStatus->find(EEDetId(*idItr).sc().rawId())); if(tItr != towerStatus->end()) doMask |= tItr->getStatusCode() & _mask; } } } break; default: break; } } float quality(doMask ? _quality + 3. : _quality); MEs_[_iME]->setBinContent(_id, quality); }
void ecaldqm::DQWorkerClient::initialize | ( | ) | [virtual] |
Reimplemented in ecaldqm::LaserClient.
Definition at line 37 of file DQWorkerClient.cc.
References ecaldqm::DQWorker::initialized_, and sources_.
Referenced by EcalDQMonitorClient::runWorkers().
{ initialized_ = true; for(std::vector<MESet const*>::iterator sItr(sources_.begin()); sItr != sources_.end(); ++sItr) initialized_ &= (*sItr)->retrieve(); }
virtual void ecaldqm::DQWorkerClient::producePlots | ( | ) | [pure virtual] |
Implemented in ecaldqm::CertificationClient, ecaldqm::IntegrityClient, ecaldqm::LaserClient, ecaldqm::OccupancyClient, ecaldqm::PresampleClient, ecaldqm::RawDataClient, ecaldqm::SelectiveReadoutClient, ecaldqm::SummaryClient, ecaldqm::TimingClient, and ecaldqm::TrigPrimClient.
Referenced by EcalDQMonitorClient::runWorkers().
void ecaldqm::DQWorkerClient::reset | ( | void | ) | [virtual] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 29 of file DQWorkerClient.cc.
References sources_.
{ DQWorker::reset(); for(std::vector<MESet const*>::iterator sItr(sources_.begin()); sItr != sources_.end(); ++sItr) (*sItr)->clear(); }
void ecaldqm::DQWorkerClient::source_ | ( | unsigned | _iS, |
std::string const & | _worker, | ||
unsigned | _iW, | ||
edm::ParameterSet const & | _sources | ||
) | [protected] |
Definition at line 45 of file DQWorkerClient.cc.
References ecaldqm::DQWorker::createMESet_(), data, edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::DQWorker::meData, sources_, and AlCaHLTBitMon_QueryRunRegistry::string.
{ if(_iS >= sources_.size()) sources_.resize(_iS + 1, 0); std::map<std::string, std::vector<MEData> >::const_iterator dataItr(meData.find(_worker)); if(dataItr == meData.end()) throw cms::Exception("InvalidCall") << "DQWorker " << _worker << " is not defined"; MEData const& data(dataItr->second.at(_iW)); edm::ParameterSet const& workerPaths(_sources.getUntrackedParameterSet(_worker)); std::string fullpath(workerPaths.getUntrackedParameter<std::string>(data.pathName)); sources_.at(_iS) = createMESet_(fullpath, data, true); }
EcalDQMChannelStatus const * ecaldqm::DQWorkerClient::channelStatus [static] |
Definition at line 30 of file DQWorkerClient.h.
Referenced by fillQuality_().
std::vector<MESet const*> ecaldqm::DQWorkerClient::sources_ [protected] |
Definition at line 37 of file DQWorkerClient.h.
Referenced by endLuminosityBlock(), ecaldqm::LaserClient::initialize(), initialize(), ecaldqm::IntegrityClient::producePlots(), ecaldqm::OccupancyClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::RawDataClient::producePlots(), ecaldqm::LaserClient::producePlots(), ecaldqm::SummaryClient::producePlots(), ecaldqm::SelectiveReadoutClient::producePlots(), ecaldqm::PresampleClient::producePlots(), ecaldqm::TrigPrimClient::producePlots(), reset(), and source_().
EcalDQMTowerStatus const * ecaldqm::DQWorkerClient::towerStatus [static] |
Definition at line 31 of file DQWorkerClient.h.
Referenced by fillQuality_(), and ecaldqm::RawDataClient::producePlots().