1 #include "../interface/TowerStatusTask.h"
36 doDAQInfo_ = taskParams.getUntrackedParameter<
bool>(
"doDAQInfo");
37 doDCSInfo_ = taskParams.getUntrackedParameter<
bool>(
"doDCSInfo");
39 if(!doDAQInfo_ && !doDCSInfo_)
40 throw cms::Exception(
"InvalidConfiguration") <<
"Nonthing to do in TowerStatusTask";
114 edm::LogWarning(
"EventSetup") <<
"EcalDAQTowerStatus record not valid";
123 edm::LogWarning(
"EventSetup") <<
"EcalDCSTowerStatus record not valid";
131 uint16_t
status(daqHndl->barrel(
id).getStatusCode());
138 uint16_t
status(dcsHndl->barrel(
id).getStatusCode());
149 uint16_t
status(daqHndl->endcap(
id).getStatusCode());
156 uint16_t
status(dcsHndl->endcap(
id).getStatusCode());
177 std::vector<int> activeChannels(54, 0);
191 MEs_[summaryMap]->reset();
193 for(std::map<uint32_t, bool>::const_iterator stItr(_status.begin()); stItr != _status.end(); ++stItr){
195 bool status(stItr->second);
198 MEs_[summaryMap]->setBinContent(
id, status ? 1. : 0.);
202 activeChannels[
dccId(
id) - 1] += 25;
204 int dccid(
dccId(
id));
212 for(
unsigned iDCC(0); iDCC < 54; iDCC++){
213 float fraction(
float(activeChannels[iDCC]) /
float(
getElectronicsMap()->dccConstituents(iDCC + 1).
size()));
215 totalActive += activeChannels[iDCC];
void beginRun(const edm::Run &, const edm::EventSetup &)
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
static void setMEData(std::vector< MEData > &)
const EcalElectronicsMapping * getElectronicsMap()
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
TowerStatusTask(const edm::ParameterSet &, const edm::ParameterSet &)
static EcalScDetId unhashIndex(int hi)
unsigned dccId(const DetId &)
std::map< uint32_t, bool > daqLumiStatus_
std::map< uint32_t, bool > dcsRunStatus_
uint32_t rawId() const
get the raw id
unsigned towerId(const DetId &)
std::map< uint32_t, bool > daqRunStatus_
ParameterSet const & getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
std::vector< MESet * > MEs_
void runOnTowerStatus(const std::map< uint32_t, bool > &, int)
void endRun(const edm::Run &, const edm::EventSetup &)
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
std::map< uint32_t, bool > dcsLumiStatus_
DEFINE_ECALDQM_WORKER(CertificationClient)
tuple size
Write out results.
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.