24 ZSFIRWeights_(nFIRTaps, 0.),
51 if (weights.size() == 1) {
52 vector<double> normWeights;
53 for (vector<float>::iterator it(weights[0].
begin()); it != weights[0].end(); it++)
54 normWeights.push_back(*it);
58 edm::LogWarning(
"EcalDQM") <<
"SelectiveReadoutTask: DCC weight set is not exactly 1.";
69 MESet& meDCCSizeProf(
MEs_.at(
"DCCSizeProf"));
72 float ebSize(0.), eemSize(0.), eepSize(0.);
75 for (
int iFED(601); iFED <= 654; iFED++) {
77 meDCCSize.fill(iFED - 600, size);
78 meDCCSizeProf.fill(iFED - 600, size);
94 std::vector<short>
const& feStatus(dcchItr->getFEStatus());
95 unsigned nFE(feStatus.size());
96 for (
unsigned iFE(0); iFE < nFE; ++iFE)
98 suppressed_.insert(std::make_pair(dcchItr->id(), iFE + 1));
102 template <
typename SRFlagCollection>
104 MESet& meFlagCounterMap(
MEs_.at(
"FlagCounterMap"));
105 MESet& meFullReadoutMap(
MEs_.at(
"FullReadoutMap"));
108 MESet& meRUForcedMap(
MEs_.at(
"RUForcedMap"));
114 int flag(srf.value());
116 meFlagCounterMap.fill(
id);
127 meFullReadoutMap.fill(
id);
141 meRUForcedMap.fill(
id);
147 template <
typename DigiCollection>
149 MESet& meHighIntOutput(
MEs_.at(
"HighIntOutput"));
150 MESet& meLowIntOutput(
MEs_.at(
"LowIntOutput"));
151 MESet& meHighIntPayload(
MEs_.at(
"HighIntPayload"));
152 MESet& meLowIntPayload(
MEs_.at(
"LowIntPayload"));
153 MESet& meTowerSize(
MEs_.at(
"TowerSize"));
154 MESet& meZSFullReadoutMap(
MEs_.at(
"ZSFullReadoutMap"));
155 MESet& meFRDroppedMap(
MEs_.at(
"FRDroppedMap"));
156 MESet& meZSFullReadout(
MEs_.at(
"ZSFullReadout"));
157 MESet& meFRDropped(
MEs_.at(
"FRDropped"));
159 bool isEB(_collection ==
kEBDigi);
164 std::vector<unsigned> sizes(nTower, 0);
166 int nHighInt[] = {0, 0};
167 int nLowInt[] = {0, 0};
169 for (
typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr) {
170 DetId const&
id(digiItr->id());
194 bool gain12saturated(
false);
195 const int gain12(0x01);
197 for (
int iWeight(0); iWeight <
nFIRTaps; ++iWeight) {
200 if (iSample >= 0 && iSample < frame.
size()) {
202 if (sample.
gainId() != gain12) {
203 gain12saturated =
true;
208 edm::LogWarning(
"EcalDQM") <<
"SelectiveReadoutTask: Not enough samples in data frame or " 209 "'ecalDccZs1stSample' module parameter is not valid";
216 ZSFIRValue /= (0x1 << 8);
225 meHighIntOutput.fill(
id, ZSFIRValue);
231 meLowIntOutput.fill(
id, ZSFIRValue);
250 for (
unsigned iTower(0); iTower < nTower; ++iTower, ++iRU) {
259 meTowerSize.fill(
id, towerSize);
264 int dccid(
dccId(
id));
272 bool ruFullyReadout(sizes[iTower] ==
getElectronicsMap()->dccTowerConstituents(dccid, towerid).
size());
275 meZSFullReadoutMap.fill(
id);
276 meZSFullReadout.fill(
id);
280 meFRDroppedMap.fill(
id);
281 meFRDropped.fill(
id);
288 throw cms::Exception(
"InvalidConfiguration") <<
"weightsForZsFIR" << std::endl;
290 bool notNormalized(
false), notInt(
false);
291 for (std::vector<double>::const_iterator it(_normWeights.begin()); it != _normWeights.end(); ++it) {
293 notNormalized =
true;
297 if (notInt && notNormalized) {
298 throw cms::Exception(
"InvalidConfiguration") <<
"weigtsForZsFIR paramater values are not valid: they " 299 <<
"must either be integer and uses the hardware representation " 300 <<
"of the weights or less or equal than 1 and used the normalized " 301 <<
"representation.";
311 const int maxWeight(0xEFF);
T getUntrackedParameter(std::string const &, T const &) const
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
#define DEFINE_ECALDQM_WORKER(TYPE)
static const int SRF_FORCED_MASK
std::vector< short > flags_
EcalElectronicsMapping const * getElectronicsMap()
std::vector< T >::const_iterator const_iterator
void runOnDigis(DigiCollection const &, Collections)
int hashedIndex() const
get a compact index for arrays [TODO: NEEDS WORK]
static EcalScDetId unhashIndex(int hi)
std::vector< std::vector< float > > dccNormalizedWeights_
void setFIRWeights_(std::vector< double > const &)
void beginEvent(edm::Event const &, edm::EventSetup const &) override
int gainId() const
get the gainId (2 bits)
void runOnRawData(EcalRawDataCollection const &)
size_t size() const
Lenght of the data buffer in bytes.
void setParams(edm::ParameterSet const &) override
Container::value_type value_type
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void addDependencies(DependencySet &) override
void beginRun(edm::Run const &, edm::EventSetup const &) override
static const int SRF_FULL
Abs< T >::type abs(const T &t)
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
void runOnSrFlags(SRFlagCollection const &, Collections)
unsigned towerId(DetId const &)
const_iterator end() const
void runOnSource(FEDRawDataCollection const &)
void push_back(Dependency const &_d)
unsigned dccId(DetId const &)
std::set< std::pair< int, int > > suppressed_
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)
std::vector< int > ZSFIRWeights_