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  const edm::ParameterSet &iConfig)
12  : zeroThresh_(
13  iConfig.getUntrackedParameter<uint32_t>("TCCZeroingThreshold", 0)) {
14  // Indicate we produce the spike record
16 
17  // Cache all EB TT raw DetIDs
18  for (unsigned int i = 1; i <= 17; ++i) {
19  for (unsigned int j = 1; j <= 72; ++j) {
20  EcalTrigTowerDetId posTT(1, EcalBarrel, i, j);
21  EcalTrigTowerDetId negTT(-1, EcalBarrel, i, j);
22  towerIDs_.push_back(posTT.rawId());
23  towerIDs_.push_back(negTT.rawId());
24  }
25  }
26 }
27 
29 
30 // ------------ method called to produce the data ------------
31 std::unique_ptr<EcalTPGSpike>
33  auto prod = std::make_unique<EcalTPGSpike>();
34  for (std::vector<uint32_t>::const_iterator it = towerIDs_.begin();
35  it != towerIDs_.end(); ++it) {
36  prod->setValue(*it, zeroThresh_);
37  }
38  return prod;
39 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
EcalTrigPrimSpikeESProducer(const edm::ParameterSet &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
std::unique_ptr< EcalTPGSpike > produceSpike(const EcalTPGSpikeRcd &)