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