#include <EcalTBHodoscopeRecInfoProducer.h>
Public Member Functions | |
EcalTBHodoscopeRecInfoProducer (const edm::ParameterSet &ps) | |
virtual void | produce (edm::Event &e, const edm::EventSetup &es) |
virtual | ~EcalTBHodoscopeRecInfoProducer () |
Private Attributes | |
EcalTBHodoscopeRecInfoAlgo * | algo_ |
int | fitMethod_ |
std::string | rawInfoCollection_ |
std::string | rawInfoProducer_ |
std::string | recInfoCollection_ |
Definition at line 15 of file EcalTBHodoscopeRecInfoProducer.h.
EcalTBHodoscopeRecInfoProducer::EcalTBHodoscopeRecInfoProducer | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 12 of file EcalTBHodoscopeRecInfoProducer.cc.
References algo_, fitMethod_, edm::ParameterSet::getParameter(), rawInfoCollection_, rawInfoProducer_, and recInfoCollection_.
{ rawInfoCollection_ = ps.getParameter<std::string>("rawInfoCollection"); rawInfoProducer_ = ps.getParameter<std::string>("rawInfoProducer"); recInfoCollection_ = ps.getParameter<std::string>("recInfoCollection"); fitMethod_ = ps.getParameter<int>("fitMethod"); // std::vector<double> planeShift_def; // planeShift_def.push_back( -0.333 ); // planeShift_def.push_back( -0.333 ); // planeShift_def.push_back( -0.333 ); // planeShift_def.push_back( -0.333 ); std::vector<double> planeShift = ps.getParameter< std::vector<double> >("planeShift"); // std::vector<double> zPosition_def; // zPosition_def.push_back( -0.333 ); // zPosition_def.push_back( -0.333 ); // zPosition_def.push_back( -0.333 ); // zPosition_def.push_back( -0.333 ); std::vector<double> zPosition = ps.getParameter< std::vector<double> >("zPosition"); produces<EcalTBHodoscopeRecInfo>(recInfoCollection_); algo_ = new EcalTBHodoscopeRecInfoAlgo(fitMethod_, planeShift, zPosition); }
EcalTBHodoscopeRecInfoProducer::~EcalTBHodoscopeRecInfoProducer | ( | ) | [virtual] |
Definition at line 38 of file EcalTBHodoscopeRecInfoProducer.cc.
References algo_.
{ delete algo_; }
void EcalTBHodoscopeRecInfoProducer::produce | ( | edm::Event & | e, |
const edm::EventSetup & | es | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 42 of file EcalTBHodoscopeRecInfoProducer.cc.
References algo_, edm::Event::getByLabel(), edm::HandleBase::isValid(), edm::Handle< T >::product(), edm::Event::put(), rawInfoCollection_, rawInfoProducer_, recInfoCollection_, and EcalTBHodoscopeRecInfoAlgo::reconstruct().
{ // Get input edm::Handle<EcalTBHodoscopeRawInfo> ecalRawHodoscope; const EcalTBHodoscopeRawInfo* ecalHodoRawInfo = 0; //evt.getByLabel( digiProducer_, digiCollection_, pDigis); e.getByLabel( rawInfoProducer_, ecalRawHodoscope); if (ecalRawHodoscope.isValid()) { ecalHodoRawInfo = ecalRawHodoscope.product(); } if (! ecalHodoRawInfo ) { edm::LogError("EcalTBHodoscopeRecInfoError") << "Error! can't get the product " << rawInfoCollection_.c_str() ; return; } if ( (*ecalHodoRawInfo).planes() != 4 ) { edm::LogError("EcalTBHodoscopeRecInfoError") << "Number of planes different from expected " << rawInfoCollection_.c_str() ; return; } // Create empty output std::auto_ptr<EcalTBHodoscopeRecInfo> recInfo(new EcalTBHodoscopeRecInfo(algo_->reconstruct(*ecalRawHodoscope))); e.put(recInfo,recInfoCollection_); }
Definition at line 30 of file EcalTBHodoscopeRecInfoProducer.h.
Referenced by EcalTBHodoscopeRecInfoProducer(), produce(), and ~EcalTBHodoscopeRecInfoProducer().
int EcalTBHodoscopeRecInfoProducer::fitMethod_ [private] |
Definition at line 29 of file EcalTBHodoscopeRecInfoProducer.h.
Referenced by EcalTBHodoscopeRecInfoProducer().
std::string EcalTBHodoscopeRecInfoProducer::rawInfoCollection_ [private] |
Definition at line 26 of file EcalTBHodoscopeRecInfoProducer.h.
Referenced by EcalTBHodoscopeRecInfoProducer(), and produce().
std::string EcalTBHodoscopeRecInfoProducer::rawInfoProducer_ [private] |
Definition at line 25 of file EcalTBHodoscopeRecInfoProducer.h.
Referenced by EcalTBHodoscopeRecInfoProducer(), and produce().
std::string EcalTBHodoscopeRecInfoProducer::recInfoCollection_ [private] |
Definition at line 27 of file EcalTBHodoscopeRecInfoProducer.h.
Referenced by EcalTBHodoscopeRecInfoProducer(), and produce().