CMS 3D CMS Logo

Public Member Functions | Private Attributes

EcalTrigPrimSpikeESProducer Class Reference

#include <EcalTrigPrimSpikeESProducer.h>

Inheritance diagram for EcalTrigPrimSpikeESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 EcalTrigPrimSpikeESProducer (const edm::ParameterSet &)
std::auto_ptr< EcalTPGSpikeproduceSpike (const EcalTPGSpikeRcd &)
 ~EcalTrigPrimSpikeESProducer ()

Private Attributes

std::vector< uint32_t > towerIDs_
uint16_t zeroThresh_

Detailed Description

Definition at line 20 of file EcalTrigPrimSpikeESProducer.h.


Constructor & Destructor Documentation

EcalTrigPrimSpikeESProducer::EcalTrigPrimSpikeESProducer ( const edm::ParameterSet iConfig)

Definition at line 10 of file EcalTrigPrimSpikeESProducer.cc.

References EcalBarrel, i, j, produceSpike(), DetId::rawId(), edm::ESProducer::setWhatProduced(), and towerIDs_.

                                                                                       :
  zeroThresh_(iConfig.getUntrackedParameter<uint32_t>("TCCZeroingThreshold", 0))
{
  // Indicate we produce the spike record
  setWhatProduced(this, &EcalTrigPrimSpikeESProducer::produceSpike) ;

  // Cache all EB TT raw DetIDs
  for(unsigned int i = 1; i <= 17; ++i)
  {
    for(unsigned int j = 1; j <= 72; ++j)
    {
      EcalTrigTowerDetId posTT(1, EcalBarrel, i, j);
      EcalTrigTowerDetId negTT(-1, EcalBarrel, i, j);
      towerIDs_.push_back(posTT.rawId());
      towerIDs_.push_back(negTT.rawId());
    }
  }
}
EcalTrigPrimSpikeESProducer::~EcalTrigPrimSpikeESProducer ( )

Definition at line 29 of file EcalTrigPrimSpikeESProducer.cc.

{ 
}

Member Function Documentation

std::auto_ptr< EcalTPGSpike > EcalTrigPrimSpikeESProducer::produceSpike ( const EcalTPGSpikeRcd iRecord)

Definition at line 35 of file EcalTrigPrimSpikeESProducer.cc.

References parseEventContent::prod, towerIDs_, and zeroThresh_.

Referenced by EcalTrigPrimSpikeESProducer().

{
  std::auto_ptr<EcalTPGSpike> prod(new EcalTPGSpike());
  for(std::vector<uint32_t>::const_iterator it = towerIDs_.begin(); it != towerIDs_.end(); ++it)
  {
    prod->setValue(*it, zeroThresh_);
  }
  return prod;
}

Member Data Documentation

std::vector<uint32_t> EcalTrigPrimSpikeESProducer::towerIDs_ [private]

Definition at line 28 of file EcalTrigPrimSpikeESProducer.h.

Referenced by EcalTrigPrimSpikeESProducer(), and produceSpike().

Definition at line 29 of file EcalTrigPrimSpikeESProducer.h.

Referenced by produceSpike().