21 ZSFIRWeights_(nFIRTaps, 0.),
49 vector<vector<float> >
weights(vSr->dccNormalizedWeights_);
50 if (weights.size() == 1) {
51 vector<double> normWeights;
52 for (vector<float>::iterator it(weights[0].
begin()); it != weights[0].end(); it++)
53 normWeights.push_back(*it);
57 edm::LogWarning(
"EcalDQM") <<
"SelectiveReadoutTask: DCC weight set is not exactly 1.";
71 float ebSize(0.), eemSize(0.), eepSize(0.);
74 for (
int iFED(601); iFED <= 654; iFED++) {
93 std::vector<short>
const& feStatus(dcchItr->getFEStatus());
94 unsigned nFE(feStatus.size());
95 for (
unsigned iFE(0); iFE < nFE; ++iFE)
97 suppressed_.insert(std::make_pair(dcchItr->id(), iFE + 1));
101 template <
typename SRFlagCollection>
103 MESet& meFlagCounterMap(
MEs_.
at(
"FlagCounterMap"));
104 MESet& meFullReadoutMap(
MEs_.
at(
"FullReadoutMap"));
113 int flag(srf.value());
146 template <
typename DigiCollection>
150 MESet& meHighIntPayload(
MEs_.
at(
"HighIntPayload"));
153 MESet& meZSFullReadoutMap(
MEs_.
at(
"ZSFullReadoutMap"));
158 bool isEB(_collection ==
kEBDigi);
163 std::vector<unsigned> sizes(nTower, 0);
165 int nHighInt[] = {0, 0};
166 int nLowInt[] = {0, 0};
168 for (
typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr) {
169 DetId const&
id(digiItr->id());
193 bool gain12saturated(
false);
194 const int gain12(0x01);
196 for (
int iWeight(0); iWeight <
nFIRTaps; ++iWeight) {
199 if (iSample >= 0 && iSample < frame.
size()) {
201 if (sample.
gainId() != gain12) {
202 gain12saturated =
true;
207 edm::LogWarning(
"EcalDQM") <<
"SelectiveReadoutTask: Not enough samples in data frame or "
208 "'ecalDccZs1stSample' module parameter is not valid";
215 ZSFIRValue /= (0x1 << 8);
242 meHighIntPayload.fill(
250 for (
unsigned iTower(0); iTower < nTower; ++iTower, ++iRU) {
272 bool ruFullyReadout(sizes[iTower] ==
GetElectronicsMap()->dccTowerConstituents(dccid, towerid).
size());
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)
uint16_t *__restrict__ id
MESet & at(const std::string &key)
static const int SRF_FORCED_MASK
std::vector< short > flags_
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)
void setFIRWeights_(std::vector< double > const &)
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
bool getData(T &iHolder) const
Container::value_type value_type
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void addDependencies(DependencySet &) override
unsigned towerId(DetId const &, EcalElectronicsMapping const *)
void beginRun(edm::Run const &, edm::EventSetup const &) override
static const int SRF_FULL
Abs< T >::type abs(const T &t)
unsigned dccId(DetId const &, EcalElectronicsMapping const *)
virtual void fill(EcalDQMSetupObjects const, DetId const &, double=1., double=1., double=1.)
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
void runOnSrFlags(SRFlagCollection const &, Collections)
edm::ESGetToken< EcalSRSettings, EcalSRSettingsRcd > hSr
const_iterator end() const
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
void runOnSource(FEDRawDataCollection const &)
EcalDQMSetupObjects const getEcalDQMSetupObjects()
EcalElectronicsMapping const * GetElectronicsMap()
void setTokens(edm::ConsumesCollector &) override
Log< level::Warning, false > LogWarning
void push_back(Dependency const &_d)
tuple size
Write out results.
std::set< std::pair< int, int > > suppressed_
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)
std::vector< int > ZSFIRWeights_