CMS 3D CMS Logo

EcalTrigPrimSpikeESProducer.cc
Go to the documentation of this file.
1 // user include files
3 
6 
7 //
8 // constructors and destructor
9 //
11  : zeroThresh_(iConfig.getUntrackedParameter<uint32_t>("TCCZeroingThreshold", 0)) {
12  // Indicate we produce the spike record
14 
15  // Cache all EB TT raw DetIDs
16  for (unsigned int i = 1; i <= 17; ++i) {
17  for (unsigned int j = 1; j <= 72; ++j) {
18  EcalTrigTowerDetId posTT(1, EcalBarrel, i, j);
19  EcalTrigTowerDetId negTT(-1, EcalBarrel, i, j);
20  towerIDs_.push_back(posTT.rawId());
21  towerIDs_.push_back(negTT.rawId());
22  }
23  }
24 }
25 
27 
28 // ------------ method called to produce the data ------------
29 std::unique_ptr<EcalTPGSpike> EcalTrigPrimSpikeESProducer::produceSpike(const EcalTPGSpikeRcd &iRecord) {
30  auto prod = std::make_unique<EcalTPGSpike>();
31  for (std::vector<uint32_t>::const_iterator it = towerIDs_.begin(); it != towerIDs_.end(); ++it) {
32  prod->setValue(*it, zeroThresh_);
33  }
34  return prod;
35 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
EcalTrigPrimSpikeESProducer(const edm::ParameterSet &)
std::unique_ptr< EcalTPGSpike > produceSpike(const EcalTPGSpikeRcd &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57