CMS 3D CMS Logo

HcalTrigPrimDigiProducer Class Reference

#include <SimCalorimetry/HcalTrigPrimProducers/src/HcalTrigPrimDigiProducer.h>

Inheritance diagram for HcalTrigPrimDigiProducer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 HcalTrigPrimDigiProducer (const edm::ParameterSet &ps)
virtual void produce (edm::Event &e, const edm::EventSetup &c)
 Produces the EDM products,.
virtual ~HcalTrigPrimDigiProducer ()

Private Attributes

edm::InputTag inputLabel_
HcalTriggerPrimitiveAlgo theAlgo


Detailed Description

Definition at line 9 of file HcalTrigPrimDigiProducer.h.


Constructor & Destructor Documentation

HcalTrigPrimDigiProducer::HcalTrigPrimDigiProducer ( const edm::ParameterSet ps  )  [explicit]

Definition at line 22 of file HcalTrigPrimDigiProducer.cc.

00023 : 
00024   theAlgo(ps.getParameter<bool>("peakFilter"),
00025           ps.getParameter<std::vector<double> >("weights"),
00026           ps.getParameter<int>("latency"),
00027           ps.getParameter<uint32_t>("FG_threshold")),
00028   inputLabel_(ps.getParameter<edm::InputTag>("inputLabel"))
00029 {
00030    produces<HcalTrigPrimDigiCollection>();
00031 }

virtual HcalTrigPrimDigiProducer::~HcalTrigPrimDigiProducer (  )  [inline, virtual]

Definition at line 14 of file HcalTrigPrimDigiProducer.h.

00014 {}


Member Function Documentation

void HcalTrigPrimDigiProducer::produce ( edm::Event e,
const edm::EventSetup c 
) [virtual]

Produces the EDM products,.

Implements edm::EDProducer.

Definition at line 34 of file HcalTrigPrimDigiProducer.cc.

References edm::EventSetup::get(), edm::Event::getByLabel(), CaloTPGTranscoder::HcalTPG, inputLabel_, edm::ESHandle< T >::product(), edm::Event::put(), HLT_VtxMuL3::result, HcalTriggerPrimitiveAlgo::run(), and theAlgo.

00034                                                                                    {
00035   edm::Handle<HBHEDigiCollection> hbheDigis;
00036   edm::Handle<HFDigiCollection>   hfDigis;
00037 
00038   e.getByLabel(inputLabel_,hbheDigis);
00039   e.getByLabel(inputLabel_,hfDigis);
00040 
00041   // get the conditions, for the decoding
00042   edm::ESHandle<HcalTPGCoder> inputCoder;
00043   eventSetup.get<HcalTPGRecord>().get(inputCoder);
00044 
00045   edm::ESHandle<CaloTPGTranscoder> outTranscoder;
00046   eventSetup.get<CaloTPGRecord>().get(outTranscoder);
00047   outTranscoder->setup(eventSetup,CaloTPGTranscoder::HcalTPG);
00048 
00049   // Step B: Create empty output
00050   std::auto_ptr<HcalTrigPrimDigiCollection> result(new HcalTrigPrimDigiCollection());
00051 
00052   // Step C: Invoke the algorithm, passing in inputs and getting back outputs.
00053   theAlgo.run(inputCoder.product(),outTranscoder->getHcalCompressor().get(),
00054               *hbheDigis,  *hfDigis, *result);
00055 
00056   //  edm::LogInfo("HcalTrigPrimDigiProducer") << "HcalTrigPrims: " << result->size();
00057 
00058   // Step D: Put outputs into event
00059   e.put(result);
00060 
00061   outTranscoder->releaseSetup();
00062 }


Member Data Documentation

edm::InputTag HcalTrigPrimDigiProducer::inputLabel_ [private]

Definition at line 21 of file HcalTrigPrimDigiProducer.h.

Referenced by produce().

HcalTriggerPrimitiveAlgo HcalTrigPrimDigiProducer::theAlgo [private]

Definition at line 20 of file HcalTrigPrimDigiProducer.h.

Referenced by produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:24:03 2009 for CMSSW by  doxygen 1.5.4