#include <SimCalorimetry/HcalTrigPrimProducers/src/HcalTrigPrimDigiProducer.h>
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 |
Definition at line 9 of file HcalTrigPrimDigiProducer.h.
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] |
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 }