1 #include "../interface/TowerStatusTask.h"
47 throw cms::Exception(
"InvalidConfiguration") <<
"Nothing to do in TowerStatusTask";
55 std::fill_n(status,
nDCC, 1.);
61 if(daqHndl->barrel(
id).getStatusCode() != 0){
63 status[
dccId(ttid) - 1] -= 25. / 1700.;
67 if(daqHndl->endcap(
id).getStatusCode() != 0){
69 unsigned dccid(
dccId(scid));
82 std::fill_n(status,
nDCC, 1.);
88 if(dcsHndl->barrel(
id).getStatusCode() != 0){
90 status[
dccId(ttid) - 1] -= 25. / 1700.;
94 if(dcsHndl->endcap(
id).getStatusCode() != 0){
96 unsigned dccid(
dccId(scid));
104 edm::LogWarning(
"EventSetup") <<
"EcalDCSTowerStatus record not valid";
112 MESet* meSummaryMap(0);
113 MESet* meContents(0);
115 meSummary = &
MEs_.at(
"DAQSummary");
116 meSummaryMap = &
MEs_.at(
"DAQSummaryMap");
117 meContents = &
MEs_.at(
"DAQContents");
120 meSummary = &
MEs_.at(
"DCSSummary");
121 meSummaryMap = &
MEs_.at(
"DCSSummaryMap");
122 meContents = &
MEs_.at(
"DCSContents");
125 meSummary->
reset(-1.);
127 meSummaryMap->
reset();
128 meContents->
reset(-1.);
130 float totalFraction(0.);
131 for(
int iDCC(0); iDCC <
nDCC; iDCC++){
133 meContents->
fill(iDCC + 1, _status[iDCC]);
134 totalFraction += _status[iDCC] /
nCrystals(iDCC + 1);
137 meSummary->
fill(totalFraction);
T getUntrackedParameter(std::string const &, T const &) const
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
static EcalScDetId unhashIndex(int hi)
virtual void setBinContent(DetId const &, double)
DEFINE_ECALDQM_WORKER(CalibrationSummaryClient)
void setParams(edm::ParameterSet const &) override
unsigned nCrystals(unsigned)
virtual void reset(double=0., double=0., double=0.)
void runOnTowerStatus(float const *, InfoType)
virtual void fill(DetId const &, double=1., double=1., double=1.)
virtual void resetAll(double=0., double=0., double=0.)
std::vector< DetId > scConstituents(EcalScDetId const &)
volatile std::atomic< bool > shutdown_flag false
unsigned dccId(DetId const &)
tuple size
Write out results.