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){
194 DetId id(stItr->first);
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];
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
static void setMEData(std::vector< MEData > &)
const EcalElectronicsMapping * getElectronicsMap()
TowerStatusTask(const edm::ParameterSet &, const edm::ParameterSet &)
static EcalScDetId unhashIndex(int hi)
unsigned dccId(const DetId &)
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
void endRun(const edm::Run &, const edm::EventSetup &) override
std::map< uint32_t, bool > daqLumiStatus_
std::map< uint32_t, bool > dcsRunStatus_
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
uint32_t rawId() const
get the raw id
unsigned towerId(const DetId &)
std::map< uint32_t, bool > daqRunStatus_
void beginRun(const edm::Run &, const edm::EventSetup &) override
std::vector< MESet * > MEs_
void runOnTowerStatus(const std::map< uint32_t, bool > &, int)
std::map< uint32_t, bool > dcsLumiStatus_
DEFINE_ECALDQM_WORKER(CertificationClient)
volatile std::atomic< bool > shutdown_flag false
tuple size
Write out results.
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.