Public Types | |
typedef boost::shared_ptr < EcalNextToDeadChannel > | ReturnType |
Public Member Functions | |
EcalNextToDeadChannelESProducer (const edm::ParameterSet &iConfig) | |
ReturnType | produce (const EcalNextToDeadChannelRcd &iRecord) |
Private Member Functions | |
void | findNextToDeadChannelsCallback (const EcalChannelStatusRcd &chs) |
Private Attributes | |
ReturnType | returnRcd_ |
int | statusThreshold_ |
ESProducer to fill the EcalNextToDeadChannel record starting from EcalChannelStatus information
Definition at line 25 of file EcalNextToDeadChannelESProducer.cc.
typedef boost::shared_ptr<EcalNextToDeadChannel> EcalNextToDeadChannelESProducer::ReturnType |
Definition at line 30 of file EcalNextToDeadChannelESProducer.cc.
EcalNextToDeadChannelESProducer::EcalNextToDeadChannelESProducer | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 46 of file EcalNextToDeadChannelESProducer.cc.
References edm::eventsetup::dependsOn(), findNextToDeadChannelsCallback(), edm::ParameterSet::getParameter(), returnRcd_, edm::ESProducer::setWhatProduced(), and statusThreshold_.
{ //the following line is needed to tell the framework what // data is being produced setWhatProduced(this, dependsOn (&EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback)); statusThreshold_= iConfig.getParameter<int>("channelStatusThresholdForDead"); returnRcd_=ReturnType(new EcalNextToDeadChannel); }
void EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback | ( | const EcalChannelStatusRcd & | chs | ) | [private] |
Definition at line 68 of file EcalNextToDeadChannelESProducer.cc.
References cond::rpcobgas::detid, edm::eventsetup::EventSetupRecord::get(), h, EcalTools::isNextToDeadFromNeighbours(), EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, returnRcd_, EcalCondObjectContainer< T >::setValue(), statusThreshold_, EEDetId::validDetId(), and EBDetId::validDetId().
Referenced by EcalNextToDeadChannelESProducer().
{ EcalNextToDeadChannel* rcd= new EcalNextToDeadChannel; // Find channels next to dead ones and fill corresponding record edm::ESHandle <EcalChannelStatus> h; chs.get (h); for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) { if(ieta==0) continue; for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) { if (EBDetId::validDetId(ieta,iphi)) { EBDetId detid(ieta,iphi); if (EcalTools::isNextToDeadFromNeighbours(detid, *h, statusThreshold_)){ rcd->setValue(detid,1); }; } } // for phi } // for eta // endcap for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) { for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) { if (EEDetId::validDetId(iX,iY,1)) { EEDetId detid(iX,iY,1); if (EcalTools::isNextToDeadFromNeighbours(detid, *h, statusThreshold_)){ rcd->setValue(detid,1); }; } if (EEDetId::validDetId(iX,iY,-1)) { EEDetId detid(iX,iY,-1); if (EcalTools::isNextToDeadFromNeighbours(detid, *h, statusThreshold_)){ rcd->setValue(detid,1); }; } } // for iy } // for ix returnRcd_.reset(rcd); }
EcalNextToDeadChannelESProducer::ReturnType EcalNextToDeadChannelESProducer::produce | ( | const EcalNextToDeadChannelRcd & | iRecord | ) |
Definition at line 60 of file EcalNextToDeadChannelESProducer.cc.
References returnRcd_.
{ return returnRcd_ ; }
Definition at line 43 of file EcalNextToDeadChannelESProducer.cc.
Referenced by EcalNextToDeadChannelESProducer(), findNextToDeadChannelsCallback(), and produce().
int EcalNextToDeadChannelESProducer::statusThreshold_ [private] |
Definition at line 41 of file EcalNextToDeadChannelESProducer.cc.
Referenced by EcalNextToDeadChannelESProducer(), and findNextToDeadChannelsCallback().